summaryrefslogtreecommitdiffstats
path: root/src/Authoring/Qt3DStudio/PreviewHelper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Authoring/Qt3DStudio/PreviewHelper.cpp')
-rw-r--r--src/Authoring/Qt3DStudio/PreviewHelper.cpp23
1 files changed, 10 insertions, 13 deletions
diff --git a/src/Authoring/Qt3DStudio/PreviewHelper.cpp b/src/Authoring/Qt3DStudio/PreviewHelper.cpp
index 56d08804..24d7ee91 100644
--- a/src/Authoring/Qt3DStudio/PreviewHelper.cpp
+++ b/src/Authoring/Qt3DStudio/PreviewHelper.cpp
@@ -62,7 +62,7 @@ void CPreviewHelper::OnPreview(const QString &viewerExeName)
Q3DStudio::CBuildConfigurations &theConfigurations =
g_StudioApp.GetCore()->GetBuildConfigurations();
Q3DStudio::CBuildConfiguration *theBuildConfiguration =
- theConfigurations.GetConfiguration(CStudioPreferences::GetPreviewConfig());
+ theConfigurations.GetConfiguration(CStudioPreferences::previewConfig());
if (theBuildConfiguration)
PreviewViaConfig(theBuildConfiguration, EXECMODE_PREVIEW, viewerExeName);
}
@@ -76,7 +76,7 @@ void CPreviewHelper::OnDeploy(RemoteDeploymentSender &project)
Q3DStudio::CBuildConfigurations &theConfigurations =
g_StudioApp.GetCore()->GetBuildConfigurations();
Q3DStudio::CBuildConfiguration *theBuildConfiguration =
- theConfigurations.GetConfiguration(CStudioPreferences::GetPreviewConfig());
+ theConfigurations.GetConfiguration(CStudioPreferences::previewConfig());
if (theBuildConfiguration) {
// ItemDataPtr != nullptr ==> Build configurations specified NANT pipeline exporter
PreviewViaConfig(theBuildConfiguration, EXECMODE_DEPLOY, QString(), &project);
@@ -118,18 +118,15 @@ QString CPreviewHelper::getViewerFilePath(const QString &exeName)
viewerFile = QStringLiteral("%1.exe").arg(exeName);
QString viewer = viewerDir.filePath() + QStringLiteral("/") + viewerFile;
- if (!QFileInfo(viewer).exists()
- && exeName == QLatin1String("q3dsviewer")) {
- viewer = viewerDir.filePath() + QStringLiteral("/../src/Runtime/qt3d-runtime/bin/")
+ if (!QFileInfo(viewer).exists() && exeName == QLatin1String("Qt3DViewer")) {
+ viewer = viewerDir.filePath() + QStringLiteral("/../src/Runtime/ogl-runtime/bin/")
+ viewerFile;
}
#else
#ifdef Q_OS_MACOS
- // Check if we're looking for Viewer 2.x that has a different development
- // time path for the executable
QString viewerDevPath;
- if (exeName == QLatin1String("q3dsviewer"))
- viewerDevPath = QStringLiteral("../src/Runtime/qt3d-runtime/bin/");
+ if (exeName == QLatin1String("Qt3DViewer"))
+ viewerDevPath = QStringLiteral("../src/Runtime/ogl-runtime/bin/");
// Name of the executable file on macOS
viewerFile = QStringLiteral("%1.app/Contents/MacOS/%1").arg(exeName);
@@ -151,9 +148,8 @@ QString CPreviewHelper::getViewerFilePath(const QString &exeName)
viewerFile = exeName;
QString viewer = viewerDir.filePath() + QStringLiteral("/") + viewerFile;
- if (!QFileInfo(viewer).exists()
- && exeName == QLatin1String("q3dsviewer")) {
- viewer = viewerDir.filePath() + QStringLiteral("/../src/Runtime/qt3d-runtime/bin/")
+ if (!QFileInfo(viewer).exists() && exeName == QLatin1String("Qt3DViewer")) {
+ viewer = viewerDir.filePath() + QStringLiteral("/../src/Runtime/ogl-runtime/bin/")
+ viewerFile;
}
#endif
@@ -202,7 +198,8 @@ void CPreviewHelper::DoPreviewViaConfig(Q3DStudio::CBuildConfiguration * /*inSel
Q_ASSERT(project);
project->streamProject(inDocumentFile);
} else if (inMode == EXECMODE_PREVIEW
- && CStudioPreferences::GetPreviewProperty("PLATFORM") == "PC") {
+ && CStudioPreferences::previewProperty(QStringLiteral("PLATFORM"))
+ == QLatin1String("PC")) {
// Quick Preview on PC without going via NANT
QString theCommandStr = getViewerFilePath(viewerExeName);
QString *pDocStr = new QString(inDocumentFile);