summaryrefslogtreecommitdiffstats
path: root/basicsuite/shared/main.cpp
diff options
context:
space:
mode:
authorKalle Viironen <kalle.viironen@digia.com>2014-04-15 15:10:27 +0300
committerKalle Viironen <kalle.viironen@digia.com>2014-04-15 15:10:38 +0300
commitd757a8ee2d86c3f4b694f8fdff5defa7b0dbab75 (patch)
tree27b30b37643ebfe4615d7eb645b72cd42a4316cb /basicsuite/shared/main.cpp
parent80c1335ec02c038329603486315d06d7bddc1326 (diff)
parent63d998641077d9074281f402ae7becb41c037a2c (diff)
Merge branch 'stable' into releaseQtEE_v2.1.0
* stable: (21 commits) Revert "Show PieMenu in enterprise controls list view." Show PieMenu in enterprise controls list view. Fix PieMenu not showing in enterprise-gallery launcher demo. Update enterprise controls demos to version 1.1 Revert "Add input field for decimal numbers" Doc: Update documentation version to 2.1.0 [launchersettings] Fix UI scaling [about-b2qt] Use Screen element for setting width/height Change default font for demos to support arabic numbers [launchersettings] Small fixes in wifi settings section sensorexplorer: Use identifier field when description is empty Make sensors demo not rely on measurement errors Doc: Update screenshot for the textinput demo Remove incorrect assingment of QUrl to bool qt5-everywhere: update working radio playlist Show launchersettings and sensors demos in QtCreator Doc: Switch to use the global Qt template for example docs Updated preview_l.jpg for textinput demo Rearrange the order of demos in the launcher Merge updates from upstream into keyboard example ... Change-Id: I83f65cb50cf53609d9bb131c94c3d020882a2ccd
Diffstat (limited to 'basicsuite/shared/main.cpp')
-rw-r--r--basicsuite/shared/main.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/basicsuite/shared/main.cpp b/basicsuite/shared/main.cpp
index 808d5df..d33b09c 100644
--- a/basicsuite/shared/main.cpp
+++ b/basicsuite/shared/main.cpp
@@ -25,6 +25,9 @@
#include <QtGui/QPalette>
#include <QtCore/QRegExp>
+#if (QT_VERSION < QT_VERSION_CHECK(5, 3, 0))
+#include <QtQuick/QQuickItem>
+#endif
#include <QtQuick/QQuickView>
#include <QtQml/QQmlEngine>
@@ -57,10 +60,10 @@ int main(int argc, char **argv)
excludeFile.close();
}
- QString fontName = QStringLiteral("/system/lib/fonts/OpenSans-Regular.ttf");
+ QString fontName = QStringLiteral("/system/lib/fonts/DejaVuSans.ttf");
if (QFile::exists(fontName)) {
QFontDatabase::addApplicationFont(fontName);
- QFont font("Open Sans");
+ QFont font("DejaVu Sans");
font.setPixelSize(12);
QGuiApplication::setFont(font);
} else {
@@ -70,6 +73,11 @@ int main(int argc, char **argv)
}
QQuickView view;
+#if (QT_VERSION < QT_VERSION_CHECK(5, 3, 0))
+ // Ensure the width and height are valid because of QTBUG-36938.
+ QObject::connect(&view, SIGNAL(widthChanged(int)), view.contentItem(), SLOT(setWidth(int)));
+ QObject::connect(&view, SIGNAL(heightChanged(int)), view.contentItem(), SLOT(setHeight(int)));
+#endif
DummyEngine engine;
view.rootContext()->setContextProperty("engine", &engine);