diff options
author | J-P Nurmi <jpnurmi@digia.com> | 2014-09-18 16:48:25 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@digia.com> | 2014-09-19 12:24:18 +0200 |
commit | 332ef31f0d1645eded5588729176134bbdcd38a2 (patch) | |
tree | 71091684801a123a6b748eb21a51d813943bd3b1 /src/controls/Private | |
parent | 85114be06703e7675b6c780776e45c14a69a5c2d (diff) | |
download | qtquickcontrols-332ef31f0d1645eded5588729176134bbdcd38a2.tar.gz |
Default to Text.QtRendering on mobile platforms
Change-Id: I9aa23691aa8bb4659545ed43c1506128a639ff6c
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Diffstat (limited to 'src/controls/Private')
-rw-r--r-- | src/controls/Private/qquickcontrolsettings.cpp | 9 | ||||
-rw-r--r-- | src/controls/Private/qquickcontrolsettings_p.h | 2 |
2 files changed, 11 insertions, 0 deletions
diff --git a/src/controls/Private/qquickcontrolsettings.cpp b/src/controls/Private/qquickcontrolsettings.cpp index ee1b57df..f05df0d5 100644 --- a/src/controls/Private/qquickcontrolsettings.cpp +++ b/src/controls/Private/qquickcontrolsettings.cpp @@ -82,6 +82,15 @@ bool QQuickControlSettings::hasTouchScreen() const #endif } +bool QQuickControlSettings::isMobile() const +{ +#if defined(Q_OS_IOS) || defined(Q_OS_ANDROID) || defined(Q_OS_BLACKBERRY) || defined(Q_OS_QNX) || defined(Q_OS_WINRT) + return true; +#else + return false; +#endif +} + static QString styleImportPath(QQmlEngine *engine, const QString &styleName) { QString path = qgetenv("QT_QUICK_CONTROLS_STYLE"); diff --git a/src/controls/Private/qquickcontrolsettings_p.h b/src/controls/Private/qquickcontrolsettings_p.h index 3f90862f..72a1ca6a 100644 --- a/src/controls/Private/qquickcontrolsettings_p.h +++ b/src/controls/Private/qquickcontrolsettings_p.h @@ -50,6 +50,7 @@ class QQuickControlSettings : public QObject Q_PROPERTY(qreal dpiScaleFactor READ dpiScaleFactor CONSTANT) Q_PROPERTY(qreal dragThreshold READ dragThreshold CONSTANT) Q_PROPERTY(bool hasTouchScreen READ hasTouchScreen CONSTANT) + Q_PROPERTY(bool isMobile READ isMobile CONSTANT) public: QQuickControlSettings(QQmlEngine *engine); @@ -66,6 +67,7 @@ public: qreal dragThreshold() const; bool hasTouchScreen() const; + bool isMobile() const; signals: void styleChanged(); |