summaryrefslogtreecommitdiff
path: root/src/controls/Private/qquickcontrolsettings.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix button menus not opening on the second attemptv5.12.0-rc2v5.12.05.12.0Mitch Curtis2018-11-271-1/+1
| | | | | | | | | | | | Assign a parent to the QQmlComponent returned by QQuickControlSettings1::styleComponent() so that it doesn't get garbage collected by the QML engine. This was not an issue until 5.12, but it seems like a good idea regardless. Change-Id: I53265b23afab62e2276fe6e10d976a93a4f12e6f Fixes: QTBUG-71238 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Pick the default style name at runtime instead of compile timeJake Petroules2017-11-211-12/+24
| | | | | | | | | | | | Instead of a naïve OS-based compile time check, we check which platform plugin is in use at runtime. This should give a more accurate mapping, especially on desktop OSes using alternative platform plugins where the Desktop style is not useful. The minimum Android SDK version is 16 now, so the check is removed. Change-Id: Ie7af3a8ce5fd031256f5eba9706f24ab50a23bf9 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* Check for empty style returned from environmentFriedemann Kleint2017-09-051-1/+1
| | | | | | | | | | Fix warning "Empty filename passed to function" when running Qt Creator 4.4 against Qt 5.10 (see qtbase: 0dee566e98f5ff4f224e596de1c04de4f9685df4). Change-Id: I0b71a873245a28ef972c105e7d41347e6b0fb38a Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Support for Q_OS_ANDROID_EMBEDDED and android-embedded buildsOtto Ryynänen2017-06-011-2/+2
| | | | | | | | | | | The Embedded Android build (Boot to Qt Android injection) is defined by having both Q_OS_ANDROID and Q_OS_ANDROID_EMBEDDED flags defined, as well as having Qt config android-embedded. This commit enables the possibility to build embedded Android builds. (i.e. Qt build for Android baselayer only, without JNI) Change-Id: Ic825e034f8d4b39c45e03b9f0a965f126559991e Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Fix build with -no-feature-libraryPaul Olav Tvete2017-03-201-0/+2
| | | | | Change-Id: I310e90ec92b81939df11accb4cb6b1bd25df472e Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Build fix for -no-feature-libraryPaul Olav Tvete2017-03-031-2/+3
| | | | | Change-Id: I9339b134c8025e9f3e44933121e339a3107ad975 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Find custom styles from custom paths when set afterwardsDavid Faure2016-07-061-0/+5
| | | | | | | | | This fixes the very frequent warning from plasmashell: WARNING: Cannot find style "Plasma" Change-Id: Ibe853e7b8b42adc2bce7c63a1505b27898ea5ffc Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Find custom styles stored in qrc.David Faure2016-07-061-13/+25
| | | | | | | | | | | | | | The unittest was showing that it was looking in <CURRENTDIR>/qrc:/qt-project.org/imports/QtQuick/Controls/Styles which makes no sense. In addition, the code was only listing the directory where the default style is found. When the custom style is elsewhere, it needs to be looked up in addition. Change-Id: I93eddab73672c575cd92037e1d0b366cf17540ef Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-05-101-5/+0
|\ | | | | | | | | | | | | | | Conflicts: examples/quickcontrols/extras/flat/main.cpp src/controls/Private/qquickcontrolsettings.cpp Change-Id: I9eb9342a2ee994611f3cb18daab6dd89eb924ccc
| * QQuickControlSettings (Android): check touch devicesAnton Kudryavtsev2016-05-031-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | It's needed for Android devices that have not touch screen, e.g STB. QTBUG-36007 is already resolved and we can use QTouchDevice::devices() Task-number: QTBUG-36007 Task-number: QTBUG-53095 Change-Id: Iaab89cc75238d1aba83ce3d79f3c29fb5cab172f Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com> Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Remove the traces of the discontinued android-no-sdk platformEirik Aavitsland2016-04-291-2/+2
| | | | | | | | | | Change-Id: I63e4e2b807e7b222a589a5e03d510acfe1d97511 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | Add support for QT_QUICK_CONTROLS_1_STYLEJ-P Nurmi2016-04-221-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | Takes priority over QT_QUICK_CONTROLS_STYLE to allow specifying system wide style name preferences separately for Qt Quick Controls 1 and 2. [ChangeLog][Controls] Added support for a QT_QUICK_CONTROLS_1_STYLE environment variable, which takes priority over the existing variable QT_QUICK_CONTROLS_STYLE. This allows specifying system wide style name preferences separately for Qt Quick Controls 1 and 2. Change-Id: I0e40c2790c24b7ef66b1995b8337e573bb2f75a2 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* | Fix unused variable warnings in static buildsMitch Curtis2016-03-181-0/+2
| | | | | | | | | | | | | | The warnings are a result of b4c13916ec0fd7796acdf0ec5a1db0134479b3f2. Change-Id: I0b6a22d0fb3b7258ebfa905015f13d0474ac5b09 Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
* | Controls: append "1" to all C++ classesMitch Curtis2016-03-181-17/+17
| | | | | | | | | | | | | | | | | | | | This is consistent with the classes that have already had this done. It prevents clashes with Qt Quick Controls 2. These classes are not available to the user, so it doesn't affect compatibility. Change-Id: Iee73ee6bc530182732ae95993e1f4fc3766eb8e0 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* | Enable using the module in a statically built applicationAndy Shaw2016-03-151-0/+14
| | | | | | | | | | | | | | Task-number: QTBUG-35754 Task-number: QTBUG-45868 Change-Id: I9bb332bc85713a17f02f3e7e768592e3234edfe3 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* | Unify license header usageAntti Kokko2016-02-041-12/+15
| | | | | | | | | | | | | | Update old header.LGPL3 to header.LGPL Change-Id: I3c851bc24da89f6300b94199387d1adf16ca4f48 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2016-01-211-1/+1
|\ \ | |/ | | | | | | | | | | Conflicts: src/controls/qquickmenubar.cpp Change-Id: I4b036212b6dadded2c4d60dd07e91f629e80d9c2
| * Controls: replace QStringLiteral with QLatin1StringAnton Kudryavtsev2016-01-191-1/+1
| | | | | | | | | | | | | | ... in string comparisons. It's more effective. Change-Id: Ibba6d78bbea4308d9a84da08ba4688ea93d58c6c Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* | Replace foreach with range-based forAnton Kudryavtsev2016-01-161-4/+8
|/ | | | | Change-Id: Ieb9019b62696479a4e0317a590bceaeb30abf62c Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.5' into devFrederik Gladhorn2015-08-091-0/+1
|\ | | | | | | Change-Id: Ifec0f56816809abb90a294b8462391cb7e54c87d
| * Make QtQuickControls compile on WinCETobias Koenig2015-08-061-0/+1
| | | | | | | | | | | | | | | | | | | | Add the missing includes and helper functions to make the QtQuickControls module compile on WinCE Change-Id: I3c614de295c0db616543953a142d796e58a9a11c Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com> Reviewed-by: Gunnar Roth Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* | Allow any platform to have isMobile trueMarco Martin2015-07-291-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Pass non-trivially-copyable or large types by const-refSergio Martins2015-07-221-1/+1
|/ | | | | | | Change-Id: I38af4720b916731451cb28aee0d16eed097d3350 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* WinRT: fix style loading from plugin/libraryJochen Seemann2015-04-071-0/+1
| | | | | | | | | | | | qt_quick_controls_style_path doesn't store the complete path to the style dir on WinRT. Since f0c227f8a9a5c5e3ed83f86702626092457175aa, m_name (="WinRT") is not appended anymore. Also, m_path is not set when loading style from a plugin/library. Task-number: QTBUG-44880 Change-Id: I4e5c6503984e70cb9ad74e57e0f1c5a63211f510 Reviewed-by: Andrew Knight <qt@panimo.net> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
* WinRT: Disable native stylev5.5.0-alpha1Maurice Kalinowski2015-03-111-1/+1
| | | | | | | | The style is not ready yet, hence we disable it by default. Task-number: QTBUG-44880 Change-Id: I24e2198ad13a4a3e3231508de105cc10b86e87dc Reviewed-by: Andrew Knight <qt@panimo.net>
* Fix style not always loaded properly from pluginCaroline Chao2015-03-101-10/+6
| | | | | | | | When the plugin does not have the qt_quick_controls_style_init and qt_quick_controls_style_path functions. Change-Id: Iea091b1444e6437b9e81db810db445ede50a2365 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Merge Extras' styling system into Controls'.Mitch Curtis2015-03-021-38/+152
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Removes the duplicated style settings functionality in Extras and simplifies the installed styles directory structure. - Extras' Base style is now part of Controls' Base style, eliminating the need for a separate QtQuick.Extras.Styles import. The cost of doing this should be negligible: a few QML files and two images. If we didn't merge Extras' Baste style into Controls', we'd need extras-specific code in qquickcontrolssettings, as the default style search path is: qml/QtQuick/Controls/Styles/ Whereas the Extras Base style would be in: qml/QtQuick/Extras/Styles/ The Extras Base style can't go into Controls' Base style directory, either, because otherwise we'd have two qmldir files there. The Flat style doesn't have this problem because it is all contained in one plugin and gets installed into its own Flat/ folder. - Documentation now lists the Extras controls as \since QtQuick.Extras 1.4. - Adds the customcontrolsstyle auto test to ensure that custom styling is tested. Change-Id: I19ca7a8b7e1c1daa85b272f4ccf9a2f05c76e0d9 Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com> Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.4' into devJ-P Nurmi2015-02-121-0/+5
|\ | | | | | | | | | | | | | | Conflicts: src/controls/TableView.qml tests/auto/controls/data/tst_gridlayout.qml Change-Id: I030bc50dc8fcf7b6b00e183dc3a67c3cd012f3fb
| * Disable hover on touchJ-P Nurmi2015-02-041-0/+5
| | | | | | | | | | | | Task-number: QTBUG-44267 Change-Id: I467f08ae6c5264b7e858022af9ff293117434018 Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com>
* | Controls: update license headersJ-P Nurmi2015-02-111-15/+18
| | | | | | | | | | | | | | Change-Id: I77e7a218a958d76ac7ef7780f4be52a81f76fa6b Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com> Reviewed-by: Mitch Curtis <mitch.curtis@digia.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.4' into devJ-P Nurmi2015-01-161-2/+25
|\ \ | |/ | | | | | | | | | | | | Conflicts: .qmake.conf tests/auto/controls/data/tst_stackview.qml Change-Id: I54b55d51452e812315f97bcdfd1a8e361a427f56
| * Let style plugins bundle resourcesJ-P Nurmi2015-01-151-1/+20
| | | | | | | | | | | | | | | | | | | | | | Add internal hooks that get called for style plugins that implement them. The hooks allow standalone style bundles to initialize their resources (to make them visible to controls) and to specify the QRC location of its QML files, eg. qrc:/path/to/Style. Change-Id: I29c4e337e893f7aa65af7b05ff467e15bc84bf43 Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com> Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
| * Android: check the minimum required SDK version (11)J-P Nurmi2014-10-131-1/+5
| | | | | | | | | | | | | | Use the Base style as a fallback when the requirement is not met. Change-Id: I0db2edae8576ffaad3ac3a78fcf3de8e73fdb750 Reviewed-by: BogDan Vatra <bogdan@kde.org>
* | Clean up path vs url when handling the style importCaroline Chao2015-01-061-9/+14
| | | | | | | | | | | | | | | | | | | | Cleaned up path vs. url handling. styleImportPath now always returns a _path_, previously it returned a url ("qrc:/foo") or a path ("/foo"). style now always returns an _url_. Change-Id: I213ffdf8e88056f5706946c030aa4249e53fa709 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* | Merge "Merge remote-tracking branch 'origin/5.4' into dev" into refs/staging/devJ-P Nurmi2014-10-011-20/+21
|\ \ | |/
| * Default to Text.QtRendering on mobile platformsJ-P Nurmi2014-09-191-0/+9
| | | | | | | | | | Change-Id: I9aa23691aa8bb4659545ed43c1506128a639ff6c Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
| * Add iOS style stub (NOTE: cherry-pick of faa5f59)J-P Nurmi2014-09-181-0/+2
| | | | | | | | | | | | | | | | | | | | The current look and feel on iOS (with the default Base style) is terrible. This commit alone doesn't change anything, but it allows us to do minor iOS-specific tweaks that will greatly improve the usability on iOS already in Qt 5.4. Change-Id: I86764dd92bdfaae8170a8cd6709177a9a064cda8 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
| * Fallback to the Base style when no Android SDK is availableJ-P Nurmi2014-09-101-1/+1
| | | | | | | | | | Change-Id: If85142225e1d0f8a0f7dc4e49757d6a1403a730c Reviewed-by: Andras Becsi <andras.becsi@digia.com>
| * Update license headers and add new license filesAntti Kokko2014-08-251-19/+11
| | | | | | | | | | | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 & LICENSE.GPLv2 - Removed LICENSE.GPL Change-Id: I470909ba0980db33ab551790d619c59a35978590 Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
* | Add WinRT style stubJochen Seemann2014-09-301-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | The goal is to have a QtQC style for WinRT with Qt 5.5. It includes two separate styles: for Windows 8.1 (PC) and Windows Phone 8.1 (Phone). This commit doesn't change anything, but makes it easy to add the control styles gradually. Change-Id: I0e34666622cda0a16e71d02cef1d19d3eb2483c1 Reviewed-by: Andrew Knight <andrew.knight@digia.com> Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* | Add iOS style stubJ-P Nurmi2014-09-021-0/+2
|/ | | | | Change-Id: I47839d44345f589f01fcec9154c2c83c93bd3285 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Merge remote-tracking branch 'origin/5.3' into 5.4Frederik Gladhorn2014-08-121-1/+1
|\ | | | | | | Change-Id: I9253c87c3bd54204401070f492c7590166be0fe3
| * Make the default style "Base" when built without widgets supportJ-P Nurmi2014-07-291-1/+1
| | | | | | | | | | | | | | | | It is possible to have qtwidgets installed but qtquickcontrols built without a dependency to qtwidgets. Change-Id: Ic6f640e352984d38d9020011078fe061ff46acac Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* | Android styleJ-P Nurmi2014-08-071-0/+2
|/ | | | | | | | | Note: Requires Android 3.0 (API level 11) or later. Task-number: QTBUG-35081 Change-Id: Id7a4577a4d78c9474c9ccd7ae754e16fcac8f0e5 Reviewed-by: BogDan Vatra <bogdan@kde.org> Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* Allow QT_QUICK_CONTROLS_STYLE pointing to resourcesJ-P Nurmi2014-07-031-1/+3
| | | | | | Change-Id: I4cf6e040c8ac5bc2e8ba1838f22cb5b1cd776f85 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com> Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* Cleanup whitespaceJ-P Nurmi2014-06-241-1/+1
| | | | | Change-Id: I9e84ce56e853a18205aa180cef1ee8ff4f2f678c Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* Remove QtWidgets dependency for WinRTJ-P Nurmi2014-06-241-1/+1
| | | | | Change-Id: Ifacceae8690d2ab4dfaed0d5439b9e29804c1943 Reviewed-by: Andrew Knight <andrew.knight@digia.com>
* Remove Widgets dependency for QNXAndreas Holzammer2014-06-241-1/+1
| | | | | | | | | Changes.txt says that with Qt 5.2.0 dependency for Widgets have been removed for touch based platforms. But QNX is also a touch based platform and its missing. Change-Id: I140842d4501422537175ac5acb07beebe994f0eb Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Slider: don't prevent stealing until drag threshold is exceededShawn Rutledge2014-03-181-0/+7
| | | | | | | | | | | | | | | If a Slider is placed in a Flickable (or ListView, etc.), preventStealing means that you cannot flick the flickable by dragging over the Slider. It's better to postpone setting that until we detect whether the user is really attempting to drag the slider, because we don't want to rule out use cases such as vertical sliders in a horizontal ListView or vice-versa, so that you drag in one direction to move the slider and in another direction to flick. Platform drag threshold is exposed in Settings (from QStyleHints). (reverts/refines c9665f3e2d1eb12f1cc5a569c20f5d569fafde7f) Change-Id: I82feda6028f6effa5b26ad575a1933e48e971453 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Settings.hasTouchScreen checks the QTouchDevicesShawn Rutledge2014-01-131-1/+6
| | | | | | | | | | | | | This should be more reliable than making assumptions based only on the platform screen. This also means that ultrabooks, desktops etc. which have multiple input devices including a touchscreen will have touch optimizations. However due to QTBUG-36007 it's still necessary to check for the platforms that do not create QTouchDevices properly at startup. Change-Id: I6cc0408b472af16580e91509eb4cbc420a263871 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>