summaryrefslogtreecommitdiffstats
path: root/basicsuite
diff options
context:
space:
mode:
authorJuho Annunen <juho.annunen@qt.io>2018-08-29 12:45:14 +0300
committerJuho Annunen <juho.annunen@qt.io>2018-08-29 10:55:16 +0000
commitf730907fcfeb2548554f291025f2991598df8fda (patch)
tree50f59437747535d9260df654eb893917d76922f4 /basicsuite
parent09aa32dd522176a9b9762e4d85b3e8c66d4d6be2 (diff)
Fix mediaplayer default video path
Task-number: QTBUG-70198 Change-Id: If07b7e618e109893ab19cf1c7147c98e5ae8f17f Reviewed-by: Mikko Gronoff <mikko.gronoff@qt.io> Reviewed-by: Teemu Holappa <teemu.holappa@qt.io>
Diffstat (limited to 'basicsuite')
-rw-r--r--basicsuite/shared/main.cpp22
1 files changed, 9 insertions, 13 deletions
diff --git a/basicsuite/shared/main.cpp b/basicsuite/shared/main.cpp
index d22ea8a..e07e09c 100644
--- a/basicsuite/shared/main.cpp
+++ b/basicsuite/shared/main.cpp
@@ -135,10 +135,6 @@ int main(int argc, char **argv)
QGuiApplication::setFont(font);
}
- QString videosPath = QStringLiteral("file://");
- QString defaultVideoUrl = QStringLiteral("file:///data/videos/Qt_video_720p.webm");
- videosPath.append("/data/videos");
-
QSettings styleSettings;
QString style = styleSettings.value("style").toString();
if (style.isEmpty() || style == "Default")
@@ -153,17 +149,17 @@ int main(int argc, char **argv)
applicationengine.rootContext()->setContextProperty("appFont", appFont);
applicationengine.rootContext()->setContextProperty("availableStyles", QQuickStyle::availableStyles());
- applicationengine.rootContext()->setContextProperty("VideosLocation", videosPath);
- applicationengine.rootContext()->setContextProperty("DefaultVideoUrl", defaultVideoUrl);
+ QSettings demoSettings("Boot2Qt-demos", "demoSettings");
- QSettings themeColorSettings("QtLauncher", "colorSettings");
+ applicationengine.rootContext()->setContextProperty("_backgroundColor", demoSettings.value("backgroundColor", "#09102b"));
+ applicationengine.rootContext()->setContextProperty("_primaryGreen", demoSettings.value("primaryGreen", "#41cd52"));
+ applicationengine.rootContext()->setContextProperty("_mediumGreen", demoSettings.value("mediumGreen", "#21be2b"));
+ applicationengine.rootContext()->setContextProperty("_darkGreen", demoSettings.value("darkGreen", "#17a81a"));
+ applicationengine.rootContext()->setContextProperty("_primaryGrey", demoSettings.value("primaryGrey", "#9d9faa"));
+ applicationengine.rootContext()->setContextProperty("_secondaryGrey", demoSettings.value("secondaryGrey", "#3a4055"));
- applicationengine.rootContext()->setContextProperty("_backgroundColor", themeColorSettings.value("backgroundColor", "#09102b"));
- applicationengine.rootContext()->setContextProperty("_primaryGreen", themeColorSettings.value("primaryGreen", "#41cd52"));
- applicationengine.rootContext()->setContextProperty("_mediumGreen", themeColorSettings.value("mediumGreen", "#21be2b"));
- applicationengine.rootContext()->setContextProperty("_darkGreen", themeColorSettings.value("darkGreen", "#17a81a"));
- applicationengine.rootContext()->setContextProperty("_primaryGrey", themeColorSettings.value("primaryGrey", "#9d9faa"));
- applicationengine.rootContext()->setContextProperty("_secondaryGrey", themeColorSettings.value("secondaryGrey", "#3a4055"));
+ applicationengine.rootContext()->setContextProperty("VideosLocation", demoSettings.value("videosLocation", "file:///data/videos"));
+ applicationengine.rootContext()->setContextProperty("DefaultVideoUrl", demoSettings.value("defaultVideoUrl", "file:///data/videos/Qt+for+Designers+and+Developers.mp4"));
applicationengine.load(QUrl::fromLocalFile(path + "/SharedMain.qml"));