| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
Helps to debug where the .qml files are selected from. Especially with
the upcoming Qt Quick Compiler and QRC changes, it will be important to
be able to verify which files are being used, but this also helps
investigating issues with custom styles.
Change-Id: I2b2b4f57b3288e0ab204c624ef6d8eb92268698b
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Old header.LGPL21 header was used at some files. Replase those with
new header.LGPL one
Task-number: QTBUG-57147
Change-Id: I7d707c15b33c0f14810ef8fffef9f74dd4192e64
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
While selecting style files, the standard built-in platform and local
file selectors ("+linux", "+macos", "+windows"...) must be prefixed
with the standard file selector indicator ("+"). Previously the style
selector would not pick up platform-specific style files unless they
were supplied without the prefix.
[ChangeLog][Controls][Styles] Fixed the style selection mechanism so
that now it is possible to organize platform and locale-specific files
into sub-directories, such as "+linux", "+macos", and "+windows".
Change-Id: Ia44b6f14fd0247943486fd27609147827bda9666
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
While debugging QTBUG-59026, I found out that QLocale::name() is empty
with the "C" locale. Because the empty locale name was used as a selector
in QQuickStyleSelector, it ended up registering QML types using URLs
that contained a double slash (empty locale selector matched):
QtQuick/Controls.2/Material//RadioButton.qml
At the same time, the QML engine imported implicitly internal QML types
constructing the URLs directly based on the location on the file system
without a double slash:
QtQuick/Controls.2/Material/RadioIndicator.qml
As a result, the same QML module ended up having types registered from
two different URLs, which is not allowed.
This change simply prevents both problems. First of all, if the locale
name is empty for any reason, it won't be added anymore to the list of
selectors. Furthermore, the final selected URL is normalized to avoid
redundant dashes.
Task-number: QTBUG-59026
Change-Id: I19b890451aaddfe4277bb6b26bc3c1394a75a704
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
| |
Change-Id: If68cff4efacc7dc5719c8b8e61937e85e9076870
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
Change-Id: I0d37dd650e7be4e160d4d49dcb3c678c54f12218
Reviewed-by: Liang Qi <liang.qi@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|
Change-Id: I087a39baebc296a340739161874636926adaa56c
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
|