aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports
Commit message (Collapse)AuthorAgeFilesLines
* Update to latest qml CMake APICraig Scott2021-06-052409-100994/+0
| | | | | | | | | | | | | | 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>
* Add FontDialog to QtQuick.DialogsOliver Eftevaag2021-06-041-0/+0
| | | | | | | | | | | Adding non-native FontDialog to QtQuick. This is a native FontDialog on platforms that support it, and a non-native Qt Quick FontDialog on platforms that don't. Fixes: QTBUG-87799 Change-Id: I43a59e3668a8a40f1d0c04a3c2506283d552a22b Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Remove no longer used dependencies.json filesCraig Scott2021-05-316-57/+0
| | | | | Change-Id: I82a18e7a0e768fe57c9cb08666b5486ecfa00ba8 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Fix MSVC warning C4065Kai Köhne2021-05-281-5/+8
| | | | | | | | | | MSVC doesn't like it when there's only a default switch: qquickwindowsstyle.cpp(2284): warning C4065: switch statement contains 'default' but no 'case' labels Pick-to: 6.1 Change-Id: I3d6072e88a3aeec3a6801c2b0ddffd8e9f511943 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Add QtQuick.DialogsMitch Curtis2021-05-277-0/+134
| | | | | | | | | | [ChangeLog][QtQuickDialogs] Added FileDialog. This is a native FileDialog on platforms that support it, and a non-native Qt Quick FileDialog on platforms that don't. Fixes: QTBUG-87797 Change-Id: Ia3a98b616479b818c96c232a0329750023079642 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Sync the visibility of the FocusFrame with the target itemAndy Shaw2021-05-271-1/+1
| | | | | | | Fixes: QTBUG-93994 Pick-to: 6.1 Change-Id: Ib9138f6bc59bcf7b97d5ccb478c7b9c434dfef64 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Don't access QStyleOption* without checking for nullptr firstVolker Hilsheimer2021-05-191-2/+2
| | | | | | | | | | | It can be nullptr as per the preamble to the function, and the fact that the parameter defaults to nullptr. Addresses code checker report 723994a37c58a4dcc3aeb573e1d517c5. Pick-to: 6.1 Change-Id: Id17c95314f4adfa48e7754120ecc36a2efac5403 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Doc: apps that never set a style in Qt 5 should set Basic in Qt 6Mitch Curtis2021-05-121-0/+5
| | | | | | | | | | This avoids surprises when moving to Qt 6, where the default style is now platform-dependent. Fixes: QTBUG-92158 Pick-to: 6.1 Change-Id: I44cede00379b507f97ae7ac51aa5717c1b6510a8 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Remove Qt Quick Calendar from overviewKai Köhne2021-05-111-4/+0
| | | | | | | | The module is only available on marketplace Pick-to: 6.1 Change-Id: I0910630b746b6eb4935fabdbc5148677c08bb234 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Imagine: fix GroupBox's bottom edge being clippedMitch Curtis2021-05-061-2/+1
| | | | | | | | | | Use the actual padding from the nine patch image rather than the hard-coded 12. Fixes: QTBUG-91924 Pick-to: 6.1 5.15 Change-Id: I4707ae173c088625657a135680619cf646e3a9e2 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* macOS, Slider: draw a focus rect, and not a focus ringRichard Moe Gustavsen2021-05-051-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | In the mac style, we draw the focus ring for a slider from QML around the handle. This has shown to be fragile, since UIKit doesn't draw the handle in the center of the rect we get when we query UIKit (using the [cell knobRectFlipped:slider.isFlipped]). And then the focus ring will be offset as well. While we could try to adjust the rect manually from QQuickMacStyle, this will only be quaranteed to work on top of the current macOS SDK (macosx11.1). So for that reason, this patch falls back to use the less correct, but more future safe, solution of drawng the focus ring as a rect around the handle instead. While this doesn't look native, it still looks better (and correct, for the uninformed) compared to an eliptic ring that is misplaced on the target. Fixes: QTBUG-93423 Pick-to: 6.1 6.0 Change-Id: Ibc00f12f9606cd66c8ff384967aa3ea0d7727964 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Native style: fix up some commentsRichard Moe Gustavsen2021-05-051-3/+3
| | | | | Change-Id: Id3d3db4b49dcbbc662a24eabb65ac6908577a4af Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* doc: document the native stylesRichard Moe Gustavsen2021-04-288-0/+162
| | | | | | | | | | | This patch will add documentation for the native styles that was added to Qt 6.0. Fixes: QTBUG-88220 Change-Id: Ib0703b3758d48586cd8465ea9188691b9e377064 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit 30cf78d48f6a3778e8b4ec2e2b8924b25fdc85cc) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CMake: Avoid duplicate symbol errors due to a common resource nameAlexandru Croitor2021-04-271-1/+1
| | | | | | | | | | | | | | | The macOS nativestyle plugin uses the 'qmake_immediate' resource name, which conflicts with any test / example that might create a resource with the same name. This is problematic in static builds because it causes duplicate symbol errors when linking. Use a different unique resource name instead. Pick-to: 6.1 6.0 Fixes: QTBUG-93172 Change-Id: I29dee69190d75fe11c8993353349e3db2004d276 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Fix build without features.shortcutTasuku Suzuki2021-04-272-0/+3
| | | | | | Change-Id: I871e115f27c3c43a9e9b2e23392cd1dcbfb0cec0 Pick-to: 6.1 6.0 5.15 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Fix build without features.imageformat_pngTasuku Suzuki2021-04-271-6/+3
| | | | | Change-Id: Idc5a1c175fa942e90830ae8b81f6627a729f7220 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Fix build without features.imageformat-xpmTasuku Suzuki2021-04-261-0/+2
| | | | | Change-Id: Ib125517f87be0dac22eaeba059a6cdfd18abb7b7 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Native style: fix statically built apps that links to both widgets and controlsRichard Moe Gustavsen2021-04-222-4/+24
| | | | | | | | | | | | | | | | | | | | | | The c++ symbols are already namespaced into QQC2. But since there is no namespace concept in obj-c, we use QT_MANGLE_NAMESPACE to wrap those symbols into a "fake" namespace by concatinating symbol name and namespace name together. The problem is that QT_MANGLE_NAMESPACE only take the QT_NAMESPACE into account, and not the additional QQC2 namespace. The result is that the application will fail linking because of duplicate obj-c symbols when you combine widgets and controls in a statically linked application. This patch will redefine the affected macros locally in qquickmacstyle_mac, so that both the Qt namespace and the controls namespace are taken into account. Pick-to: 6.0 6.1 6.1.0 Fixes: QTBUG-92883 Change-Id: Ic2f84ad9c0005fdd2553729d897cee113a4ff24d Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* QmlDesigner: Fix RangeSliderSpecifics snap modeHenning Gruendl2021-04-211-1/+1
| | | | | | | Task-number: QDS-4212 Pick-to: 6.1 6.0 5.15 Change-Id: I82d524960a34e9307ddf9b154a326d8fadc7387c Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* controlsimpl: Add QtQuick dependencyMaximilian Goldstein2021-04-211-0/+2
| | | | | | | | Since most Impl elements are QtQuick based we need to add it as a dependency or else the compiler and linter will get confused. Change-Id: Id7532d254b6d9b305342ab85cc6466e1bde26b65 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* CMake: Fix qml module version to use the repo project versionAlexandru Croitor2021-04-1516-16/+16
| | | | | | | | | | | 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>
* Ninepatch: keep resetNode status to not lose track of ↵Laszlo Agocs2021-03-311-1/+6
| | | | | | | | | | | | ImageNode->NinePatchNode changes Basically does what 788865b805bc91151ac8fe18bf7b92b1212ee07d did, but on the other branch. Pick-to: 6.1 6.0 5.15 Fixes: QTBUG-87236 Change-Id: Ie8371de8a9d49054c888e4bffb7e89392a6d7c07 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Doc: Use \qmldefault instead of \defaultPaul Wicking2021-03-233-3/+3
| | | | | | Task-number: QTBUG-81525 Change-Id: I1b79fde191bfe0ac11778baf352409ace4cd5a56 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Generate and install qmltypes for all pluginsMaximilian Goldstein2021-03-186-1/+7
| | | | | | | Pick-to: 6.1 Change-Id: Ib6f0aa7d2fe663f8d1ba090d2c62d57e0073a526 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Doc: Change section titles that cause bad linksPaul Wicking2021-03-111-3/+3
| | | | | | | | | | | Section titles are valid targets for QDoc's autolinker. When they are identical to other valid link targets, such as for example a class, these sections may cause invalid links. Pick-to: 6.0 6.1 Task-number: QTBUG-91141 Change-Id: I466b2d21be030cd34b2a734d5126c45ff763127b Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Remove redundant qmldir filesAlexey Edelev2021-02-2317-754/+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>
* Fix namespaced Qt buildKarsten Heimrich2021-02-171-3/+3
| | | | | | Pick-to: 6.1 Change-Id: I688bdd73c939304f572d0e162e7aa09499bf737f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Remove QMake project filesJoerg Bornemann2021-02-1130-2437/+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>
* Fix MSVC warnings about precision loss when converting double to floatFriedemann Kleint2021-01-144-4/+4
| | | | | | | The warnings appeared after porting QCcolor to float. Change-Id: I248f15a7a403281e849f030e412c159f9732261e Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QQuickStyleItem: add debug flag 'SaveImage'Richard Moe Gustavsen2021-01-132-0/+12
| | | | | Change-Id: Ifbaadd993924022b1351927aaf3987cb94c74df8 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Windows: add 9p margins to scrollbarRichard Moe Gustavsen2021-01-132-0/+28
| | | | | | Pick-to: 6.0 Change-Id: I8d56f7b7071c51d4dfc88e12864bc3e0e7c5ab10 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Ensure the ninepatch image is detachedLaszlo Agocs2021-01-131-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some more contrived usages of nine patch images can uncover an issue with the nine patch node implementation when used together with the threaded render loop of Qt Quick: pixmapChanged generates a QImage that references external data, which then gets passed to the scenegraph in updatePaintNode during the scenegraph's sychronization phase. This pattern (QSGTexture from non-data-owning QImage) should be avoided in general, because when the gui thread gets unblocked and continues after the sync phase, it could invalidate the data the QImage points to. If now the independently running render thread happens to try accessing the data (still the QImage that got passed in in the sync phase), bad things may happen. While it can be difficult to reproduce an actual crash (without ASAN and such), logging with the specially crafted example code shows that the logic is problematic if non-owning QImages are involved: (the pointers are the QImage's constBits) - pixmapChange 0x1f1053a5954 [gui thread] - updatePaintNode 0x1f1053a5954 [render thread, gui blocked] - beforeRendering [render thread] - pixmapChange 0x1f1053e7424 [gui thread] - QSGPlainTexture bind/update 0x1f1053a5954 [render thread] // but 0x1f1053a5954 may be invalid at this point if not owned by the QImage passed to createTextureFromImage - frameSwapped [render thread] Pick-to: 6.0 5.15 Fixes: QTBUG-88162 Change-Id: Id83d04fce668a3e05d150c086abdecc9d59e51e8 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Use CMAKE_PROJECT_VERSION for VERSION of QML modulesMitch Curtis2021-01-1310-10/+10
| | | | | | | | | | 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>
* QQuickStyleItem: use correct enum numberRichard Moe Gustavsen2021-01-111-1/+1
| | | | | | | | | | It should of course be 4, not 3. The result of it being 3 is that we would always also print info when debugging imagerect. Pick-to: 6.0 Change-Id: I257159b25b8aad1848d82af9855ecd194e7360a0 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Doc: Fix typo in \sa statementNico Vertriest2021-01-081-1/+1
| | | | | | Pick-to: 6.0 Change-Id: I3461744b8e784d9c3c775f06bffe8f7b3965073c Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Reset the opacity and scale properties after the exit transitionAndy Shaw2021-01-061-4/+4
| | | | | | | | | | | | | | | By resetting the opacity and scale properties after an exit transition we are ensuring that it does not lose the original values that the user may have set. [ChangeLog][Important Behavior Changes][Popup] After the exit transition is finished, then the opacity and scale properties will be reset to their values before the enter transition is started. Pick-to: 5.15 Fixes: QTBUG-87283 Change-Id: I2b192c96eaea2906d968341255e80cd19be177e6 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Document that styles must be explicitly imported for static buildsMitch Curtis2021-01-052-1/+4
| | | | | | | Task-number: QTBUG-52466 Pick-to: 6.0 Change-Id: Ibf5c6f4079381c5ac507812f97439dbb49ada074 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Only connect to the items window signals if it has a windowJan Arve Sæther2020-12-162-2/+15
| | | | | | | | | | | | | | | | | If the styleitem was created in a control without a window, it failed to connect to the activeChanged() signal of QQuickWindow. It would consequently warn about invalid null parameter to QObject::connect() If the control was added to a window at a later point, it would also not connect to the activeChanged() signal of QQuickWindow. This could cause that the control was rendered as it would be rendered in an inactive window, even if the window actually was active. Task-number: QTBUG-88553 Pick-to: 6.0 Change-Id: I3aa5948e150f0f4baa204943ec43ea8922421e75 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Add support for ScrollBar arrow buttonsJan Arve Sæther2020-12-106-23/+121
| | | | | | | | | | | In order to achieve this, it separates out QQuickSpinButton into a separate file (and renames it since it's not only purposed for SpinBox anymore). This allows it to be also used by QQuickScrollBar. Fixes: QTBUG-88115 Pick-to: 6.0 Change-Id: I2dea42b29750b7bc619031f40a43717fc10c177b Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* CMake: Fix nativestyle qmldir dependenciesAlexandru Croitor2020-12-102-4/+4
| | | | | | | | | | | | | | | pro2cmake chokes on converting the nativestyle project, because it expects to find a second argument after the depends clause. Add an 'auto', and regenerate the project. Amends a3253c37903e95706f011bc03093160236b57bdc Pick-to: 6.0 Task-number: QTBUG-88492 Change-Id: I4c9114780e17f5bc21a43511e75207eaef5e7550 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Drop documentation dependencies to removed modulesVolker Hilsheimer2020-12-041-1/+1
| | | | | | | | | Silences qdoc warnings about unlocatable index files, doesn't introduce any new warnings from missing link targets. Pick-to: 6.0 Change-Id: I36fe481d57e631389c485aa41c1a6fac5d997680 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Add qtqmlmodels as a documentation dependencyVolker Hilsheimer2020-12-031-1/+1
| | | | | | | | | QQuickPlatformMenu links to the Instantiator type from this module. Pick-to: 6.0 Change-Id: If59f6a64ac0144a7e6697b45e970c9f091bbb2e8 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Doc: Use explicit linkage with target_link_librariesKai Koehne2020-12-031-1/+1
| | | | | | | | | | | | | | | The Professional CMake book suggests always using explicit linkage with target_link_libraries, so let's use that. Whether to use PUBLIC or PRIVATE depends on the context. But let's be conservative and advise on using PRIVATE by default. Also prefer the versioned target name over the unversioned one. Task-number: QTBUG-88935 Pick-to: 6.0 Change-Id: Icf96616e2229b48cd3304a84d45314e69b1e40a9 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* qquickstyleitem: let the image size be aligned with dprRichard Moe Gustavsen2020-11-302-8/+45
| | | | | | | | | | | | | | The size of the image we paint the item on should have a size that will return a whole number when it's divided by the current dpr. Otherwise the texture mapping that occurs in the scenegraph later will work on fractions that will cause drawing glitches to occur. Fixes: QTBUG-89006 Pick-to: 6.0 6.0.0 Change-Id: I5e65aebbda9598d88bef7af2398b3fe3f2d16a87 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* qquickstyleitem: ensure that the size of the node is at least the size of ↵Richard Moe Gustavsen2020-11-301-21/+20
| | | | | | | | | | | | | | | the texture The size of the node should not be smaller than the size of the texture. Otherwise the image will look truncated or wrapped. This is especially important now that the image can be scaled up to be dpr aligned. Task-number: QTBUG-89006 Pick-to: 6.0 6.0.0 Change-Id: I0bd82faec89d6e7c2e79541a30d6b98200ebd5a0 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Windows, CT_LineEdit: don't take dpr into account when calculating geometryRichard Moe Gustavsen2020-11-301-6/+4
| | | | | | | | | | | | | | | | The geometry calculated by the style should not take dpr into account. The nativestyle framework (and the scenegraph) understands that all geometry returned by QStyle will need to be scaled according to the dpr. We will for example set a dpr on the QPainter (or the QImage it draws on) before we ask QStyle to draw. This means that the style should not scale the geometry used in the drawing calls to QPainter since QPainter will do this automatically. Task-number: QTBUG-89006 Pick-to: 6.0 6.0.0 Change-Id: Idfcc6690e0ae0062ca00cb829510d2b68c26ebd4 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Doc: Fix QDoc warnings Qt Quick ControlsNico Vertriest2020-11-302-3/+6
| | | | | | | | | | | Non-existing links: - Qt Quick Calendar - Windows Style Wrong link to macOS style Pick-to: 6.0 6.0.0 Change-Id: I410ef79d71d2ff25eea8cc090516b431e046fc0b Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Make adjustments for using QFont::setFamilies()Andy Shaw2020-11-304-16/+17
| | | | | | | | | | Since we only depend on using setFamilies() now instead of setFamily() then we can rely on the fact that it will be resolved correctly, so we can remove the code that was ensuring that family() would take precedence if families() was empty. Change-Id: Iea1464ec840dc76c04a4acae445cab367e03d3ca Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Doc: Remove version numbers for import statement in snippetsJerome Pasion2020-11-268-37/+37
| | | | | | | | | | | -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>