aboutsummaryrefslogtreecommitdiffstats
path: root/src/quickcontrols2
Commit message (Collapse)AuthorAgeFilesLines
* 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-103-5/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Whitespace cleanupsJ-P Nurmi2016-11-032-2/+1
| | | | | | | | | | | | | | | Change-Id: Ia075694a7dc43d72d07221b569467fcebdb411fb Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | Merge remote-tracking branch 'origin/5.8' into devJ-P Nurmi2016-10-311-1/+17
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/quicktemplates2/qquickpopup.cpp src/quicktemplates2/qquickpopup_p_p.h Change-Id: I33241dfd15a320e6ae2f0c056252b0ec6be7c6f6
| * | 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.8' into devJ-P Nurmi2016-10-255-25/+132
|\| | | | | | | | | | | Change-Id: If48d66d89172db94ee1839063396156a3a947601
| * | 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-255-24/+131
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Add internal QQuickAnimatedNode helperJ-P Nurmi2016-10-203-0/+277
|/ / | | | | | | | | | | | | | | | | | | | | This handles the timers, signals, updates etc. so that the animated node implementations for busy indicators and indeterminate progress bars become a bit simpler. The implementation is based on qtdeclarative/examples/quick/scenegraph/threadedanimation. Task-number: QTBUG-56601 Change-Id: Ibd82060aa103e6447ee16814c3e0d6ff2c14d608 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>
* | Merge remote-tracking branch 'origin/5.7' into 5.8J-P Nurmi2016-10-031-2/+5
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/quickcontrols2/gallery/gallery.qrc src/imports/calendar/doc/snippets/qtlabscalendar-calendarmodel.qml src/imports/calendar/doc/snippets/qtlabscalendar-dayofweekrow-layout.qml src/imports/calendar/doc/snippets/qtlabscalendar-dayofweekrow.qml src/imports/calendar/doc/snippets/qtlabscalendar-monthgrid-layout.qml src/imports/calendar/doc/snippets/qtlabscalendar-monthgrid.qml src/imports/calendar/doc/snippets/qtlabscalendar-weeknumbercolumn-layout.qml src/imports/calendar/doc/snippets/qtlabscalendar-weeknumbercolumn.qml src/imports/controls/doc/qtquickcontrols2.qdocconf src/imports/controls/doc/snippets/qtlabscalendar-calendarmodel.qml src/imports/controls/doc/snippets/qtlabscalendar-dayofweekrow-layout.qml src/imports/controls/doc/snippets/qtlabscalendar-dayofweekrow.qml src/imports/controls/doc/snippets/qtlabscalendar-monthgrid-layout.qml src/imports/controls/doc/snippets/qtlabscalendar-monthgrid.qml src/imports/controls/doc/snippets/qtlabscalendar-weeknumbercolumn-layout.qml src/imports/controls/doc/snippets/qtlabscalendar-weeknumbercolumn.qml src/imports/controls/doc/snippets/screenshots/qtlabscalendar-calendarmodel.qml src/imports/controls/doc/snippets/screenshots/qtlabscalendar-dayofweekrow-layout.qml src/imports/controls/doc/snippets/screenshots/qtlabscalendar-dayofweekrow.qml src/imports/controls/doc/snippets/screenshots/qtlabscalendar-monthgrid-layout.qml src/imports/controls/doc/snippets/screenshots/qtlabscalendar-monthgrid.qml src/imports/controls/doc/snippets/screenshots/qtlabscalendar-weeknumbercolumn-layout.qml src/imports/controls/doc/snippets/screenshots/qtlabscalendar-weeknumbercolumn.qml src/imports/controls/qtquickcontrols2plugin.cpp src/quicktemplates2/qquicktooltip.cpp src/quicktemplates2/qquicktooltip_p.h src/quicktemplates2/qquicktumbler.cpp tests/auto/controls/data/tst_spinbox.qml tests/auto/controls/data/tst_tumbler.qml tests/auto/qquickmaterialstyle/data/tst_material.qml Change-Id: I25b7473b47739043b6f768603bece30b18021318
| * Fix style inheritanceJ-P Nurmi2016-10-021-2/+5
| | | | | | | | | | | | | | | | | | When unable to find a parent item style on window change, use the window style as a fallback to avoid a parentless style. Task-number: QTBUG-52631 Change-Id: I5d31dc72075f06f865f01c3ee2411de6a1485677 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Merge remote-tracking branch 'origin/5.7' into 5.8J-P Nurmi2016-09-261-1/+13
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: examples/quickcontrols2/gallery/gallery.qrc src/imports/controls/doc/src/qtquickcontrols2-styles.qdoc src/quicktemplates2/qquickstackview_p.cpp src/quicktemplates2/qquickstackview_p_p.h tests/auto/controls/data/tst_stackview.qml Change-Id: If451fe0e5653572d305b4de90a6d5cb878463e8d
| * Let QT_QUICK_CONTROLS_CONF override :/qtquickcontrols2.confJ-P Nurmi2016-09-231-1/+13
| | | | | | | | | | | | | | | | | | This is an undocumented feature mainly for tooling purposes. This way tooling can make sure that qmlpuppet uses the same configuration as the application when displaying a form in the Qt Quick Designer. Change-Id: If46055f09049118f1f49c350c74d5aab501a0378 Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
* | 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>
* | Merge remote-tracking branch 'origin/5.7' into 5.8J-P Nurmi2016-08-271-0/+5
|\| | | | | | | | | | | | | | | Conflicts: src/imports/controls/TabBar.qml src/imports/controls/material/TabBar.qml Change-Id: I290091558f7ae94d44be2a117b16867dddb53cb3
| * QQuickStylePlugin: avoid re-creating the proxy themeJ-P Nurmi2016-08-231-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | QQuickStylePlugin::initializeEngine() is called multiple times due to multiple QQmlEngine instances (like in qml2puppet). Don't attempt to re-create the proxy theme on the second round. Thanks to QScopedPointer, the old proxy theme instance was automatically destroyed and thus, the new proxy theme crashed. Task-number: QTBUG-54995 Change-Id: I1648c789df062fdfda54302c77f471139a8de88f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Init QQuickStyle's base URL to avoid creating temp QQmlEngineJ-P Nurmi2016-08-253-3/+79
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Update QQuickProxyTheme::fileIconMaurice Kalinowski2016-08-092-5/+4
| | | | | | | | | | | | | | | | | | | | | | 2cd2cba0868efb7e8dd2d00805f1a5ceed0a1349 in qtbase removed fileIconPixmap and switched to fileIcon. QQuickProxyTheme needs to be update accordingly to fix compilation of the module. Change-Id: If3e6cae09cd6e86cd1058d180f75481a20a5b9f6 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | QQuickTumblerView: add missing override keywordJ-P Nurmi2016-07-211-1/+1
| | | | | | | | | | | | | | | | qquicktumblerview_p.h:90:10: warning: 'updatePolish' overrides a member function but is not marked 'override' [-Winconsistent-missing-override] Change-Id: Iae769691c3aab5092bab497f8e0bc43a4972a32a Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Tumbler: make wrap property depend on count by defaultMitch Curtis2016-07-012-8/+44
| | | | | | | | | | | | | | | | | | | | [ChangeLog][Important Behavior Changes][Tumbler] Changed the default value of wrap to be false when count is less than visibleItemCount. Explicitly setting wrap overrides this behavior. Change-Id: I0089f517a25a606625c245df52b0db5fd859ffc0 Task-number: QTBUG-53587 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Tumbler: add wrap propertyMitch Curtis2016-06-283-2/+350
| | | | | | | | | | | | | | | | | | [ChangeLog][Tumbler] Added wrap property to control whether or not tumbler wraps when it reaches the top and bottom. Change-Id: I27c543d98f7bc574bc5dc882a130abe0dcc13cea Task-number: QTBUG-53587 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Migrate to new scenegraphng APILaszlo Agocs2016-06-221-1/+1
| | | | | | | | | | | | Change-Id: I9b0c05edacd4e6f1be6f692e77476097d1f99bc0 Reviewed-by: Gunnar Sletta <gunnar@sletta.org> Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-06-011-0/+1
|\| | | | | | | | | | | | | | | | | | | | | Comparing colors in tst_material.qml works fine now. Conflicts: examples/quickcontrols2/gallery/qtquickcontrols2.conf tests/auto/material/data/tst_material.qml Task-number: QTBUG-53556 Change-Id: I59970442a09bd72bf0ce53fe838c560ca8daf325
| * Doc: add missing \since 5.7 tagsJ-P Nurmi2016-05-251-0/+1
| | | | | | | | | | Change-Id: Ie4680c5dfadc95278215b688f4fc28577f557933 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* | Use QFileSelectorPrivate::selectionHelper()J-P Nurmi2016-05-301-30/+3
| | | | | | | | | | Change-Id: I0d37dd650e7be4e160d4d49dcb3c678c54f12218 Reviewed-by: Liang Qi <liang.qi@qt.io>
* | Introduce a 'System' theme to the styles.Friedemann Kleint2016-05-261-0/+21
|/ | | | | | | | | | | | | | | | Setting the theme to System chooses either the light or dark theme based on the system theme colors. However, when reading the value of the theme property, the value is never System, but the actual theme. [ChangeLog][Controls][Material] Added Material.System theme enum value, that can be used to let the Material style choose either the light or dark theme based on the system theme colors. [ChangeLog][Controls][Universal] Added Universal.System theme enum value, that can be used to let the Universal style choose either the light or dark theme based on the system theme colors. Change-Id: Ibfc9f01953cb8322b64d59413cfbaef9d4bb28fd Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Fix style inheritance with dynamically changing windowsJ-P Nurmi2016-05-182-2/+17
| | | | | | | | | It can happen that the parent item changes before an item gets associated with a window. Change-Id: I4cb65a06d363f8211b202e559c76793c71ba318a Reviewed-by: Nikita Krupenko <krnekit@gmail.com> Reviewed-by: Mitch Curtis <mitch.curtis@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>
* Optimize QQuickStyleSelectorJ-P Nurmi2016-04-262-9/+9
| | | | | | | | | | | QQuickStyle::name() accesses a Q_GLOBAL_STATIC and splits the style path. Don't call it repeatedly, but store the value in constructor to share it for all consequent select() calls. QQuickStyleSelector is allocated on the stack in QtQuickControls2Plugin::registerTypes(), so memory usage is no concern. Change-Id: I31c1693bca277911232e3cbd7cb6f55b2aa7ed2a Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* QQuickStyleSelector: fix relative path handlingJ-P Nurmi2016-04-251-2/+6
| | | | | | | | | | | | This makes it possible to pass a relative path to the style: ./myapp -style relative/path/to/my/style To make the tests pass, includes a fix to avoid double slashes in selected URLs. Change-Id: I1b366eb7793523dd0f1058236661cedaa1216f3d Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* QQuickStyleSelector: re-use QFileSelectorPrivate::platformSelectors()J-P Nurmi2016-04-251-34/+3
| | | | | | | Better not to duplicate this code, because it will easily get out of sync. Change-Id: I9a5eb97cee2c3d15ebc4af157cee3d54d4a9e700 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* QQuickStyle: fix style name lookup on OSXJ-P Nurmi2016-04-231-26/+8
| | | | | | | Just do a case-insensitive search to keep the code simple. Change-Id: If201a468222ea81064ed08814df28c4add0060a9 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Implement case-insensitive style name lookupJ-P Nurmi2016-04-231-3/+53
| | | | | | | | Fixes the issue that "./app -style material" did no longer work, but the case had to match exactly (./app -style Material). Change-Id: I446654110af670c391f8e304ce8008fbd6e9acaa Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Rename env vars (QT_LABS_CONTROLS_XXX -> QT_QUICK_CONTROLS_XXX)J-P Nurmi2016-04-221-1/+1
| | | | | Change-Id: Ie903d3491b03d4ec05dd28462a19ee464331d2a2 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* import Qt.labs.controls 1.0 => QtQuick.Controls 2.0J-P Nurmi2016-04-211-1/+1
| | | | | | | | | Docs, resources, .metainfo and plugins.qmltypes will be updated in follow up commits. Change-Id: I4438c5bfb8802bff0fa15c56431cfd288f179861 Task-number: QTBUG-52549 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* QQuickStyleSelector: don't force lowercase style nameJ-P Nurmi2016-04-211-1/+1
| | | | | | | | | | | We'll have to also implement case-insensitive style lookup later. For now, this is required to be able to rename the imports, because the styles will reside in folders called "Material" and "Universal" instead of "material" and "universal" as they were before. Change-Id: I71edf1d447d78440a79241e53cb674f85b872078 Task-number: QTBUG-52549 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Fix 'Undocumented parameter 'style'' warning in QQuickStyle docsMitch Curtis2016-04-211-1/+1
| | | | | Change-Id: Id99cb3176d209f1627825859afa11ca20c3ae883 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Rename qtquickcontrols.conf to qtquickcontrols2.confJ-P Nurmi2016-04-211-1/+1
| | | | | | | | Use the 2-suffix consistently everywhere to avoid any potential confusion with the old controls. Change-Id: I83aa212a15ed78b8694fb7d3db80fc8430aea969 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Merge QQuickPluginUtils to QQuickStylePluginJ-P Nurmi2016-04-195-133/+18
| | | | | | | | | | | Now that we have a common base class for the plugins, we don't need a separate utils namespace. QQuickStylePlugin::typeUrl() is based on the former QQuickPluginUtils::pluginBasePath(). It returns a URL to the internal composite types that must be explicitly registered for static builds. Change-Id: Icf28c27c84f6b58b1e7b34203dad39c852f0d362 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Doc: add section for C++ classes in overview pageNico Vertriest2016-04-171-1/+1
| | | | | Change-Id: I69a112f05b90e1296ad897da0e3d9b04b3e4af33 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Controls: update license headersJ-P Nurmi2016-04-1419-32/+32
| | | | | | | This file is part of the Qt Quick Controls 2 module of the Qt Toolkit. Change-Id: Ib653135662bfd353a73290539995e8e5be211587 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Controls: rename the C++ module to qtquickcontrols2J-P Nurmi2016-04-1321-0/+2061
Change-Id: I087a39baebc296a340739161874636926adaa56c Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>