aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls/imagine/qquickimaginestyle.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Register C++ types declarativelyMitch Curtis2020-08-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* clang-tidy: fix readability-const-return-typeMitch Curtis2019-12-121-1/+1
| | | | | | | | | | | The warning was: qquickimaginestyle.cpp:46:1: warning: return type 'const QString' is 'const'-qualified at the top level, which may reduce code readability without improving const correctness [readability-const-return-type] Change-Id: Idcabe034f0e38a1b15b406d7bddc4662b6ea2261 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Styles: use C++11 default member initializationJ-P Nurmi2018-05-041-1/+0
| | | | | Change-Id: Ifd7521b8a7bfd7da91808dd00ebdcb59f2ba46dc Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Imagine: fix QRC pathsMitch Curtis2017-09-141-4/+26
| | | | | | | | | | | | | | | | | | | | | Using ApplicationWindow as an example, its NinePatchImage url is assigned like so: source: Imagine.path + "applicationwindow-background" If Imagine.path is set to ":/images" by the user, then the final URL would be: QUrl("file:///home/user/qt/qtbase/qml/QtQuick/Controls.2/Imagine/:/images/applicationwindow-background") We could use a QUrl for QQuickImagineStyle::path, but we don't want to support anything other than local paths. Instead, we add a private "url" property that returns a URL that we construct correctly in C++ ourselves, and then the Imagine QML controls files use that property. Change-Id: Ic4d1910bbc7f7b6f80f257496ae6131777a19401 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Add Imagine styleJ-P Nurmi2017-07-311-0/+147
The Imagine style is based on image assets. The style comes with a default set of images, but the images can be easily changed by providing a directory with images using a predefined naming convention. [ChangeLog][Controls] Added the Imagine style, which is based on image assets that can be provided using a predefined naming convention. Task-number: QTPM-517 Change-Id: I550d7dac9a9686d60bec15655ac92dea9f36149c Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>