diff options
author | Marco Martin <mart@kde.org> | 2015-07-17 10:59:15 +0200 |
---|---|---|
committer | Marco Martin <mart@kde.org> | 2015-07-29 14:15:09 +0000 |
commit | 560fa0b9ec9ac0af53baf717ff83a51f1cd0762b (patch) | |
tree | fa504c534ef1eb4167c20eae8ddac291b3e49b91 /src/controls/Private/qquickcontrolsettings.cpp | |
parent | e5759d6ab10b4da9bed939ab4b4dfe61c64272ce (diff) | |
download | qtquickcontrols-560fa0b9ec9ac0af53baf717ff83a51f1cd0762b.tar.gz |
Allow any platform to have isMobile true
don't hardcode the isMobile property of the controls settings.
Allow other platforms such as plain Linux or Windows to behave as full
mobile controls using the QT_QUICK_CONTROLS_MOBILE environmant variable
[ChangeLog][QtQuick.Controls] introducing QT_QUICK_CONTROLS_MOBILE
makes possible for normal Linux systems to have QtQuickControls
behaving as a mobile platform
Change-Id: I4c96104334864855e9cf0a8f71125102f178b423
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
Diffstat (limited to 'src/controls/Private/qquickcontrolsettings.cpp')
-rw-r--r-- | src/controls/Private/qquickcontrolsettings.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/controls/Private/qquickcontrolsettings.cpp b/src/controls/Private/qquickcontrolsettings.cpp index faebdaaf..7e6393a8 100644 --- a/src/controls/Private/qquickcontrolsettings.cpp +++ b/src/controls/Private/qquickcontrolsettings.cpp @@ -97,6 +97,9 @@ 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 + if (qEnvironmentVariableIsSet("QT_QUICK_CONTROLS_MOBILE")) { + return true; + } return false; #endif } |