| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The new qml CMake API places a closer relationship between
the backing target and the plugin target. Both are typically
created together and they share a lot of common details.
Instead of creating them in different parts of the source
tree, they are now specified together. The src/imports
area has effectively been absorbed into the other
corresponding subdirectories below src with this change.
Task-number: QTBUG-91621
Change-Id: I9bd32e9eb78c198ccc9db04e2829303cac323502
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The previous commit changes the how the default style is set, and since
the tests all assumed that Basic was the default, we now need to
ensure it is explicitly set.
If we want to, we can revert this patch (or file-by-file) later and
ensure that these tests work with all styles. For now, just keep things
working as they used to.
Tests that use QTEST_QUICKCONTROLS_MAIN are not changed, as they
already run with all built-in styles.
Tests that don't use types that will cause issues,
like tst_qquickcolor, do not need to be changed.
tst_snippets can be run manually to produce screenshots, so we specify its
style in a qtquickcontrols2.conf file to allow it to be overridden by e.g.
application arguments (QQuickStyle::setStyle() takes precedence over all
other approaches of setting a style).
Change-Id: Ifae7e959f89a41a757c170272038fad139bba04f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
[ChangeLog][Styles] The Default style was renamed to Basic to account
for the introduction of the platform styles (macOS, Windows), which
will be used by default (where possible) when no style is specified.
Fixes: QTBUG-85984
Task-number: QTBUG-68814
Task-number: QTBUG-86403
Change-Id: I22b3199c8662e4ee5d55a1be1a51c9856ac62376
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
|
|
|
|
|
|
| |
Task-number: QTBUG-82922
Change-Id: I75f4a553a6bb260f77bfa791f12fa42e80131e09
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch completes the cumulative work done in previous patches.
- Uses qmlRegisterModuleImport() to register styles. This has some
added requirements:
- Each style must now be a QML module -- that is, it must have a
qmldir file.
- As a result of the above, the module must be available within the
QML import path in order to be found.
- The various forms of accepted style names have been reduced down to
one ("Material", "MyStyle", etc). See below for an explanation of
why.
- The following API in QQuickStyle is removed:
addStylePath(), availableStyles(), path(), stylePathList(). These
no longer make sense now that we reuse the existing QML import
system.
- Adds the tst_qquickstyleselector auto test back as "styleimports".
qmlRegisterModuleImport() vs resolvedUrl()
Previously we would use QQuickStyleSelector to select individual
QML files based on which style was set. We'd do this once when
QtQuick.Controls was first imported.
With Qt 6, and the requirement that each style be a proper QML
module, qmlRegisterModuleImport() was introduced. This allows us
to "link" one import with another. For an example of what this
looks like in practice, suppose the style was set to "MyStyle",
and the fallback to "Material". The "QtQuick.Controls" import
will be linked to "MyStyle", "MyStyle" to
"QtQuick.Controls.Material", and as a final fallback (for controls
like Action which only the Default style implements),
"QtQuick.Controls.Material" to "QtQuick.Controls.Default".
This is the same behavior as in Qt 5 (see qquickstyleselector.cpp):
// 1) requested style (e.g. "MyStyle", included in d->selectors)
// 2) fallback style (e.g. "Material", included in d->selectors)
// 3) default style (empty selector, not in d->selectors)
This is a necessary step to enable compilation of QML to C++.
Reducing the set of accepted style names
The problem
In QtQuickControls2Plugin() we need to call
QQuickStylePrivate::init(baseUrl()) in order to detect if the style
is a custom style in QQuickStyleSpec::resolve() (by checking if the
style path starts with the base URL). In Qt 5, init() is called in
QtQuickControls2Plugin::registerTypes(), but in Qt 6 that's too
late, because we need to call qmlRegisterModuleImport() in the
constructor. qmlRegisterModuleImport() itself requires the style to
have already been set in order to create the correct import URI
("QtQuick.Controls.X" for built-in styles, "MyCustomStyle" for
custom styles).
The solution
By reducing the valid forms for style names down to one:
./myapp -style MyStyle
we solve the problem of needing baseUrl() to determine if the
style is a custom style or not, but needing to call it too early
(since we now call qmlRegisterModuleImport() in
QtQuickControls2Plugin(), which itself requires the style to have
already been set). baseUrl() can't have been set before the
constructor is finished.
All of the various forms for _setting_ a style are still valid;
environment variables, qtquickcontrols2.conf, etc.
[ChangeLog][Important Behavior Changes] Custom styles must now have
a qmldir that lists the files that the style implements. For example,
for a style that only implements Button:
---
module MyStyle
Button 1.0 Button.qml
---
In addition, there is now only one valid, case-sensitive form for style
names: "Material", "MyStyle", etc.
These changes are done to help enable the compilation of QML code to
C++, as well as improve tooling capabilities.
[ChangeLog][Important Behavior Changes] The following API was removed:
- QQuickStyle::addStylePath()
- QQuickStyle::availableStyles()
- QQuickStyle::path()
- QQuickStyle::stylePathList()
- QT_QUICK_CONTROLS_STYLE_PATH
This API is no longer necessary and/or able to be provided now that
styles are treated as regular QML modules.
Task-number: QTBUG-82922
Change-Id: I3b281131903c7c3c1cf0616eb7486a872dccd730
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
| |
As of Qt 6, the latest version will be used by default. This saves us a
lot of effort in terms of version bumps.
Task-number: QTBUG-82922
Change-Id: I74eba8185ec3ccc75bc293d4b2ea87d59e2d9928
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
This is getting its own repository as part of the move to the
marketplace.
Task-number: QTBUG-84172
Pick-to: 5.15
Change-Id: I2f963c298d6ef95e0832f95aa1e1ea809f4867a2
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
|
|
|
|
|
| |
Change-Id: I3a57449c9025e22414b8337fcffdeb0f4d769af2
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
| |
Initial conversion of QtQuickControls2 tests.
Change-Id: I7e09e387ec90f89cc2856c7f7f2cb810b03b7fa3
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change makes all Qt Quick Controls 2 imports match the current
Qt minor version, which is 12 as of this patch.
It also updates all other Qt Quick imports to match.
This will also make future version bumps easier as all version numbers
in existing code/docs will match.
The following commands were used to verify that no old versions remain:
for i in `seq 0 11`; do git grep "import QtGraphicalEffects.*1.$i$"; done
for i in `seq 0 11`; do git grep "import QtQuick 2.$i$"; done
for i in `seq 0 11`; do git grep "import QtQuick.Layouts 1.$i$"; done
for i in `seq 0 5`; do git grep "import QtQuick.Controls.*2.$i$"; done
for i in `seq 0 11`; do git grep "import QtQuick.Templates 2.$i as T$"; done
[ChangeLog] From Qt 5.12 onwards, all import versions in
Qt Quick Controls 2 follow the same minor version as Qt's
minor version number. For example, the import version for Qt 5.12 is:
"import QtQuick.Controls 2.12".
Change-Id: I6d87573f20912e041d9c3b7c773cc7bf7b152ec3
Fixes: QTBUG-71095
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
|
|
| |
Make sure dynamically created QML components are destroyed when
going out of scope, and print out the error when creation fails.
Change-Id: Ie0ed785780cb861dd057adda8f4da399dd4986d2
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For example, qtquickcontrols2-label.qml outputs:
- qtquickcontrols2-label.png (Default)
- qtquickcontrols2-material-label.png (Material)
- qtquickcontrols2-universal-label.png (Universal)
This allows us to take screenshots with different styles without
overlapping names and error-prone manual renaming.
Change-Id: Ic475ee0d95539a1122e37780f8cec038e2fc9446
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
| |
For example, don't take screenshots of qtquickcontrols2-material-*.qml
snippets when running with another style than the Material style.
Change-Id: Ifef5b841d16314ba5d131a7d56f57251d6780ae7
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The component loading code has been adjusted so that it can load
snippets that use either a Window root element too.
This speeds up the test a lot in the CI, and allows us to flatten
the snippet-structure. Set SCREENSHOTS=1 environment variable to
take screenshots.
Change-Id: Ibd9e76befe62044dd1374899f18ea3d8c7ad454b
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
| |
Change-Id: I29b36eaa417986be24c917bc9c9b1f6441773e3d
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The test is sharing (and showing, and resizing) the same view for
every snippet. In the CI system we keep having issues that sometimes,
after running the test for a while, the window content stops being
resized as appropriate. Considering that QQuickWindow resizes its
content item in resizeEvent(), this probably means that in the CI
the window does sometimes not receive the resize event as appropriate.
Before, the window was left hanging there after taking the very first
screenshot. Now we try to close the window so that each and every
screenshot snippet gets loaded while the window is hidden, shows it,
and waits for it to become visible/active. This will hopefully ensure
that the window will always receive an "initial" resize event.
Task-number: QTBUG-58606
Change-Id: If4b38443cfdc9175f313bf8e70c7daf42d34f687
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Don't show the window until we start taking the screenshots and
actually need a visible window.
Task-number: QTBUG-58606
Change-Id: I2fcab3b54f0faf67588a21e0732d2e6dbcee9194
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This test contains a lot of data rows. Re-creating a QQuickView for
every data row puts a lot of stress on the system. In the new Open
Nebula -based CI, things start consistently exploding after a random
amount of tst_snippets data rows. This change fixes that.
Task-number: QTBUG-58196
Change-Id: I6549944a6d7b2bd384d09ee974bee6423ffe625c
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
|
|
|
|
|
| |
Change-Id: If68cff4efacc7dc5719c8b8e61937e85e9076870
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
| |
Change-Id: Ic3764ca6ba70b3b9557a6c2088698c40456a93f5
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
|
|
|
|
|
|
|
|
| |
There are now snippets using the Material and Universal styles,
so they must be declared as dependencies.
Change-Id: If0db9469ae71876920752a9e286f7ab95673ad4d
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| |
| | |
Add a separate test for non-screenshot snippets and move the screenshot
snippets to their own folder.
Change-Id: Ic3e7370321e346b83f7df42205e204d1265ce5b0
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
|
|\|
| |
| |
| | |
Change-Id: Ief98cd56abd13cfa4e30578e150207462a8243b8
|
| |
| |
| |
| |
| |
| |
| |
| | |
And add QT_NO_FOREACH define to .qmake.conf.
Now QuickControls2 is 'foreach' free.
Change-Id: I98695258859decadae6fd2f23f5f6f5ef2b0550f
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
|
|/
|
|
|
|
|
|
|
|
|
|
| |
Controls must import templates version 2.1 in order to "inherit"
1-revisioned properties, methods, and signals. So far, this has
been done case by case, but it's less error prone and more clear
to change them all. For example, if you ever see a source file
pasted/linked somewhere, it's easy to identify the version it
belongs to.
Change-Id: I41609ec1a22bc05ac3e79f953a147ca42d9e0786
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
| |
e4a7b9e8e changed this when it shouldn't have.
Change-Id: I75d1283f9fab74e137d2fc35654eaa909c1c819d
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
|
|
|
|
|
|
|
|
| |
So that we don't refer to internal types, as these make copying and
pasting snippets difficult.
Change-Id: I6f3b943d2eed48beb7a64690c707924e2c5a8078
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
Change-Id: I917f7e83219788fc63389773eb07ee39757bed7f
Task-number: QTBUG-51003
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
|
|
|
|
|
|
|
|
| |
Most doc example snippet files were renamed in ca8f57f, the test needs
to be updated accordingly.
Change-Id: I633ace53b7aaf8853b6eae5c8c60a90c2ae38dc2
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: I17bb9131603da912597777b2ec0b9be3894ed858
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: Id3be5a62dec38d610695d71ad792016fabdc922d
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
| |
They are part of the documentation, but just auto-tested to ensure that
they are actually creatable and don't throw warnings. Therefore the
logical place is in the doc/snippets folder instead of somewhere in the
tests/ tree.
Change-Id: Id79a19890f7457ef277e7434a3fc6b6fb20eaa25
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
| |
Better not expose the extra Text item in the API. Ideally it should
be implemented as a scenegraph node. We might even want to promote
the placeholderText property (and add placeholderColor) to TextInput
and TextEdit in Qt Quick core.
Change-Id: I4f443c77d1c696b87a50ee184f868713dd50316f
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
|
|
|
|
|
|
|
| |
Change-Id: I45e01199453ac5fd64b7f98c165cc12eeb0ce8c3
Task-number: QTBUG-48989
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
Reviewed-by: Nikita Krupenko <krnekit@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It came up in discussions at the QtWS that even if we have Tumbler,
people still want and expect to have the good old SpinBox control.
SpinBox has it pros, such as that it might work better inside a
vertical Flickable, and that in multi-field forms it might visually
align better with other controls like TextFields.
An early mockup of SpinBox was removed in 1c0edf0. A quote from the
commit message:
SpinBox is a desktop centric control. It won't be provided in
Qt Quick Controls 2.0, but maybe later when desktop support is
re-considered. Qt Quick Controls 2.0 will focus on embedded and
mobile. SpinBox is still available in 1.x.
While it is true that SpinBox might not be optimal for touch or
mobile, the real reason for the removal was that validating decimal
number input is very complicated. Even though locales have well-
defined thousand separators and decimal points, users have very
different expectations on how strict or relaxed the input
validation should be.
This change re-introduces a touch-optimized integer-based SpinBox.
What makes it more touch friendly than the earlier version is that
it has now auto-repeating buttons. Limiting it to integers avoids
the decimal number input validation problem. We can introduce a
separate DoubleSpinBox later if necessary - just like in QtWidgets.
Change-Id: I2819060eb5d1ae6a8c00b0f12be703456085079d
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: Iba6e3503d20e1f141c5dd81a2eeab6176e809914
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
|
|
|
|
|
| |
Change-Id: I5eb80f21edb50413b33a96b934466964e56462aa
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: Id866d226fc651a39fffd887600b4bf54d2b7ac6e
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: I1ff8df098a358d39020a63aa8f1d920f620f838e
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: I6680d891bd9a1c54746cc97c5eae742c1cca4e62
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: I991af7acd1510960aebcced718525b5c1d3842a8
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: I092b50dd0f184523ec28e4145a4e6b1eab1c762a
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: I2945a3c367244ec0b92cc8f2ba84a7b052d9a514
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: I744f622edbc6589e9371518f82431220b667e03e
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
|
|
|
|
|
|
| |
Change-Id: Iabeb3ebc54f64d2f3d0b008a5f5a16a89f701f85
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
|
|
|
|
|
|
|
|
|
| |
This is basically Slider, except with two handles.
It's used to specify a range of values.
Task-number: QTBUG-48667
Change-Id: Ib4f9afe5dc8343e307610943d338a2b574a01e4d
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
|