diff options
author | Kalle Viironen <kalle.viironen@digia.com> | 2014-04-16 09:37:12 +0300 |
---|---|---|
committer | Kalle Viironen <kalle.viironen@digia.com> | 2014-04-16 09:37:28 +0300 |
commit | 748cff4efc54cf6e4b89af8f248ef8f790533277 (patch) | |
tree | 11c9040b665dfc88eae551a28db5eb256ca89641 | |
parent | 309b4b6d5a4345c5304f965b9565e844e8f8beee (diff) | |
parent | a434432cbac6fba59dd56b3370fd1f67e5aa48a0 (diff) |
Merge branch 'stable' into dev
* stable:
Fix PieMenu not showing in enterprise-gallery launcher demo.
Change default font for qtlauncher to support arabic numbers
Change-Id: I25eb05c34f6cfae6cc38b1faa327cecf0bba75a3
-rw-r--r-- | src/main.cpp | 12 |
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); |