From 5d498744d0590a0b2d6af68137b344d5415610fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pasi=20Pet=C3=A4j=C3=A4j=C3=A4rvi?= Date: Tue, 8 Apr 2014 14:05:31 +0300 Subject: Change default font for demos to support arabic numbers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Demos itself did use the wrong font when virtualkeyboard used the correct one. Task-number: QTEE-354 Change-Id: I987b7b6d9c1132c906b6283951bbe46d38237a3d Reviewed-by: Topi Reiniƶ --- basicsuite/shared/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'basicsuite/shared/main.cpp') diff --git a/basicsuite/shared/main.cpp b/basicsuite/shared/main.cpp index 808d5df..25c3cb4 100644 --- a/basicsuite/shared/main.cpp +++ b/basicsuite/shared/main.cpp @@ -57,10 +57,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 { -- cgit v1.2.3 From 89ce36fca455bf2babf3eae772ca21ce140cf16d Mon Sep 17 00:00:00 2001 From: Mitch Curtis Date: Fri, 11 Apr 2014 14:20:48 +0200 Subject: Fix PieMenu not showing in enterprise-gallery launcher demo. The problem is that the root item doesn't get the correct size - or any size for that matter - so it is never visible. The fix for this is already in Qt 5.3 (see QTBUG-36938), but we can still work around it for earlier versions with this fix. Task-number: QTRD-3040 Change-Id: I38a5f793cf1cc07a758d9118c31bc3177a75da54 Reviewed-by: Samuli Piippo Reviewed-by: Kalle Viironen Reviewed-by: Gatis Paeglis --- basicsuite/shared/main.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'basicsuite/shared/main.cpp') diff --git a/basicsuite/shared/main.cpp b/basicsuite/shared/main.cpp index 25c3cb4..d33b09c 100644 --- a/basicsuite/shared/main.cpp +++ b/basicsuite/shared/main.cpp @@ -25,6 +25,9 @@ #include #include +#if (QT_VERSION < QT_VERSION_CHECK(5, 3, 0)) +#include +#endif #include #include @@ -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); -- cgit v1.2.3