summaryrefslogtreecommitdiff
path: root/src/controls/Private/qquickcontrolsettings.cpp
diff options
context:
space:
mode:
authorMarco Martin <mart@kde.org>2015-07-17 10:59:15 +0200
committerMarco Martin <mart@kde.org>2015-07-29 14:15:09 +0000
commit560fa0b9ec9ac0af53baf717ff83a51f1cd0762b (patch)
treefa504c534ef1eb4167c20eae8ddac291b3e49b91 /src/controls/Private/qquickcontrolsettings.cpp
parente5759d6ab10b4da9bed939ab4b4dfe61c64272ce (diff)
downloadqtquickcontrols-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.cpp3
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
}