aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/templates
Commit message (Collapse)AuthorAgeFilesLines
* Fix build without features.shortcutTasuku Suzuki2021-04-271-0/+1
| | | | | | Change-Id: I871e115f27c3c43a9e9b2e23392cd1dcbfb0cec0 Pick-to: 6.1 6.0 5.15 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* CMake: Fix qml module version to use the repo project versionAlexandru Croitor2021-04-151-1/+1
| | | | | | | | | | | Use PROJECT_VERSION instead of CMAKE_PROJECT_VERSION, so that the repo project version is used in a top-level build, rather than the version of the qt5 project. Pick-to: 6.1 6.0 Task-number: QTBUG-92861 Change-Id: Ifd12d6309f358b9b72372a5c069141ecb7322bc7 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Remove redundant qmldir filesAlexey Edelev2021-02-231-4/+0
| | | | | | | | | | qmldir files to be generated by the cmake build procedure and don't need to be stored in the source tree. Task-number: QTBUG-88263 Change-Id: Idff2800b5b2b6cb74d79a2f42fff717522c10ade Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Remove QMake project filesJoerg Bornemann2021-02-112-52/+0
| | | | | | | | | | This includes removal of the corresponding .prev_CMakeLists.txt files. Pick-to: 6.1 Task-number: QTBUG-88742 Change-Id: I4247294258629c92e80914518e9208019090c815 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* a11y: Fix ordering on header, content item and footer in PageJan Arve Sæther2021-01-291-0/+3
| | | | | | | | | | | | | | | Because of the previous behavior, the footer could be read aloud by the screen reader before the content item. And even worse, the footer could be read aloud even before the header in some cases. This made it hard for visually impaired people to use the application. The Page type was used by the Dialog type, so it also affected that. Fixes: QTBUG-75042 Pick-to: 5.15 6.0 Change-Id: Ic3e8ec3f7dcf18af9262b1d35c986835c8da6900 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Use CMAKE_PROJECT_VERSION for VERSION of QML modulesMitch Curtis2021-01-131-1/+1
| | | | | | | | | | This ensures that the modules provide versions matching the current Qt version. Change-Id: I164b54af60de3b2b6ca6f54c417eb58b1eafd1e5 Reviewed-by: Jarkko Koivikko <jarkko.koivikko@code-q.fi> Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Doc: Remove version numbers for import statement in snippetsJerome Pasion2020-11-261-2/+2
| | | | | | | | | | | -recommend using the import statement without versions for Qt 6.0 -update use of \qml snippet without \QtMinorVersion Task-number: QTBUG-87155 Pick-to: 6.0 6.0.0 Change-Id: I338d4fb81b9709f2f342f250c07ddf66f116b1dd Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Document how to use Controls types in property declarationsMitch Curtis2020-11-091-0/+1
| | | | | | | Fixes: QTBUG-88222 Change-Id: I26ac9ce14fc86b3ada4e3024cb70b1ed4ce4755b Reviewed-by: Nils Jeisecke <nils.jeisecke@saltation.com> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Rename "Porting" pages to "Changes"Jerome Pasion2020-11-091-1/+1
| | | | | | | | | | | | | | The content in the porting guides are closer to a changelog than a porting guide. At this point, it is easier for maintainers and contributors to write in a changelog than a guide. This change should help with readability and is closer to the usage of "Changes" in documentation. Part of a rename in other submodules. Task-number: QTBUG-87156 Change-Id: Ib34fc9e3e5719c75fcd7d18d9d2cc7dd994c3116 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Doc: remove Qt Quick Templates' Qt 6 porting guideMitch Curtis2020-11-091-42/+0
| | | | | | | | | | | While Qt Quick Templates does define the API for each type, it and Qt Quick Controls are quite closely intertwined, and it doesn't serve much value to have the porting guides separated. Task-number: QTBUG-88158 Change-Id: I9d5ee403049a17da1dc5e45e7d26bbd6c7b5b986 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Have templates depend on QtQuickUlf Hermann2020-10-123-0/+5
| | | | | | | | | | | | Templates defines a number of C++-based QML types, most of those are derived from QQuickItem. Therefore, it actually needs QtQuick although it never explicitly imports QtQuick. In order for tools to figure that out, declare the QtQuick dependency in the qmldir file. Task-number: QTBUG-87164 Change-Id: I982b4ee57102ac62b0ee6e8559e34c5e203a7a0f Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* CMake: Regenerate projects to use new qt_internal_ APIAlexandru Croitor2020-10-072-2/+2
| | | | | | | | Modify special case locations to use the new API as well. Task-number: QTBUG-86815 Change-Id: I4a690095fcd4b1141550de86b6820ae2dd579429 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* Doc: Add Qt 6 changes filesPaul Wicking2020-09-242-0/+46
| | | | | | Task-number: QTBUG-84051 Change-Id: Ibfd1750b571f65bf76a3922f89510b6c6fd4eff9 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Fix fallback styles overwriting themesMitch Curtis2020-09-242-4/+0
| | | | | | | | | | | | | | | | | | | | | In Qt 5, QtQuickControls2Plugin::registerTypes() was responsible for calling initializeTheme() on each style plugin. Now that we delegate more work to the QML engine, each style plugin calls initializeTheme() via registerTypes(). To avoid fallback styles overwriting font and palette data set by the current style, we need to check if the theme has been intialized before calling initializeTheme(). To do this, we add a static "themeInitialized" bool that QQuickStylePlugin sets to true after calling intializeTheme() for the first time. It checks this value and avoids calling intializeTheme() if it's true. We also need to make QQuickStylePlugin ensure that the theme it's initializing belongs to the current style. Fixes: QTBUG-86303 Change-Id: Ie65e646677c78622829f4949c41cb79204cf5786 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Remove unnecessary depends from qmldirsMitch Curtis2020-08-271-1/+0
| | | | | | | These are no longer needed. Change-Id: I1e6d6d2917fb8504e864620a8214cf6b6f060b60 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Remove all plugins.qmltypes filesMitch Curtis2020-08-261-3122/+0
| | | | | | | | | These files should now be automatically generated by both qmake and cmake. Task-number: QTBUG-82922 Change-Id: I3ba754bb343123442c7d56c9caf770a979489c7d Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Fix CMake buildMitch Curtis2020-08-262-3/+37
| | | | | | Task-number: QTBUG-82922 Change-Id: I75f4a553a6bb260f77bfa791f12fa42e80131e09 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Bump import version to 6.0Mitch Curtis2020-08-261-1/+1
| | | | | | Task-number: QTBUG-82922 Change-Id: I2eb924eaaaddbe75d342f59f5fb3cd30c4a84fef Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Register C++ types declarativelyMitch Curtis2020-08-263-278/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Adapt to the new way of registering C++ types. The types need to be seen at compile time so that code can be generated that invokes them. This patch: - Adds QML_* macros where applicable. - Adapts the build system files to the new way of registering modules. - Splits up the QtQuick.Controls[.*].impl files into their own plugins, as we can only register one QML module per .pro file. - Removes C++ type registration calls in every plugin. - Moves private types from src/quickcontrols2/quickcontrols2.pro to src/quickcontrols2/impl/quickcontrols2-impl.pro. Some of these types need to be exposed to QML, but quickcontrols2.pro is already in use to declare the QtQuick.Controls import (and also provides the public C++ QQuickStyle API), and the new QML_IMPORT_NAME/VERSION syntax only allows one module per project. As some of the types that need to be exposed to QML are also referenced by some C++ code (e.g. tests, etc.), we just move all of the private types to the new library. Follow-up patches will register the QML types declaratively. Task-number: QTBUG-82922 Change-Id: Iaf9ee106237d61701d57a8896f3822304c8151a6 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-05-141-16/+64
|\ | | | | | | Change-Id: I24ff9bec33e0bd8785e3d571212a7506b6501854
| * Update plugins.qmltypes for 5.15Jani Heikkinen2020-04-151-16/+64
| | | | | | | | | | | | Task-number: QTBUG-82253 Change-Id: I93ae7b51b902050020cf7a79510b8325060181c5 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-03-311-3/+3
|\| | | | | | | Change-Id: Ie09cfdd17b00e56f3ba8677d25b24417dd4e42f6
| * Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-03-211-3/+3
| |\ | | | | | | | | | Change-Id: I9ecddc7a68da4f15ee2c2904e237496eb6a2aa26
| | * Doc: Make sure import is highlightedKai Koehne2020-03-201-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use \qml ... \endqml to allow qdoc highlighting the import as QML. Also parameterize the example import QtQuick.Templates import so that it always uses the last import version. Change-Id: I3fecc8b301c58a89769caf5aa3a764551ff683b3 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | Remove old QQuickPalette implementationVitaly Fanaskov2020-03-181-15/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The existing implementation was removed in order to reduce massive code duplication and simplify color resolving process. Unit tests were fixed accordingly. See related changes in the qtdeclarative module for the further details. [ChangeLog][General] the palette API is a part of QQuickItem now. Change-Id: Ic94ab4632e626c11d9b26f035e2a8a119c9088ef Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Merge remote-tracking branch 'origin/dev' into wip/cmakeAlexandru Croitor2020-03-171-10/+26
|\ \ \ | | | | | | | | | | | | Change-Id: Ieb9bcfba9651d646509afd065ce2389ef74448cc
| * | | Adapt to plugin unloading changesMitch Curtis2020-03-121-10/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As of c2081016e in qtdeclarative, plugins are no longer unloaded on macOS, and QQmlExtensionPlugin::unregisterTypes() should be used instead. This patch: - Moves everything that was done in destructors to unregisterTypes(). - Ensures that the style selector is destroyed in QQuickStylePlugin::unregisterTypes() so that previous styles that were set do not stick around after qmlClearTypeRegistrations() is called. This ensures that runtime style-switching continues to work. - Adds more logging output to make it easier to diagnose issues in the future. - Adds more code comments to ease maintenance. Change-Id: Ibbfeba4501d6ba0d5a257dcceace3498904a816e Fixes: QTBUG-82811 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
| * | | Merge remote-tracking branch 'origin/5.15' into devSimon Hausmann2020-03-101-0/+5
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/imports/controls/qtquickcontrols2plugin.cpp Change-Id: Ifc09ea9f71fdba119fe8eed99f0bdcb402444f27
| | * | Add HorizontalHeaderView and VerticalHeaderViewv5.15.0-alpha1Yulong Bai2020-02-111-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][Controls] Add HorizontalHeaderView and VerticalHeaderView. They are controls associated with TableView. Support flicking synchronization Support default, fusion, imagine, material and universal delegate styles. Fixes: QTPM-1300 Change-Id: Ie3f913dd616cda0d4e5a22a3d95baf71692370fe Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| * | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-12-141-0/+3
| |\| | | | | | | | | | | | | | Change-Id: I53a6326a91c2de5a6016df7322df4a6159f2330e
| | * | ComboBox: add selectTextByMouse propertyMitch Curtis2019-12-121-0/+3
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allows configuring the selectByMouse property of the underlying TextField for editable combo boxes. Named selectTextByMouse instead of selectByMouse to avoid confusion with selection of the items themselves. [ChangeLog][Controls][ComboBox] Added selectTextByMouse property. Change-Id: I852e4cd44ebe6b2a1ed2535513ea2fc35cbe0a32 Fixes: QTBUG-71406 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Merge remote-tracking branch 'origin/dev' into wip/cmakeLeander Beernaert2019-11-252-3/+1201
|\| | | | | | | | | | | Change-Id: I61919fabd4a3a07ed374f2c3c1fae2d589d6e124
| * | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-11-161-1/+1
| |\| | | | | | | | | | Change-Id: I647fa31fafdaea46c341c515f97b7f793ddf4b31
| | * Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-11-041-1/+1
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: Ibf7cf09570e73ad2f314e9ce7acf1c766ac3f332
| | | * Doc: Fix import statement for QtQuick.TemplatesKai Koehne2019-10-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Always show the latest Qt Minor version in the import statements for modules in QtQuick.Templates. For QtQuick.Controls this was fixed in commit b395f94. Fixes: QTBUG-76077 Change-Id: I0d63337f572fd23f0122df151f01bef2c8eab1dd Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-11-021-2/+1200
| |\| | | | | | | | | | | | | | Change-Id: I89a29c7040e233314885eb37731f53dba8ed6c1a
| | * | Update plugins.qmltypes for 5.14Kai Koehne2019-10-211-2/+1200
| | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-78690 Change-Id: I0e421232f4335a7a351562f23134eccdd0b1c674 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | | Regenerate projects to be in syncAlexandru Croitor2019-11-151-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I3a57449c9025e22414b8337fcffdeb0f4d769af2 Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | | Merge remote-tracking branch 'origin/dev' into wip/cmakeAlexandru Croitor2019-10-153-23/+23
|\| | | | | | | | | | | | | | | | | | | | | | | Removed dependencies.yaml. Change-Id: I1e2b3f486e9ace4bc8dc0419a64848990b3a6b39
| * | | Merge remote-tracking branch 'origin/wip/qt6' into devSimon Hausmann2019-10-041-7/+3
| |\ \ \ | | |/ / | |/| | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: Ifa2fade18b10478370131f0dee875ab1a37c7772
| * | | Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-09-062-3/+3
| |\ \ \ | | | |/ | | |/| | | | | Change-Id: Ie9314e1a5daa20cee9d95a3c42873dbe515b3333
| | * | Doc: Replace the "Qt Quick Controls 2" instancesVenugopal Shivashankar2019-08-222-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | Fix deprecation warnings related to qmlRegisterType()Friedemann Kleint2019-09-051-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use qmlRegisterAnonymousType() instead of qmlRegisterType(), fixing: qtquicktemplates2plugin.cpp:176:54: warning: 'int qmlRegisterType() [with T = QQuickApplicationWindowAttached]' is deprecated: Use qmlRegisterAnonymousType instead [-Wdeprecated-declarations] qtquicktemplates2plugin.cpp:176:54: warning: 'int qmlRegisterType() [with T = QQuickApplicationWindowAttached]' is deprecated: Use qmlRegisterAnonymousType instead [-Wdeprecated-declarations] Change-Id: If5788a78643ad7148c33c4515396b074d20d62ab Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
| * | | Register revision 3 for QQuickWindowQmlImpl into templatesUlf Hermann2019-08-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Fixes: QTBUG-77909 Change-Id: I87d41ab973ec5cb8a9cebcf0f22065e1bac221d8 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | | Update QtQuickControls2 project filesLeander Beernaert2019-10-081-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Re-run pro2cmake on all the project files. Change-Id: I8d349cf34d6cc8e26c76193d9ef220fa85b16bb8 Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | | | Merge remote-tracking branch 'origin/wip/qt6' into wip/cmakeAlexandru Croitor2019-08-151-7/+3
|\ \ \ \ | | |_|/ | |/| | | | | | Change-Id: I62feb82fcf389bf83c92f83e2ed1a6783d3179ba
| * | | Fix Qt6 buildAlexandru Croitor2019-08-051-7/+3
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Modify all the qmlRegisterModule calls to use minor version 15 because minor version zero from 6.0.0 would make tests fail. This is similar to what was done in qtdeclarative in c147b20a2c1299b2d659fe7c9472ae3866b6a425. Change-Id: I0ef33024ead0f7b4782023e34ce1232ba987e62a Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | | Fix build after resent add_qml_module and add_qt_resource API changesSimon Hausmann2019-08-091-1/+0
| | | | | | | | | | | | | | | | | | | | | Re-generate the files. Change-Id: Iba8ab6f3701b8a5c8b26e34ce98845a8da22a9e4 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | | Initial CMake conversion for QtQuickControls2Leander Beernaert2019-08-061-0/+36
|/ / | | | | | | | | | | | | | | The CMake setup only covers everything under the src directory. Tests and examples will follow in separate patches. Change-Id: Ic4dbf6efa3128d0eea3af99117ba87690cb51077 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* / Add valueRole API to ComboBoxMitch Curtis2019-04-231-0/+3
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows the user to conveniently manage data for a role associated with the text role. A common example of this is an enum stored in a backend with nicely formatted text displayed to the user. Before this patch, developers would have to write code like this: ComboBox { textRole: "text" onActivated: backend.modifier = model[currentIndex].value Component.onCompleted: currentIndex = findValue(backend.modifier) model: [ { value: Qt.NoModifier, text: qsTr("No modifier") }, { value: Qt.ShiftModifier, text: qsTr("Shift") }, { value: Qt.ControlModifier, text: qsTr("Control") } ] function findValue(value) { for (var i = 0; i < model.length; ++i) { if (model[i].value === value) return i } return -1 } } With this patch, the code becomes much simpler: ComboBox { textRole: "text" valueRole: "value" onActivated: backend.modifier = currentValue Component.onCompleted: currentIndex = indexOfValue(backend.modifier) model: [ { value: Qt.NoModifier, text: qsTr("No modifier") }, { value: Qt.ShiftModifier, text: qsTr("Shift") }, { value: Qt.ControlModifier, text: qsTr("Control") } ] } [ChangeLog][Controls][ComboBox] Added valueRole, currentValue and indexOfValue(). These allow convenient management of data for a role associated with the text role. Change-Id: I0ed19bd0ba9cf6b044a8113ff1a8782d43065449 Fixes: QTBUG-73491 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>