summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKalle Viironen <kalle.viironen@digia.com>2014-04-15 15:11:13 +0300
committerKalle Viironen <kalle.viironen@digia.com>2014-04-15 15:11:29 +0300
commit34bf5aeee929308c825395d6ddb8e62772bbf0cf (patch)
tree11c9040b665dfc88eae551a28db5eb256ca89641
parentacd4d4a32a075de26e6f03e7a33e3cb908895c11 (diff)
parenta434432cbac6fba59dd56b3370fd1f67e5aa48a0 (diff)
Merge branch 'stable' into releaseQtEE_v2.1.0
* stable: Fix PieMenu not showing in enterprise-gallery launcher demo. Change default font for qtlauncher to support arabic numbers Change-Id: I2f14609bd2a96b201b56b16c43e82aa394cafa8d
-rw-r--r--src/main.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 3417d14..60ec4d7 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -23,6 +23,9 @@
#include <QtGui/QScreen>
#include <QtGui/QPalette>
+#if (QT_VERSION < QT_VERSION_CHECK(5, 3, 0))
+#include <QtQuick/QQuickItem>
+#endif
#include <QtQuick/QQuickView>
#include <QtQml/QQmlEngine>
@@ -68,10 +71,10 @@ int main(int argc, char **argv)
pal.setColor(QPalette::Base, Qt::white);
QGuiApplication::setPalette(pal);
- 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 {
@@ -126,6 +129,11 @@ int main(int argc, char **argv)
qDebug() << "Log redirection:" << (logcat ? "yes" : "no");
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
Engine engine;
engine.setWindow(&view);