diff options
author | Miikka Heikkinen <miikka.heikkinen@qt.io> | 2019-09-24 16:09:00 +0300 |
---|---|---|
committer | Miikka Heikkinen <miikka.heikkinen@qt.io> | 2019-09-25 14:09:40 +0300 |
commit | 5578d47e1a8a7afac027e6aa27f630d6bff727ca (patch) | |
tree | 82f29f77a932d43413b960f133122198a52851f2 /src | |
parent | 70b8999de551086e45f9836032640079e327dc3b (diff) |
Remove qt3d-runtime dependencies from studio
Task-number: QT3DS-3958
Change-Id: I1542cf2c78eb54fcff42598118cf19acb5ad66d7
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/Authoring/Client/Code/Core/Utility/StudioPreferences.cpp | 10 | ||||
-rw-r--r-- | src/Authoring/Client/Code/Core/Utility/StudioPreferences.h | 3 | ||||
-rw-r--r-- | src/Authoring/Qt3DStudio/MainFrm.cpp | 16 | ||||
-rw-r--r-- | src/Authoring/Qt3DStudio/MainFrm.h | 1 | ||||
-rw-r--r-- | src/Authoring/Qt3DStudio/MainFrm.ui | 16 | ||||
-rw-r--r-- | src/Authoring/Qt3DStudio/PreviewHelper.cpp | 26 | ||||
-rw-r--r-- | src/Authoring/Qt3DStudio/UI/StudioAppPrefsPage.cpp | 9 | ||||
-rw-r--r-- | src/Authoring/Qt3DStudio/UI/StudioAppPrefsPage.ui | 13 | ||||
-rw-r--r-- | src/Runtime/Runtime.pro | 20 | ||||
m--------- | src/Runtime/qt3d-runtime | 0 |
10 files changed, 11 insertions, 103 deletions
diff --git a/src/Authoring/Client/Code/Core/Utility/StudioPreferences.cpp b/src/Authoring/Client/Code/Core/Utility/StudioPreferences.cpp index bde1da0c..9068de60 100644 --- a/src/Authoring/Client/Code/Core/Utility/StudioPreferences.cpp +++ b/src/Authoring/Client/Code/Core/Utility/StudioPreferences.cpp @@ -230,16 +230,6 @@ void CStudioPreferences::resetWindowState(int version) // Viewing settings // -bool CStudioPreferences::isLegacyViewerActive() -{ - return s_preferences.value(QStringLiteral("Viewing/LegacyViewerActive"), false).toBool(); -} - -void CStudioPreferences::setLegacyViewerActive(bool inActive) -{ - s_preferences.setValue(QStringLiteral("Viewing/LegacyViewerActive"), inActive); -} - bool CStudioPreferences::isEditViewFillMode() { return s_preferences.value(QStringLiteral("Viewing/EditViewFillMode"), true).toBool(); diff --git a/src/Authoring/Client/Code/Core/Utility/StudioPreferences.h b/src/Authoring/Client/Code/Core/Utility/StudioPreferences.h index 490a48cc..0b72ee7f 100644 --- a/src/Authoring/Client/Code/Core/Utility/StudioPreferences.h +++ b/src/Authoring/Client/Code/Core/Utility/StudioPreferences.h @@ -67,9 +67,6 @@ public: // Viewing settings // - static bool isLegacyViewerActive(); - static void setLegacyViewerActive(bool inActive); - static bool isEditViewFillMode(); static void setEditViewFillMode(bool inRenderAsSolid); diff --git a/src/Authoring/Qt3DStudio/MainFrm.cpp b/src/Authoring/Qt3DStudio/MainFrm.cpp index e59b7c1c..d4f5a32c 100644 --- a/src/Authoring/Qt3DStudio/MainFrm.cpp +++ b/src/Authoring/Qt3DStudio/MainFrm.cpp @@ -218,16 +218,6 @@ CMainFrame::CMainFrame() connect(m_ui->actionRemote_Preview, &QAction::triggered, this, &CMainFrame::OnPlaybackPreviewRemote); - // Only show Qt3D runtime preview if we have appropriate viewer and it's enabled - if (CStudioPreferences::isLegacyViewerActive() - && QFileInfo(CPreviewHelper::getViewerFilePath(QStringLiteral("q3dsviewer"))).exists()) { - connect(m_ui->actionPreviewQt3DRuntime, &QAction::triggered, - this, &CMainFrame::OnPlaybackPreviewQt3DRuntime); - m_ui->actionPreviewQt3DRuntime->setVisible(true); - } else { - m_ui->actionPreviewQt3DRuntime->setVisible(false); - } - // Tool mode toolbar connect(m_ui->actionPosition_Tool, &QAction::triggered, this, std::bind(&CMainFrame::onTransformToolChanged, this, STUDIO_TOOLMODE_MOVE)); @@ -896,7 +886,6 @@ void CMainFrame::EditPreferences(short inPageIndex) CStudioPreferences::setDontShowGLVersionDialog(false); CStudioPreferences::setDefaultClientSize(CStudioPreferences::DEFAULT_CLIENT_WIDTH, CStudioPreferences::DEFAULT_CLIENT_HEIGHT); - CStudioPreferences::setLegacyViewerActive(true); CStudioPreferences::setEditViewFillMode(true); CStudioPreferences::setPreferredStartupView( CStudioPreferences::PREFERREDSTARTUP_DEFAULTINDEX); @@ -1032,11 +1021,6 @@ void CMainFrame::OnPlaybackPreview(const QString &viewerExeName, bool remote) } } -void CMainFrame::OnPlaybackPreviewQt3DRuntime() -{ - OnPlaybackPreview(QStringLiteral("q3dsviewer")); -} - void CMainFrame::OnPlaybackPreviewOpenGLRuntime() { OnPlaybackPreview(QStringLiteral("Qt3DViewer")); diff --git a/src/Authoring/Qt3DStudio/MainFrm.h b/src/Authoring/Qt3DStudio/MainFrm.h index 52c23be4..f25540ec 100644 --- a/src/Authoring/Qt3DStudio/MainFrm.h +++ b/src/Authoring/Qt3DStudio/MainFrm.h @@ -144,7 +144,6 @@ public: void OnPlaybackRewind(); void OnPlaybackStop(); void OnPlaybackPreview(const QString &viewerExeName, bool remote = false); - void OnPlaybackPreviewQt3DRuntime(); void OnPlaybackPreviewOpenGLRuntime(); void OnPlaybackPreviewRemote(); void onFilterVariants(); diff --git a/src/Authoring/Qt3DStudio/MainFrm.ui b/src/Authoring/Qt3DStudio/MainFrm.ui index 26f9cff9..553659dc 100644 --- a/src/Authoring/Qt3DStudio/MainFrm.ui +++ b/src/Authoring/Qt3DStudio/MainFrm.ui @@ -275,7 +275,6 @@ Project palette using Import functionality.</string> <addaction name="actionFilterVariants"/> <addaction name="actionPreview"/> <addaction name="actionRemote_Preview"/> - <addaction name="actionPreviewQt3DRuntime"/> </widget> <action name="action_Reference_Manual"> <property name="text"> @@ -875,21 +874,6 @@ Project palette using Import functionality.</string> <bool>false</bool> </property> </action> - <action name="actionPreviewQt3DRuntime"> - <property name="icon"> - <iconset resource="images.qrc"> - <normaloff>:/images/playback_tools_play.png</normaloff>:/images/playback_tools_play.png</iconset> - </property> - <property name="text"> - <string>Preview with Qt3D Runtime Viewer</string> - </property> - <property name="iconText"> - <string>Preview with Qt3D Runtime Viewer</string> - </property> - <property name="toolTip"> - <string>Preview with Qt3D Runtime Viewer</string> - </property> - </action> <action name="actionImportAssets"> <property name="text"> <string>Import...</string> diff --git a/src/Authoring/Qt3DStudio/PreviewHelper.cpp b/src/Authoring/Qt3DStudio/PreviewHelper.cpp index 1e87201b..24d7ee91 100644 --- a/src/Authoring/Qt3DStudio/PreviewHelper.cpp +++ b/src/Authoring/Qt3DStudio/PreviewHelper.cpp @@ -118,21 +118,14 @@ QString CPreviewHelper::getViewerFilePath(const QString &exeName) viewerFile = QStringLiteral("%1.exe").arg(exeName); QString viewer = viewerDir.filePath() + QStringLiteral("/") + viewerFile; - if (!QFileInfo(viewer).exists()) { - if (exeName == QLatin1String("q3dsviewer")) { - viewer = viewerDir.filePath() + QStringLiteral("/../src/Runtime/qt3d-runtime/bin/") - + viewerFile; - } else if (exeName == QLatin1String("Qt3DViewer")) { - viewer = viewerDir.filePath() + QStringLiteral("/../src/Runtime/ogl-runtime/bin/") - + viewerFile; - } + if (!QFileInfo(viewer).exists() && exeName == QLatin1String("Qt3DViewer")) { + viewer = viewerDir.filePath() + QStringLiteral("/../src/Runtime/ogl-runtime/bin/") + + viewerFile; } #else #ifdef Q_OS_MACOS QString viewerDevPath; - if (exeName == QLatin1String("q3dsviewer")) - viewerDevPath = QStringLiteral("../src/Runtime/qt3d-runtime/bin/"); - else if (exeName == QLatin1String("Qt3DViewer")) + if (exeName == QLatin1String("Qt3DViewer")) viewerDevPath = QStringLiteral("../src/Runtime/ogl-runtime/bin/"); // Name of the executable file on macOS @@ -155,14 +148,9 @@ QString CPreviewHelper::getViewerFilePath(const QString &exeName) viewerFile = exeName; QString viewer = viewerDir.filePath() + QStringLiteral("/") + viewerFile; - if (!QFileInfo(viewer).exists()) { - if (exeName == QLatin1String("q3dsviewer")) { - viewer = viewerDir.filePath() + QStringLiteral("/../src/Runtime/qt3d-runtime/bin/") - + viewerFile; - } else if (exeName == QLatin1String("Qt3DViewer")) { - viewer = viewerDir.filePath() + QStringLiteral("/../src/Runtime/ogl-runtime/bin/") - + viewerFile; - } + if (!QFileInfo(viewer).exists() && exeName == QLatin1String("Qt3DViewer")) { + viewer = viewerDir.filePath() + QStringLiteral("/../src/Runtime/ogl-runtime/bin/") + + viewerFile; } #endif #endif diff --git a/src/Authoring/Qt3DStudio/UI/StudioAppPrefsPage.cpp b/src/Authoring/Qt3DStudio/UI/StudioAppPrefsPage.cpp index df918d19..e6786e4a 100644 --- a/src/Authoring/Qt3DStudio/UI/StudioAppPrefsPage.cpp +++ b/src/Authoring/Qt3DStudio/UI/StudioAppPrefsPage.cpp @@ -90,7 +90,6 @@ void CStudioAppPrefsPage::onInitDialog() // Add tool tips for controls m_ui->m_DefaultInterpolation->setToolTip(tr("Set default keyframe interpolation type")); m_ui->m_checkTimelineAbsoluteSnapping->setToolTip(tr("Enable timeline snapping grid")); - m_ui->m_checkLegacyViewer->setToolTip(tr("Enable preview with Qt3D Runtime Viewer")); m_ui->m_SnapRangeCombo->setToolTip(tr("Set resolution of timeline snapping grid")); m_ui->m_buttonRestoreDefaults->setToolTip(tr("Click to restore default Studio settings")); @@ -119,8 +118,6 @@ void CStudioAppPrefsPage::onInitDialog() connect(m_ui->m_SnapRangeCombo, activated, this, [=](){ setModified(true); }); connect(m_ui->m_checkTimelineAbsoluteSnapping, &QCheckBox::clicked, this, [=](){ setModified(true); enableOptions(); }); - connect(m_ui->m_checkLegacyViewer, &QCheckBox::clicked, - this, [=](){ setModified(true); m_restartNeeded = true; }); connect(m_ui->m_EditViewStartupView, activated, this, [=](){ setModified(true); }); connect(m_ui->helperGridLinesSpinBox, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), @@ -170,9 +167,6 @@ void CStudioAppPrefsPage::loadSettings() m_ui->m_checkTimelineAbsoluteSnapping->setChecked( CStudioPreferences::isTimelineSnappingGridActive()); - // Legacy viewer - m_ui->m_checkLegacyViewer->setChecked(CStudioPreferences::isLegacyViewerActive()); - // Helper grid m_ui->helperGridLinesSpinBox->setValue(CStudioPreferences::helperGridLines()); m_ui->helperGridSpacingSpinBox->setValue(CStudioPreferences::helperGridSpacing()); @@ -220,9 +214,6 @@ void CStudioAppPrefsPage::saveSettings() int theCurrentSelection = m_ui->m_SnapRangeCombo->currentIndex(); CStudioPreferences::setTimelineSnappingGridResolution(ESnapGridResolution(theCurrentSelection)); - // Viewing settings - // Legacy viewer - CStudioPreferences::setLegacyViewerActive(m_ui->m_checkLegacyViewer->isChecked()); // Preferred Startup View CStudioPreferences::setPreferredStartupView(m_ui->m_EditViewStartupView->currentIndex()); diff --git a/src/Authoring/Qt3DStudio/UI/StudioAppPrefsPage.ui b/src/Authoring/Qt3DStudio/UI/StudioAppPrefsPage.ui index d9187726..3edd65dc 100644 --- a/src/Authoring/Qt3DStudio/UI/StudioAppPrefsPage.ui +++ b/src/Authoring/Qt3DStudio/UI/StudioAppPrefsPage.ui @@ -30,6 +30,9 @@ </property> </widget> </item> + <item row="1" column="1"> + <widget class="QComboBox" name="m_SnapRangeCombo"/> + </item> <item row="0" column="1"> <widget class="QComboBox" name="m_DefaultInterpolation"> <property name="maximumSize"> @@ -40,9 +43,6 @@ </property> </widget> </item> - <item row="1" column="1"> - <widget class="QComboBox" name="m_SnapRangeCombo"/> - </item> <item row="1" column="0"> <widget class="QCheckBox" name="m_checkTimelineAbsoluteSnapping"> <property name="text"> @@ -50,13 +50,6 @@ </property> </widget> </item> - <item row="2" column="0"> - <widget class="QCheckBox" name="m_checkLegacyViewer"> - <property name="text"> - <string>Qt3D Viewer</string> - </property> - </widget> - </item> </layout> </widget> </item> diff --git a/src/Runtime/Runtime.pro b/src/Runtime/Runtime.pro index eba449a2..8b07be9d 100644 --- a/src/Runtime/Runtime.pro +++ b/src/Runtime/Runtime.pro @@ -1,7 +1,6 @@ TEMPLATE = subdirs CONFIG += ordered -SUBDIRS += \ - ogl-runtime \ +SUBDIRS += ogl-runtime # HACK to ensure syncqt is run for ogl-runtime if one is run for studio # This is necessary because CI doesn't create dummy .git directories for submodules @@ -13,20 +12,3 @@ if(!build_pass|!debug_and_release) { $$system("$$MAKE_DIR_CMD") } } - - -# Qt3D based runtime needs Qt 5.11 or later -greaterThan(QT_MAJOR_VERSION, 5)|greaterThan(QT_MINOR_VERSION, 10) { - SUBDIRS += qt3d-runtime - - # HACK to ensure syncqt is run for qt3d-runtime if one is run for studio - # This is necessary because CI doesn't create dummy .git directories for submodules - if(!build_pass|!debug_and_release) { - # Pro file existence is checked to ensure we don't create dummy .git in empty submodule dir, - # which happens when studio is cloned without --recursive option - exists($$PWD/../../.git):!exists($$PWD/qt3d-runtime/.git):exists($$PWD/qt3d-runtime/qt3d-runtime.pro) { - MAKE_DIR_CMD = $$sprintf($$QMAKE_MKDIR_CMD, $$shell_quote($$shell_path($$PWD/qt3d-runtime/.git))) - $$system("$$MAKE_DIR_CMD") - } - } -} diff --git a/src/Runtime/qt3d-runtime b/src/Runtime/qt3d-runtime deleted file mode 160000 -Subproject bd083f50691e35ac0ab572ebc92fe15dae2f298 |