mirror of
https://github.com/stenzek/duckstation.git
synced 2025-12-28 05:24:19 +00:00
Quick/Declarative takes way too long to build on the CI, and insane amounts of disk space.
239 lines
8.8 KiB
Diff
239 lines
8.8 KiB
Diff
--- a/src/linguist/CMakeLists.txt
|
|
+++ b/src/linguist/CMakeLists.txt
|
|
@@ -16,7 +16,7 @@ add_subdirectory(lupdate)
|
|
add_subdirectory(lupdate-pro)
|
|
if(QT_FEATURE_process AND QT_FEATURE_pushbutton AND QT_FEATURE_toolbutton
|
|
AND QT_FEATURE_png AND QT_FEATURE_mdiarea AND QT_FEATURE_syntaxhighlighter
|
|
- AND TARGET Qt::Widgets AND TARGET Qt::Quick)
|
|
+ AND TARGET Qt::Widgets)
|
|
add_subdirectory(linguist)
|
|
endif()
|
|
|
|
--- a/src/linguist/linguist/CMakeLists.txt
|
|
+++ b/src/linguist/linguist/CMakeLists.txt
|
|
@@ -22,7 +22,6 @@ qt_internal_add_app(linguist
|
|
errorsview.cpp errorsview.h
|
|
finddialog.cpp finddialog.h finddialog.ui
|
|
uiformpreviewview.cpp uiformpreviewview.h
|
|
- qmlformpreviewview.h qmlformpreviewview.cpp
|
|
globals.cpp globals.h
|
|
main.cpp
|
|
mainwindow.cpp mainwindow.h mainwindow.ui
|
|
@@ -53,8 +52,6 @@ qt_internal_add_app(linguist
|
|
Qt::GuiPrivate
|
|
Qt::UiToolsPrivate
|
|
Qt::Widgets
|
|
- Qt::QuickWidgets
|
|
- Qt::QuickLayouts
|
|
)
|
|
|
|
qt_internal_extend_target(linguist CONDITION QT_FEATURE_printsupport
|
|
@@ -66,46 +63,6 @@ qt_internal_extend_target(linguist CONDITION QT_FEATURE_printsupport
|
|
|
|
set(available_plugins "")
|
|
|
|
-set(plugin_targets
|
|
- Qt::qtquickcontrols2plugin
|
|
- Qt::qtquick2plugin
|
|
- Qt::qtquickdialogsplugin
|
|
- Qt::qtquickcontrols2universalstyleplugin
|
|
- Qt::qtquickcontrols2basicstyleplugin
|
|
- Qt::qtquickcontrols2fluentwinui3styleplugin
|
|
- Qt::qtquickcontrols2fusionstyleplugin
|
|
- Qt::qtquickcontrols2imaginestyleplugin
|
|
- Qt::qtquickcontrols2iosstyleplugin
|
|
- Qt::qtquickcontrols2macosstyleplugin
|
|
- Qt::qtquickcontrols2materialstyleplugin
|
|
- Qt::qtquicktemplates2plugin
|
|
- Qt::qtquickcontrols2implplugin
|
|
- Qt::qtquickdialogs2quickimplplugin
|
|
- Qt::qtquickcontrols2universalstyleimplplugin
|
|
- Qt::qtquickcontrols2basicstyleimplplugin
|
|
- Qt::qtquickcontrols2fluentwinui3styleimplplugin
|
|
- Qt::qtquickcontrols2fusionstyleimplplugin
|
|
- Qt::qtquickcontrols2imaginestyleimplplugin
|
|
- Qt::qtquickcontrols2iosstyleimplplugin
|
|
- Qt::qtquickcontrols2macosstyleimplplugin
|
|
- Qt::qtquickcontrols2materialstyleimplplugin
|
|
- Qt::quickwindow
|
|
-)
|
|
-
|
|
-foreach(plugin ${plugin_targets})
|
|
- if(TARGET ${plugin})
|
|
- list(APPEND available_plugins ${plugin})
|
|
- endif()
|
|
-endforeach()
|
|
-
|
|
-if (available_plugins)
|
|
- if(BUILD_SHARED_LIBS)
|
|
- add_dependencies(linguist ${available_plugins})
|
|
- else()
|
|
- qt_internal_extend_target(linguist LIBRARIES ${available_plugins})
|
|
- endif()
|
|
-endif()
|
|
-
|
|
qt_add_ui(linguist
|
|
SOURCES
|
|
batchtranslation.ui
|
|
--- a/src/linguist/linguist/mainwindow.cpp
|
|
+++ b/src/linguist/linguist/mainwindow.cpp
|
|
@@ -12,7 +12,6 @@
|
|
#include "errorsview.h"
|
|
#include "finddialog.h"
|
|
#include "uiformpreviewview.h"
|
|
-#include "qmlformpreviewview.h"
|
|
#include "globals.h"
|
|
#include "messageeditor.h"
|
|
#include "messagemodel.h"
|
|
@@ -79,11 +78,6 @@ static bool hasUiFormPreview(const QString &fileName)
|
|
return fileName.endsWith(".ui"_L1) || fileName.endsWith(".jui"_L1);
|
|
}
|
|
|
|
-static bool hasQmlFormPreview(const QString &fileName, bool qmlPreviewChecked)
|
|
-{
|
|
- return fileName.endsWith(QLatin1String(".qml")) && qmlPreviewChecked;
|
|
-}
|
|
-
|
|
static QString leadingWhitespace(const QString &str)
|
|
{
|
|
int i = 0;
|
|
@@ -491,11 +485,9 @@ MainWindow::MainWindow()
|
|
m_sourceAndFormView = new QStackedWidget(this);
|
|
m_sourceAndFormDock->setWidget(m_sourceAndFormView);
|
|
m_uiFormPreviewView = new UiFormPreviewView(0, m_dataModel);
|
|
- m_qmlFormPreviewView = new QmlFormPreviewView(m_dataModel);
|
|
m_sourceCodeView = new SourceCodeView(0);
|
|
m_sourceAndFormView->addWidget(m_sourceCodeView);
|
|
m_sourceAndFormView->addWidget(m_uiFormPreviewView);
|
|
- m_sourceAndFormView->addWidget(m_qmlFormPreviewView);
|
|
|
|
// Set up errors dock widget
|
|
m_errorsDock = new QDockWidget(this);
|
|
@@ -693,7 +685,6 @@ void MainWindow::modelCountChanged()
|
|
m_ui.actionFindPrev->setEnabled(false);
|
|
|
|
m_uiFormPreviewView->setSourceContext(-1, 0);
|
|
- m_qmlFormPreviewView->setSourceContext(-1, 0);
|
|
}
|
|
|
|
struct OpenedFile {
|
|
@@ -1673,9 +1664,6 @@ void MainWindow::translationChanged(const MultiDataIndex &index)
|
|
MessageItem *m = m_dataModel->messageItem(index);
|
|
if (hasUiFormPreview(m->fileName()))
|
|
m_uiFormPreviewView->setSourceContext(index.model(), m);
|
|
- else if (hasQmlFormPreview(m->fileName(), m_ui.actionQmlPreview->isChecked()))
|
|
- if (!m_qmlFormPreviewView->setSourceContext(index.model(), m))
|
|
- m_ui.actionQmlPreview->setChecked(false);
|
|
}
|
|
|
|
// This and the following function operate directly on the messageitem,
|
|
@@ -1691,10 +1679,6 @@ void MainWindow::updateTranslation(const QStringList &translations)
|
|
m->setTranslations(translations);
|
|
if (!m->fileName().isEmpty() && hasUiFormPreview(m->fileName()))
|
|
m_uiFormPreviewView->setSourceContext(m_currentIndex.model(), m);
|
|
- else if (!m->fileName().isEmpty()
|
|
- && hasQmlFormPreview(m->fileName(), m_ui.actionQmlPreview->isChecked()))
|
|
- if (!m_qmlFormPreviewView->setSourceContext(m_currentIndex.model(), m))
|
|
- m_ui.actionQmlPreview->setChecked(false);
|
|
updateDanger(m_currentIndex, true);
|
|
|
|
if (m->isFinished())
|
|
@@ -2099,7 +2083,6 @@ void MainWindow::setupMenuBar()
|
|
connect(m_ui.actionDisplayGuesses, &QAction::triggered,
|
|
m_phraseView, &PhraseView::toggleGuessing);
|
|
connect(m_ui.actionStatistics, &QAction::triggered, this, &MainWindow::showStatistics);
|
|
- connect(m_ui.actionQmlPreview, &QAction::triggered, this, &MainWindow::toggleQmlPreview);
|
|
connect(m_ui.actionVisualizeWhitespace, &QAction::triggered,
|
|
this, &MainWindow::toggleVisualizeWhitespace);
|
|
connect(m_ui.actionIncreaseZoom, &QAction::triggered,
|
|
@@ -2209,11 +2192,7 @@ void MainWindow::updateSourceView(int model, MessageItem *item)
|
|
if (hasUiFormPreview(item->fileName())) {
|
|
m_sourceAndFormView->setCurrentWidget(m_uiFormPreviewView);
|
|
m_uiFormPreviewView->setSourceContext(model, item);
|
|
- } else if (hasQmlFormPreview(item->fileName(), m_ui.actionQmlPreview->isChecked())
|
|
- && m_qmlFormPreviewView->setSourceContext(model, item)) {
|
|
- m_sourceAndFormView->setCurrentWidget(m_qmlFormPreviewView);
|
|
} else {
|
|
- m_ui.actionQmlPreview->setChecked(false);
|
|
m_sourceAndFormView->setCurrentWidget(m_sourceCodeView);
|
|
QDir dir = QFileInfo(m_dataModel->srcFileName(model)).dir();
|
|
QString fileName = QDir::cleanPath(dir.absoluteFilePath(item->fileName()));
|
|
@@ -2754,14 +2733,6 @@ void MainWindow::showStatistics()
|
|
updateStatistics();
|
|
}
|
|
|
|
-void MainWindow::toggleQmlPreview()
|
|
-{
|
|
- if (m_ui.actionQmlPreview->isChecked())
|
|
- m_sourceAndFormView->setCurrentWidget(m_qmlFormPreviewView);
|
|
- else
|
|
- m_sourceAndFormView->setCurrentWidget(m_sourceCodeView);
|
|
-}
|
|
-
|
|
void MainWindow::toggleVisualizeWhitespace()
|
|
{
|
|
m_messageEditor->setVisualizeWhitespace(m_ui.actionVisualizeWhitespace->isChecked());
|
|
--- a/src/linguist/linguist/mainwindow.h
|
|
+++ b/src/linguist/linguist/mainwindow.h
|
|
@@ -37,7 +37,6 @@ class BatchTranslationDialog;
|
|
class ErrorsView;
|
|
class FocusWatcher;
|
|
class UiFormPreviewView;
|
|
-class QmlFormPreviewView;
|
|
class MessageEditor;
|
|
class PhraseView;
|
|
class SourceCodeView;
|
|
@@ -130,7 +129,6 @@ private slots:
|
|
FindDialog::FindOptions options, int statusFilter);
|
|
void revalidate();
|
|
void showStatistics();
|
|
- void toggleQmlPreview();
|
|
void toggleVisualizeWhitespace();
|
|
void onWhatsThis();
|
|
void updatePhraseDicts();
|
|
@@ -196,7 +194,6 @@ private:
|
|
QStackedWidget *m_sourceAndFormView;
|
|
SourceCodeView *m_sourceCodeView;
|
|
UiFormPreviewView *m_uiFormPreviewView;
|
|
- QmlFormPreviewView *m_qmlFormPreviewView;
|
|
ErrorsView *m_errorsView;
|
|
QLabel *m_progressLabel;
|
|
QLabel *m_modifiedLabel;
|
|
--- a/src/linguist/linguist/mainwindow.ui
|
|
+++ b/src/linguist/linguist/mainwindow.ui
|
|
@@ -97,7 +97,6 @@
|
|
</widget>
|
|
<addaction name="actionResetSorting"/>
|
|
<addaction name="actionDisplayGuesses"/>
|
|
- <addaction name="actionQmlPreview"/>
|
|
<addaction name="actionLengthVariants"/>
|
|
<addaction name="actionVisualizeWhitespace"/>
|
|
<addaction name="separator"/>
|
|
@@ -646,26 +645,6 @@
|
|
<enum>QAction::NoRole</enum>
|
|
</property>
|
|
</action>
|
|
- <action name="actionQmlPreview">
|
|
- <property name="checkable">
|
|
- <bool>true</bool>
|
|
- </property>
|
|
- <property name="checked">
|
|
- <bool>true</bool>
|
|
- </property>
|
|
- <property name="text">
|
|
- <string>&QML preview</string>
|
|
- </property>
|
|
- <property name="toolTip">
|
|
- <string>Displays a preview of QML documents.</string>
|
|
- </property>
|
|
- <property name="whatsThis">
|
|
- <string/>
|
|
- </property>
|
|
- <property name="menuRole">
|
|
- <enum>QAction::NoRole</enum>
|
|
- </property>
|
|
- </action>
|
|
<action name="actionManual">
|
|
<property name="text">
|
|
<string>&Manual</string>
|