aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Use qmlRegisterModuleImport() to register stylesMitch Curtis2020-08-2617-431/+254
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Convert remaining imperative type registration to declarativeMitch Curtis2020-08-269-111/+16
| | | | | | Task-number: QTBUG-82922 Change-Id: I34e9f32d5f695aaac7acf6b4aac30e8a2311e0cf Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* List "privately" registered QML files in the qmldir for each styleMitch Curtis2020-08-263-0/+20
| | | | | | | | This is required in order to move away from imperative registration. Task-number: QTBUG-82922 Change-Id: I4b2a727d69e66c29629920a3711548e02f72ce49 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* List publicly registered QML files in the qmldir for each styleMitch Curtis2020-08-265-0/+310
| | | | | | | | | | | | | | | | | | | This is required in order to move away from imperative registration. Some styles do not have implementations for all types, in which case they fall back to the Default style. The list of those types are: AbstractButton 2.0 AbstractButton.qml Action 2.3 Action.qml ActionGroup 2.3 ActionGroup.qml ButtonGroup 2.0 ButtonGroup.qml Container 2.0 Container.qml Control 2.0 Control.qml ScrollView 2.2 ScrollView.qml (except Imagine) Task-number: QTBUG-82922 Change-Id: If51c8232d7a8b12f6d1f988cc7ce2d8edca1e467 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Remove all version numbers from QML importsMitch Curtis2020-08-26426-1609/+1609
| | | | | | | | | 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>
* Remove ".2" from TARGETPATH, resource prefixes, etc.Mitch Curtis2020-08-2621-23/+23
| | | | | | | | | | | | Qt Quick Controls 1 will be removed in Qt 6, so now we can have the simplified path for ourselves. Having the .2 in the path causes issues for importing now that the version is being bumped to 6. Task-number: QTBUG-82922 Change-Id: I0b92cdd44c42c19b1c82e7b9a7959b86ac26c6e2 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Register C++ types declarativelyMitch Curtis2020-08-26222-917/+1502
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Move Default style out into its own pluginMitch Curtis2020-08-26104-74/+162
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In upcoming patches, we start registering C++ types declaratively. A condition of doing so requires that each .pro corresponds to one QML module. This conflicts with the QtQuick.Controls import, which currently does quite a lot: - Registers (and selects) QML files for the style that was set - Registers private C++ utility types (such as IconLabel) that are useful for all styles under the QtQuick.Controls.impl import - Registers private C++ types that are only useful for the Default style (such as BusyIndicatorImpl). The reason it does so much can probably be explained by the intended usage of Qt Quick Controls 2; when you do import QtQuick.Controls 2.0 you get access to the QML types (e.g. Button) that the style you're using provides. So if you're using the Material style, you'll get a Material style button. API-wise, the button is identical to any other button, because the types in QtQuick.Templates are what we advertise as the public API. If we didn't have this functionality, users would need to import specific style imports to use controls, and the convenience of being able to simply start the application with a different style by e.g. passing an application argument would be lost. To support declarative registration of types while also supporting the existing use cases, we split out the Default-style-specific stuff into a QtQuick.Controls.Default import. Task-number: QTBUG-82922 Change-Id: Ib4f1620cae78d7acdc13d9ac0752a020bc22f3ea Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Stop using resolvedUrl() to resolve QML filesMitch Curtis2020-08-269-451/+36
| | | | | | | | | | | | | | | | | | | | This is necessary to move away from imperative type registration of QML files (i.e. qmlRegisterType()). A later patch will use qmlRegisterModuleImport() to register the QtQuick.Controls import with the style set by the user, which will require each style to have a qmldir listing the files that it provides. Note that some plugins still register QML files, but these registrations will have to stay for now until we can split out "impl" plugins in later patches where those files can be registered. tst_qquickstyleselector will be added back in some other form in a follow-up patch. Task-number: QTBUG-82922 Change-Id: I8182533d9912ed493efda6eb91c69fc064af07ee Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QQuickSpinBox: fix another "function expressions as statements" warningMitch Curtis2020-08-201-1/+1
| | | | | | | | | | This amends d5fbbddd7794265f24d392d33c4874ac756cb9c9 by also fixing valueFromText(). Task-number: QTBUG-64151 Pick-to: 5.15 Change-Id: I02b053bb4d4579e86eaaa2279826f3b103800fdf Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Document that pop() does nothing if depth is less than or equal to 1Mitch Curtis2020-08-201-0/+3
| | | | | | | | | | This note is already in the detailed description, but users looking at pop() can easily miss that. Pick-to: 5.15 5.12 Task-number: QTBUG-85903 Change-Id: I92c71c8d98b2a83aefbc99229e5b16a6fb33b937 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Doc: Drop dependency on qtgraphicaleffectsPaul Wicking2020-08-191-1/+1
| | | | | | | qtgraphicaleffects is not part of 6.0, drop the doc dependency. Change-Id: I6170d19b148a860ef9516de6f4da58067ebb2f06 Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io>
* SwipeDelegate: don't allow calling close() when pressedMitch Curtis2020-08-191-0/+5
| | | | | | | | | | This conflicts with the behavior of SwipeDelegate. The released() or clicked() signals should be used instead. Fixes: QTBUG-85804 Pick-to: 5.15 Change-Id: I06111b63941f54c06f0e1b828d17264f37d765d5 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* SwipeDelegate: don't emit closed() when already closedMitch Curtis2020-08-191-1/+5
| | | | | | | | | | If the mouse is released while our position is 0, it means we were clicked, and we don't need to begin any transitions to close. Fixes: QTBUG-85806 Pick-to: 5.15 Change-Id: Ic521f48e2977c1a99dbecaa585792a7798b9d749 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Prevent against re-entering prepareExitTransition after a focus changeAndy Shaw2020-08-191-1/+1
| | | | | | | | | | | | | | | | | When a popup is hidden, then it will trigger a prepareExitTransition which can cause the active focus to be lost. If the popup's visibility is tied to that fact then it can retrigger the transition which means the active focus does not go back to where it should. Therefore, we check if hadActiveFocusBeforeExitTransition is false before going through that process as then it will only be called the first time the popup is hidden. Pick-to: 5.15 Fixes: QTBUG-85884 Change-Id: I68054aeb48447617b4235ce6467514a17f1073ba Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Get the scale of the popup item when setting the parent itemAndy Shaw2020-08-172-8/+11
| | | | | | | | | | | As there are some styles that will do an transition which animates the scale then we need to size and position based on the final scale it will have to avoid a jump after it has finished the transition. Pick-to: 5.15 Fixes: QTBUG-84488 Change-Id: I4571eb18c921e81de319838ac0e8d3fe3513d438 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Fix event refactoring warnings and errorsMitch Curtis2020-08-119-44/+44
| | | | | Change-Id: I426b4f75066c9db72759398e4d76fd5323044d57 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Fix QQmlDirParser build error with static buildsMitch Curtis2020-08-111-1/+1
| | | | | Change-Id: I5efa74355cddd662787613af3ac3cf665a6c146c Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* ComboBox: add implicitContentWidthPolicyMitch Curtis2020-07-162-3/+192
| | | | | | | | | | | [ChangeLog][Controls][ComboBox] Added implicitContentWidthPolicy, which controls how the implicitContentWidth of the ComboBox is calculated. This can be used to automatically ensure that text is not elided. Fixes: QTBUG-78281 Change-Id: If669fa4ef05e5da498992843469000ef39c335ec Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Doc: mention cache property in the relevant placesMitch Curtis2020-07-154-0/+5
| | | | | | | | This was missed in 033564edf5b79e32da63597930e25105a3442f01. Pick-to: 5.15 Change-Id: I7bc465338d5b9960ad7b746a816cd33efcca1bdc Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Remove another binding to parentMitch Curtis2020-07-151-1/+1
| | | | | | | | | | | | | | Similar to what was done in 456d26e97ec7745fdbd1afaaaa6c1dc217eca060. The warning was: Material/ComboBox.qml:68: TypeError: Cannot read property 'Material' of null Task-number: QTBUG-82989 Pick-to: 5.15 Change-Id: Id82d62d6aca0c0e517d6f8630c51f54739aea95f Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix crash on exit when centering Popup within Overlay in StackView itemMitch Curtis2020-07-142-1/+31
| | | | | | | | | | | If a Popup is centered within an Overlay, and that Overlay is destroyed before the Popup, we must make sure centerIn is cleared so we don't try to access a dangling pointer. Fixes: QTBUG-84579 Pick-to: 5.15 5.12 Change-Id: Icb2750f847f9d5710725bedc4d1c92bf4c122c03 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Use QList instead of QVectorJarek Kobus2020-07-093-3/+3
| | | | | | Task-number: QTBUG-84469 Change-Id: I4991ab7ce8ba8d2522005b1b0a78f7b474c54419 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Adapt to renaming of QQmlMetaType::isModule()Ulf Hermann2020-06-301-2/+4
| | | | | | Change-Id: I2db7915377caec6c80e04979a5813c605ae33e09 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* Add ; to Q_UNUSEDLars Schmertmann2020-06-308-17/+17
| | | | | | | | | This is required to remove the ; from the macro with Qt 6. Task-number: QTBUG-82978 Change-Id: I92ef02ede041d3965151165a479a1ea0549cc0f9 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Doc: Update docs with cmake package informationNico Vertriest2020-06-261-0/+1
| | | | | | Task-number: QTBUG-85179 Change-Id: Ib95b1b18ea2d9f0a1f80685302bef4805fcaf5f3 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* QQuickSplitHandleAttached: pass correct d ptr to QObject constructorMitch Curtis2020-06-251-1/+1
| | | | | | | | Not sure how this ever worked, but the tests have been passing, so... Pick-to: 5.15 Change-Id: I6afecc692d56e5e58687cf5b60e87510275ec2b1 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Fix warnings after deprecation of QApplication::keyboardModifiersVolker Hilsheimer2020-06-251-2/+5
| | | | | | | | Use QInputEvent::modifiers where possible, disable warnings otherwise. Change-Id: Ifcb4ff4395e4a3eb1e6cce24e169b628346769be Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Document how to use CMake for Qt Quick Controls 2Kai Koehne2020-06-253-11/+24
| | | | | | | Task-number: QTBUG-73058 Change-Id: Ib8f9dd5a1c44e1fc2487ca75226ed2ee8f7867d4 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QmlDesigner: Fix DialSpecifics snap modeHenning Gruendl2020-06-161-1/+1
| | | | | | | Pick-to: 5.15 Task-number: QDS-2278 Change-Id: I74be7066b1bf2a0827a3fe7dca7b46e466ef8c58 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Replace calls to deprecated QEvent accessor functionsShawn Rutledge2020-06-1111-44/+44
| | | | | | | | | | | | | | | | | | | | Several event accessors were deprecated in qtbase/24e52c10deedbaef833c0e2c3ee7bee03eacc4f5. Replacements were generated by clazy using the new qevent-accessors check: $ export CLAZY_CHECKS=qevent-accessors $ export CLAZY_EXPORT_FIXES=1 $ ../qt6/configure -platform linux-clang -developer-build -debug -no-optimize-debug -opensource -confirm-license -no-pch QMAKE_CXX=clazy $ make $ cd ../../qt6/qtquickcontrols2 $ find . -name "*.clazy.yaml" $ clang-apply-replacements . Task-number: QTBUG-20885 Task-number: QTBUG-84775 Change-Id: I7fb9b0603341ea1a0c3a00f79ebd642a6354702d Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Qt6: Port QtQuickControls2 to QStringViewKarsten Heimrich2020-06-101-7/+7
| | | | | | Task-number: QTBUG-84319 Change-Id: I7aaae36df79b1a935a3c4d31039cb880405f0d63 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Use QList instead of QVectorJarek Kobus2020-06-0914-41/+41
| | | | | | Task-number: QTBUG-84469 Change-Id: Ic36741d2bcaec8d5e5dc96638b7122f8ce51bdb2 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* ApplicationWindow: remove deprecated overlay APIMitch Curtis2020-06-0811-154/+2
| | | | | | | | | | [ChangeLog][Controls][ApplicationWindow] The deprecated overlay properties and attached API were removed. Use the Overlay attached type instead. Task-number: QTBUG-84715 Change-Id: I0781ea55ea502ffe5277385e82492291724d2090 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* QQuickStackView: deprecate Transition enum valueMitch Curtis2020-06-082-6/+9
| | | | | | | | | | | | | | | | | | | | bc86a96c56934d98d641844319a905753f56895a added a comment that this was deprecated, but didn't document it as deprecated or have any mention of it being deprecated besides that one comment. As we are dynamically evaluating the JS arguments in C++, we don't need to have a "default" enum value; we can detect omission of the argument and act accordingly. It's now too late to deprecate it for Qt 5, but we can do it for Qt 6. [ChangeLog][Controls][StackView] The StackView.Transition enum value was deprecated. The operation argument can be omitted in order to use the default transition for any given operation. Task-number: QTBUG-84715 Change-Id: I530235beb2ebf56deb6f82ab54e269322e92a0a5 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Add missing paletteChanged() to setForeground() in Material styleJoni Poikelin2020-06-081-0/+1
| | | | | | Pick-to: 5.15 Change-Id: I7396885688c6091a948f2865ff716e84f7f5195b Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Platform: remove deprecated iconName, iconSource APIMitch Curtis2020-06-056-160/+2
| | | | | | | | | | | | | [ChangeLog][Platform][Menu] The deprecated iconName and iconSource properties were removed. Use the icon property instead. [ChangeLog][Platform][MenuItem] The deprecated iconName and iconSource properties were removed. Use the icon property instead. [ChangeLog][Platform][SystemTrayIcon] The deprecated iconName and iconSource properties were removed. Use the icon property instead. Task-number: QTBUG-84715 Change-Id: I91a8ceb1a291b78fc342756de24e18b818a49b4b Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Merge "Merge remote-tracking branch 'origin/5.15' into dev"Qt Forward Merge Bot2020-06-0518-29/+345
|\
| * Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-05-1418-29/+345
| |\ | | | | | | | | | Change-Id: I24ff9bec33e0bd8785e3d571212a7506b6501854
| | * ComboBox: fix currentValue not being updated on model changesMitch Curtis2020-05-121-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make sure we call updateCurrentValue() where necessary. Fixes: QTBUG-83554 Change-Id: Iad593c2fc094a26429de1eda91bbdb152ffee2c2 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> (cherry picked from commit 3adeceaa1cfe5fae55ca6bd75226c52363a7e7d3) Reviewed-by: Qt Cherry-pick Bot
| | * QmlDesigner: Update properties in property editorHenning Gruendl2020-04-2712-8/+247
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add missing and cleanup existing properties in property editor. Task-number: QDS-1502 Change-Id: I33259e244d5a4471e01f7fc1845ad05414367eae Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
| | * Update plugins.qmltypes for 5.15Jani Heikkinen2020-04-156-21/+98
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-82253 Change-Id: I93ae7b51b902050020cf7a79510b8325060181c5 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
| | * Material: revision sliderDisabledColorv5.15.0-beta4v5.15.0-beta3Mitch Curtis2020-03-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | This amends 0d5a43fa8. Cherry-picked from branch: dev Change-Id: I68c500ae874c92467b414dbf37eec9d55b3c730f Reviewed-by: cherrypickbot
* | | Remove winrtOliver Wolff2020-06-053-3/+0
| | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-84434 Change-Id: I2806245870f66b508a4e6afd198efbb865b9a373 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | CMake: Regenerate configure.cmake filesAlexandru Croitor2020-06-042-7/+18
| | | | | | | | | | | | | | | | | | | | | This will show the usual configure summary reports. Change-Id: I38dcbbed8e20e382be5c4271e2d6f90de100d180 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* | | Remove the shortcut when the menu item that is using it is removedAndy Shaw2020-06-041-0/+10
| | | | | | | | | | | | | | | | | | Change-Id: I58ae027a6a913f45f7b3fad020c290c4d75804da Pick-to: 5.15 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | Sync the platform menu after inserting it to the menubarAndy Shaw2020-06-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | By syncing the platform menu, we ensure that it passes on the title of the menu to the native handle if it was dynamically added. Change-Id: Idd11fa7d9cd3d251e2ed19f99f575f5e2ec5ac1d Pick-to: 5.15 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | QQuickTextArea: resize background different when inside FlickableRichard Moe Gustavsen2020-06-021-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a TextArea is placed inside a Flickable (using the TextArea.flickable property), the background is reparented to the Flickable. For this to look good, the background should have the same size as the Flicable as well, so it doesn't end up with the size of the TextArea, which can be many pages tall. Pick-to: 5.15 Change-Id: I75ead02c712f337c7e743f17aa8810a040519173 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | StackView: fix heap-use-after-free when pushing after clearMitch Curtis2020-05-293-14/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch extends the work done in aaec25a7 to cover all operations. Note also that b94889f4 does a similar thing to this patch and aaec25a7, in that it explicitly ignores operations that are done during the removal of elements. Fixes: QTBUG-84381 Pick-to: 5.15 Change-Id: Id8bbbded39d8e58bcf0e8eedeb2dde794952333f Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | Sync the QQuickPlatformMenu so it has a handle ready when its a sub menuAndy Shaw2020-05-291-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When dynamically creating a menu, it will be parented after it has created the handle the first time around. Therefore it loses the original handle and does not get a new one when needed. So by calling sync() before it is set as the sub menu then it can get a handle created if necessary in time. Change-Id: Ia39f49f99758802dd19ff1df478b05ac5e403ea8 Pick-to: 5.15 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>