aboutsummaryrefslogtreecommitdiffstats
path: root/src/quickcontrols2/qquickstyle.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Update commercial license headers"v5.15.3-lts-lgplTarja Sundqvist2021-03-221-20/+20
| | | | | | | | | | | This reverts commit 950f8bff7cbbdbd472234fd32ef659c9d0e8ba7c. Revert of commercial license headers is required for Qt 5.15.3 opensource release. Task-number: QTBUG-91108 Change-Id: I69e514934864bea3ccd68de9a65fb08e262325a1 Reviewed-by: Akseli Salovaara <akseli.salovaara@qt.io>
* Update commercial license headersTarja Sundqvist2021-01-221-20/+20
| | | | | | | | | | | | | | | Updated header.COMM to files in tqtc-qtquickcontrols2. Examples, tests or documentation files are not updated. The commercial license header may contain some additional lines so that its line count equals with the earlier license header. Reason for this is that some autotests use hard coded line numbers and a change in the line count causes failures in tests. Task-number: QTQAINFRA-4209 Change-Id: I4175d7a58cb1b04172132a3bc09aea1b065d1778 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Use Qt::SplitBehavior in preference to QString::SplitBehaviorEdward Welbourne2020-03-051-2/+2
| | | | | | | | The Qt version was added in 5.14 "for use as eventual replacement for QString::SplitBehavior." Move another step closer to that goal. Change-Id: I3ed1abd00bf54da654c9ccade427f5756b99b595 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Follow QML2_IMPORT_PATH in path searchDavid Edmundson2020-01-291-0/+1
| | | | | | | | | | | | | When searching for styles we include QLibraryInfo::Qml2ImportsPath so it makes sense to continue that to also include the runtime QML2_IMPORT_PATH when searching for QQC2 themes. It used to be included, but in 5.14 this behavior changed as a result of 7db4df2deca52a30b4c068abd4683a1720cf281e, so this line is restored. Change-Id: I185b29b323d870fc724e655104eaf42034707738 Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Look for the fallback style in all of the style pathsAndy Shaw2020-01-271-1/+7
| | | | | | | Fixes: QTBUG-81216 Change-Id: I9d3efeec7f9ec2beda24ff74e39d04104f5eb967 Reviewed-by: BogDan Vatra <bogdan@kdab.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Include the Android specific path for the importsAndy Shaw2019-11-151-2/+7
| | | | | | | | | | | androiddeployqt will put all the files originally in the assets into a rcc file now instead of having them copied over as before. Therefore the styles need to be searched for in that path to see if they exist. Fixes: QTBUG-79952 Change-Id: Ief8fc59257d3b329dd8b5b28190433e1b1a7f12d Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* Minor performance improvements suggested by clang-tidyAlbert Astals Cid2019-10-071-1/+1
| | | | | | | | * Add const & to function parameters * Add const & to variables assigned from functions that return const & Change-Id: Ibf35e54ffb78f164493222125411f2ba279cb861 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Doc: Replace the "Qt Quick Controls 2" instancesVenugopal Shivashankar2019-08-221-9/+9
| | | | | | | | | Now that Controls 1 is deprecated, it's ideal to use "Qt Quick Controls" instead of "Qt Quick Controls 2". Task-number: QTBUG-70333 Change-Id: Ie745db4b61071ddb5e06150d4e739cda74c59f41 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-07-171-0/+63
|\ | | | | | | | | | | | | | | | | Conflicts: src/quickcontrols2/qquickstyle.cpp src/quicktemplates2/qquickscrollview.cpp tests/auto/qquickstyle/tst_qquickstyle.cpp Change-Id: I9afddf07a956f43cf0445e91b8d1a02f167b6bd5
| * Fix qrc paths in QT_QUICK_CONTROLS_STYLE_PATHMitch Curtis2018-07-161-2/+60
| | | | | | | | | | | | | | | | | | Parse the environment variable manually when the platform's list separator is ':', to avoid issues with qrc paths (which start with ':') not working. Task-number: QTBUG-68219 Change-Id: Ic71d49da5a72a37bc1d2e7b19fbf1de71b3917f3 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | QQuickStyle::addStylePath(): fix support for qrc pathsMitch Curtis2018-06-251-0/+2
| | | | | | | | | | | | | | | | The code lacked handling for the "qrc" scheme. Task-number: QTBUG-68222 Change-Id: Ia0dfdb748b8bdb40c893375b9de77bd8c05986b6 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | Move font/palette reading to QQuickStylePrivateJ-P Nurmi2018-05-161-0/+79
| | | | | | | | | | | | | | | | Instead of moving the code back and forth between different plugins, promote it to QQuickStylePrivate so it can be used from any plugin. Change-Id: Ifb80923750ff531676dc3347dacf0aff8c026fdb Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Fix external styles in static buildsJ-P Nurmi2018-05-141-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a regression caused by d2897a6c. For example, running a statically built Gallery example with the Material style resulted to: QQmlApplicationEngine failed to load component qrc:/gallery.qml:58 Type ApplicationWindow unavailable file:///path/to/QtQuick/Controls.2/Material/qmldir:-1 module "QtQuick.Controls.Material" plugin "qtquickcontrols2materialstyleplugin" not found Even if we install .qml files in static builds (so that people can copy them as a starting point from a Qt for iOS installation), those files must not be loaded in static builds. Previously this case was handled by the QT_STATIC guard in the former typeUrl(), but the special case was missed while taking QQuickStyleSelector into use for the internal types in d2897a6c. Change-Id: Ie4d7956c7eccb0f4e67b6f3a2b5368437636fa78 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devJ-P Nurmi2018-03-231-3/+3
|\| | | | | | | | | | | | | | | Conflicts: src/quickcontrols2/qquickstyle.cpp tests/auto/controls/data/tst_popup.qml Change-Id: I7b7bb5f9c63b32eef65c9b2e68f56baa3da69cff
| * QQuickStyle: use local 8-bit for paths from env varsJ-P Nurmi2018-03-231-4/+4
| | | | | | | | | | | | | | We must not assume that paths are Latin-1 strings. Change-Id: I13814bf29c9ebb12b71e5c559843589946a7ecac Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-03-201-1/+2
|\| | | | | | | Change-Id: I69ada9110df30ea5f20710a2d1e6ac6b6a448b21
| * Avoid crashes when the qquickcontrols2 plugin gets unloadedLars Knoll2018-03-161-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | The styleSpec() can be a nullptr in some cases, so test for that before calling reset() on it. Fixes a crash on exit in the qqmlextensionsplugin autotest of qtdeclarative if qtquickcontrols2 has been compiled. Change-Id: Ic43cbec57b36f9a0181d3b0c50d4a19236b5870e Reviewed-by: J-P Nurmi <jpnurmi@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * QQuickStyle: fix and test QT_QUICK_CONTROLS_CONFJ-P Nurmi2018-02-201-0/+1
| | | | | | | | | | | | | | | | Reset QT_QUICK_CONTROLS_CONF when appropriate, and add some tests too since the environment variable is now public and documented. Change-Id: I09fba950de7c34f22c4cf802ea5c0a337c84f0bd Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | QQuickStyle: add API for managing style pathsJ-P Nurmi2018-03-161-2/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to be able to use/refer to/select styles by name: - ./myapp -style Glossy - :/qtquickcontrols2.conf: [Controls] Style=Glossy - QT_QUICK_CONTROLS_STYLE=Glossy ./myapp the style needs to be available in a place where QQC2 can find it by the given name. Normally, QQC2 scans for available styles in the QT_INSTALL_QML/QtQuick/Controls.2/ directory, where all the built-in styles reside. However, 3rd party styles may want to install styles into their own namespace, especially if they offer style-specific API. If a style is installed elsewhere, QQC2 needs to be made aware of the style path to make it possible to locate the style. Previously, the QT_QUICK_CONTROLS_STYLE_PATH environment variable was the only way. This adds proper C++ API, inspired by QQmlEngine's importPathList and pluginPathList, to manage QQC2 style paths. [ChangeLog][Controls][QQuickStyle] Added stylePathList() and addStylePath() methods for managing the list of directories where Qt Quick Controls 2 searches for available styles. Task-number: QTBUG-67062 Change-Id: I1e85b5e09ba869483c0937ac61a0a2dcfc8e774e Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Refactor QQuickStyleSelectorJ-P Nurmi2018-03-131-3/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of trying to determine a single base URL based on the import URI of the plugin, and whether built in static mode, provide a list of paths where to lookup styles, in priority order: - requested style path (-style /path/to/style) - QT_QUICK_CONTROLS_STYLE_PATH environment variable - QT_INSTALL_QML/QtQuick/Controls.2/ - qrc://qt-project.org/imports/QtQuick/Controls.2/ Furthermore, provide the requested style name and the fallback style name as a simple list of selectors. The lookup order is: 1) requested style 2) fallback style 3) default style As a result, QQuickStyleSelector implementation is a lot simpler, completely independent of QQuickStyle, and the style lookup works regardless of whether the files are in QRC or on the file system. This allows us to utilize QRC and the Qt Quick Compiler in the future. Note: two data rows in tst_QQuickStyleSelector::select_data() had to be fixed. Not sure how the expected values ended up like that, but as the comments say, "Label.qml exists in the default and fallback styles" and "Button.qml exists in all styles", so it makes no sense to expect that Label.qml or Button.qml is selected from the FallbackStyle when a valid "data" folder is specified. Change-Id: I18dea9fddf8f079e0140b51b567814da0df2802c Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | QQuickStyle: de-duplicate codeJ-P Nurmi2018-03-121-12/+12
| | | | | | | | | | | | | | Unify reading of QML2_IMPORT_PATH and QT_QUICK_CONTROLS_STYLE_PATH. Change-Id: Icb2a7b6156b5d32235adfe4abec5873256e6fcb5 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Add Dense Material style variant for desktopMitch Curtis2018-02-191-0/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current Material style is based on the mobile variant of the design, which is far too large for desktop applications. From https://material.io/guidelines/components/lists.html#lists-usage: "When the mouse and keyboard are the primary input methods, measurements may be condensed to accommodate denser layouts." This patch adds a dense variant of the style where most controls like buttons and delegates are smaller in height and use smaller font sizes. Note that the Material design guidelines seem to distinguish between mobile, desktop and dense measurements, where "dense" seems to be a specialization of desktop. We cannot afford to/do not see sense in maintaining three separate variants, so the dense variant will be the only desktop version of the Material style. [ChangeLog][Material] Added Dense variant of the Material style for use on desktop platforms. Some controls are slightly smaller in height and use smaller font sizes. The variant can be enabled by setting QT_QUICK_CONTROLS_MATERIAL_VARIANT to Dense or setting Variant=Dense in the qtquickcontrols.conf file. Task-number: QTBUG-51109 Change-Id: I11846b7f6e61f7b5dcf3c146b18c220234a73ef2 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Merge remote-tracking branch 'origin/5.9' into 5.10J-P Nurmi2018-01-101-0/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/imports/controls/BusyIndicator.qml src/imports/controls/CheckBox.qml src/imports/controls/CheckDelegate.qml src/imports/controls/ComboBox.qml src/imports/controls/DelayButton.qml src/imports/controls/Dial.qml src/imports/controls/ItemDelegate.qml src/imports/controls/MenuItem.qml src/imports/controls/RadioButton.qml src/imports/controls/RadioDelegate.qml src/imports/controls/SwipeDelegate.qml src/imports/controls/Switch.qml src/imports/controls/SwitchDelegate.qml src/imports/controls/doc/src/qtquickcontrols2-configuration.qdoc src/imports/controls/material/CheckDelegate.qml src/imports/controls/material/ItemDelegate.qml src/imports/controls/material/MenuItem.qml src/imports/controls/material/RadioDelegate.qml src/imports/controls/material/SwipeDelegate.qml src/imports/controls/material/SwitchDelegate.qml src/imports/controls/qquickdefaultbusyindicator.cpp src/imports/controls/qquickdefaultbusyindicator_p.h src/imports/controls/qtquickcontrols2plugin.cpp src/imports/controls/universal/CheckDelegate.qml src/imports/controls/universal/ItemDelegate.qml src/imports/controls/universal/MenuItem.qml src/imports/controls/universal/RadioDelegate.qml src/imports/controls/universal/SwipeDelegate.qml src/imports/controls/universal/SwitchDelegate.qml src/quickcontrols2/quickcontrols2.pri src/quicktemplates2/qquickcontrol.cpp src/quicktemplates2/qquickmenu.cpp src/quicktemplates2/qquickpopup_p.h Change-Id: Ib25c8b4a7fe018b7c0ade9b02bfaaa6980118c15
| * Doc: improve Style/FallbackStyle documentationMitch Curtis2018-01-041-0/+4
| | | | | | | | | | | | | | | | | | Link to relevant documentation and add entries for the Controls section to the configuration file docs. Task-number: QTBUG-65445 Change-Id: I175866167e36403475520ea4de0cb299aae542d7 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into 5.10J-P Nurmi2017-12-151-2/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf examples/quickcontrols2/quickcontrols2.pro src/imports/controls/ComboBox.qml src/quicktemplates2/qquickabstractbutton.cpp src/quicktemplates2/qquickabstractbutton_p.h src/quicktemplates2/qquickapplicationwindow_p.h src/quicktemplates2/qquickcombobox.cpp src/quicktemplates2/qquickcontainer.cpp src/quicktemplates2/qquickcontrol.cpp src/quicktemplates2/qquickcontrol_p.h src/quicktemplates2/qquickcontrol_p_p.h src/quicktemplates2/qquicklabel_p.h src/quicktemplates2/qquicklabel_p_p.h src/quicktemplates2/qquickslider_p.h src/quicktemplates2/qquickspinbox.cpp src/quicktemplates2/qquicktextarea_p.h src/quicktemplates2/qquicktextarea_p_p.h src/quicktemplates2/qquicktextfield_p.h src/quicktemplates2/qquicktextfield_p_p.h tests/auto/auto.pro tests/auto/controls/data/tst_combobox.qml Change-Id: I34cdd5a9794e34e0f38f70353f2a2d04dfc11074
| * Fix QQuickStyle::setFallbackStyle() in static buildsJ-P Nurmi2017-12-141-2/+2
| | | | | | | | | | | | | | | | | | | | Use QQmlFile::urlToLocalFileOrQrc() instead of QUrl::toLocalFile() to avoid assuming a local file path. In static builds, QML files are in QRC. Task-number: QTBUG-65016 Change-Id: Ide36e5269d8692620f352574c726fbd1997c0a77 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | QQuickStyle: fix warning about empty filenameMitch Curtis2017-08-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | 0dee566e98f5ff4f224e596de1c04de4f9685df4 (in qtbase) added a check for empty file names to QFileSystemEngine, and we run into that: Empty filename passed to function The fix is to check for empty file names before calling QFile::exists(). Change-Id: I273ea62f97ddcbf5b1a7952405a67ccb45c7672a Reviewed-by: Liang Qi <liang.qi@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devJ-P Nurmi2017-06-081-3/+6
|\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/imports/controls/doc/src/qtquickcontrols2-index.qdoc src/imports/controls/doc/src/qtquickcontrols2-styles.qdoc src/quicktemplates2/qquickapplicationwindow.cpp src/quicktemplates2/qquickmenu.cpp src/quicktemplates2/qquickmenu_p.h src/quicktemplates2/qquickpopup.cpp tests/auto/auto.pro Change-Id: I856a022d38abd84763127539f46ef032ddc53c3d
| * Fix QQuickStyle::availableStyles()J-P Nurmi2017-06-071-3/+6
| | | | | | | | | | | | | | | | | | Filter out macOS debug symbol (.dSYM) directories from the list of available styles. Task-number: QTBUG-60973 Change-Id: I5b9c3f4af946d44b1601f32bf7da699c29a86689 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Move isDarkTheme() to QQuickStylePrivateJ-P Nurmi2017-03-221-0/+20
| | | | | | | | | | | | | | | | | | QQuickStyleAttached is being generalized to a recursive attached object type that can be used for palettes too, which are planned to be used for the upcoming image-based style. Change-Id: I4c1d25624ee11bb0ec6cd5ee2656c36e622e2139 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Move settings from QQuickStyleAttached to QQuickStylePrivateJ-P Nurmi2017-03-221-2/+18
|/ | | | | | | | | | The settings were added before QQuickStyle(Private) existed. Now QQuickStyle(Private) is a lot more logical place for the settings that are not specific to the attached style attributes only, but can be also determine which style is used etc. Change-Id: I7bc432c330d58ab501b51b0ee8eaf24697155324 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Fix build with -no-feature-settingsJ-P Nurmi2017-01-311-0/+2
| | | | | Change-Id: I204c50539288df16c4d4010e91c8ecc60f202ec6 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Merge remote-tracking branch 'origin/5.8' into devJ-P Nurmi2017-01-111-1/+1
|\ | | | | | | Change-Id: If797ac58344b20e8de4379343131c097247ba2f2
| * Welcome to 2017J-P Nurmi2017-01-091-1/+1
| | | | | | | | | | Change-Id: If68cff4efacc7dc5719c8b8e61937e85e9076870 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.8' into devJ-P Nurmi2016-12-011-0/+29
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/imports/controls/SpinBox.qml src/imports/controls/material/SpinBox.qml src/imports/controls/universal/SpinBox.qml tests/auto/controls/data/tst_swipedelegate.qml Change-Id: Ie1d1f487890f0a9f80a00df5e813e1d2e8303fe5
| * Allow specifying a relative style path in qtquickcontrols2.confJ-P Nurmi2016-11-301-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The style path is resolved relative to the location of config file. Even though qtquickcontrols2.conf is normally located in the root of resources, Quick Designer uses QT_QUICK_CONTROLS_CONF to set a custom location for the preview, where the standard config location is not feasible. This patch extends the config and style lookup further by allowing to specify a relative path to a custom style for the Quick Designer preview. Change-Id: Iad9c459421eefbf7a5bcbedfea59f5f16a1d3a39 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* | Merge remote-tracking branch 'origin/5.8' into devJ-P Nurmi2016-11-171-1/+19
|\| | | | | | | | | | | | | | | Conflicts: src/quickcontrols2/qquickstyle.cpp src/quicktemplates2/qquickslider.cpp Change-Id: Ie12132690680706def6f516334a6ef0ba27336b3
| * Merge remote-tracking branch 'origin/5.7' into 5.8J-P Nurmi2016-11-171-1/+19
| |\ | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/controls/data/tst_button.qml Change-Id: I5c97b3c1944e52dba44fd3c7d6d9a255c5e08cf7
| | * QQuickStyle: kill the temporary QQmlEngine instanceJ-P Nurmi2016-11-171-1/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The temporary QQmlEngine instance is not only slow and ugly, but also causes random crashes in the CI. This change replaces the temporary QQmlEngine instance with a local defaultImportPathList() helper method, which is based on the code in QQmlImportDatabase constructor. Later on, we can switch to QQmlImportDatabase::defaultImportPathList() when it has been made available in dev. Change-Id: I9f8363ba79ce39fb0482e6e44be0b1d1040c76e4 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | Add support for a QT_QUICK_CONTROLS_STYLE_PATH environment variableJ-P Nurmi2016-11-161-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][Controls][Styles] Added support for a QT_QUICK_CONTROLS_STYLE_PATH environment variable, which can be used to specify lookup paths for Qt Quick Controls 2 styles. This allows device manufacturers and Linux distributions to specify a system-wide style installation folder that may be located outside the Qt installation tree. Change-Id: Ic004d693bf6206971da6319d0cc13061b8fd1566 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | QQuickStyle::availableStyles()J-P Nurmi2016-11-101-5/+42
|/ / | | | | | | | | | | | | | | | | | | | | | | This allows us to introduce platform-specific styles, such as the iOS style, and make them appear correctly in the Gallery example so that we don't have to hard-code the lists separately for different platforms. [ChangeLog][Controls][QQuickStyle] Added availableStyles() method that returns the list of available built-in styles. Change-Id: Ieea88577f402cbc52a844d6777e64c6bd55c5ab9 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Doc: fallback styleJ-P Nurmi2016-10-261-1/+17
| | | | | | | | | | Change-Id: I03996d592de4b7db29b671fa73ab44036a80fa2f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.7' into 5.8J-P Nurmi2016-10-251-1/+1
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/imports/controls/doc/src/qtquickcontrols2-material.qdoc src/imports/controls/doc/src/qtquickcontrols2-styles.qdoc src/imports/controls/doc/src/qtquickcontrols2-universal.qdoc src/imports/controls/material/ComboBox.qml Change-Id: I2a57070f96691cb6bbdaae460fbc60a85be435de
| * Doc: fix typo in QQuickStyle briefMitch Curtis2016-10-251-1/+1
| | | | | | | | | | Change-Id: I629871ac8a077fda900f69d788d612bc3688728f Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Let specifying the fallback style for custom stylesJ-P Nurmi2016-10-251-6/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For example, you can call QQuickStyle::setStyle(":/mycontrols") and QQuickStyle::setFallbackStyle("Material") to select a custom style so that the missing files will fallback to the Material style. Notice that the Material and Universal styles do not contain all files. For example, the non-visual Control.qml, Container.qml are not duplicated. For these, we must fallback to the Default style that is guaranteed to contain them all. [ChangeLog][Controls] Added support for specifying the fallback style for custom styles via :/qtquickcontrols2.conf, QT_QUICK_CONTROLS_FALLBACK_STYLE or QQuickStyle::setFallbackStyle(). Change-Id: I00be1c8c6aaca875ef851c90d018e9b5e2f501b7 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Fix QQuickStyle::name() lookupJ-P Nurmi2016-10-131-0/+2
| | | | | | | | | | | | Change-Id: I428baf8988abf51a032e21c369ca021c2da84257 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Fix style name casingJ-P Nurmi2016-09-021-21/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When QQuickStyle looks up the appropriate folder where the specified style exists, it also fixes up the casing of the style name to match what is on the file system. For example, "material" becomes "Material". Since 54480f3, QtQuickControls2Plugin initializes the default style path so QQuickStyle no longer has to create a temporary QQmlEngine to be able to lookup styles in one of the import paths. It still needs to fixup the casing of the style name to ensure that "-style material" and QT_QUICK_CONTROLS_STYLE=material work. Change-Id: If35b870bb335e024b94fb328a927a5550b51cba1 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Init QQuickStyle's base URL to avoid creating temp QQmlEngineJ-P Nurmi2016-08-251-3/+14
|/ | | | | | | | | | | | Initialize the base URL from QtQuickControls2Plugin::registerTypes() to avoid creating an unnecessary temporary instance of QQmlEngine. It was used to list all known import paths, which were scanned for the requested style folder. Now that we pass the base URL, the built-in styles (a name without path to the style) can be looked up straight from the base path. Change-Id: I0d68d4c5bb90a4ab89660b5ce97f6433aeefc1ff Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Doc: add missing \since 5.7 tagsJ-P Nurmi2016-05-251-0/+1
| | | | | Change-Id: Ie4680c5dfadc95278215b688f4fc28577f557933 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* qquickstyle.cpp: add missing qdebug.h includeJ-P Nurmi2016-05-131-0/+1
| | | | | Change-Id: Iafc5f93e188e98201938bf8699faebd0dbcb2c32 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>