aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto
Commit message (Collapse)AuthorAgeFilesLines
* Revert all Menu delegate patchesv5.12.0-rc2v5.12.0-rc1v5.12.0Mitch Curtis2018-11-159-620/+1
| | | | | | | | | | | | | | | | | | | | | This reverts the following commits: d5cb26bc56a3b6f6e99c88654d4f7a65f43551ac - Menu: ensure the correct delegates are used when created via Component d923dd467c1aeb3e195a09949b04862084002f88 - MenuBar: ensure the correct delegates are used when created via Component d56c193eb4ceb640611d66f22e1f26aae91cd7d1 - QQuickPopupPositioner: avoid adding duplicate item change listeners 567a2de8cd493aabe0055d6dbc367b39447e70dd - Stabilize tst_qquickmenubar 953fbac6131823e4fce0eb4707a854469c4c04ff - Fix Instantiator-created MenuItems disappearing 936d31179d44220571ded15840bedeccb581c83b - tst_qquickmenu: add a test for MenuItems before and after a Repeater fc1832810f6c09505d9413685ed0b2d6295bea4a - QQuickMenuBar: fix menu not opening The fix for QTBUG-67559 has caused lots of issues, with the latest being a crash right before the 5.12 release. The bug that they fix is a P2, so it's not worth the hassle. The patches might be able to be resubmitted to dev after the crash is fixed. Change-Id: Ic192c7a302176bcdb2503b636b3462b10898a2ba Fixes: QTBUG-71770 Reviewed-by: J-P Nurmi <jpnurmi@gmail.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* QQuickMenuBar: fix menu not openingMitch Curtis2018-11-091-0/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a Menu is declared within a MenuBar, a MenuBarItem has to be created for it. Creation takes the following steps: - 1 Begin creation of the item - 1.1 Set the parent of the MenuBarItem to the MenuBar - 2 Set the menu on the item - 3 Complete creation of the item - 4 Add the item When setting the parent of the MenuBarItem, the following call stack can be observed: 1 QQuickContainer::itemChange qquickcontainer.cpp 757 0x7fff6e5f4544 2 QQuickItemPrivate::itemChange qquickitem.cpp 6213 0x7fff6aa226f7 3 QQuickItemPrivate::addChild qquickitem.cpp 2964 0x7fff6aa1e663 4 QQuickItem::setParentItem qquickitem.cpp 2753 0x7fff6aa0f57c 5 QQuickMenuBarPrivate::beginCreateItem qquickmenubar.cpp 100 0x7fff6e627c08 6 QQuickMenuBarPrivate::createItem qquickmenubar.cpp 115 0x7fff6e627c98 7 QQuickMenuBarPrivate::contentData_append qquickmenubar.cpp 263 0x7fff6e6285d9 In particular, the following function is called: void QQuickContainer::itemChange(ItemChange change, const ItemChangeData &data) { Q_D(QQuickContainer); QQuickControl::itemChange(change, data); if (change == QQuickItem::ItemChildAddedChange && isComponentComplete() && data.item != d->background && data.item != d->contentItem) { if (!QQuickItemPrivate::get(data.item)->isTransparentForPositioner() && d->contentModel->indexOf(data.item, nullptr) == -1) addItem(data.item); } } This check is for items that are added after component completion of the control (QQuickMenuBar), as there is a isComponentComplete() check. Before d923dd46, QQuickMenuBarItems were constructed the moment their QQuickMenus were appended to QQuickMenuBar's contentData, which was before component completion. This meant that the isComponentComplete() check above failed as expected and the item was instead added after its creation process was completed (step #4 in the list above): void QQuickMenuBarPrivate::contentData_append(QQmlListProperty<QObject> *prop, QObject *obj) { QQuickMenuBar *menuBar = static_cast<QQuickMenuBar *>(prop->object); if (QQuickMenu *menu = qobject_cast<QQuickMenu *>(obj)) obj = QQuickMenuBarPrivate::get(menuBar)->createItem(menu); QQuickContainerPrivate::contentData_append(prop, obj); // leads to addItem() being called } Part of the process of an item being added to QQuickMenuBar involves connecting to the signals of its corresponding QQuickMenu (if it has a menu). Quoting the code from QQuickMenuBar::itemAdded(): if (QQuickMenu *menu = menuBarItem->menu()) QObjectPrivate::connect(menu, &QQuickPopup::aboutToHide, d, &QQuickMenuBarPrivate::onMenuAboutToHide); After d923dd46, QQuickMenuBarItems are now constructed *after* component completion to ensure that delegates declared outside of the menu bar have been completed. This means that the isComponentComplete() check in QQuickContainer::itemChange() no longer fails and the item is added before its QQuickMenu is set on it (step #2). As a result, it never connects to the QQuickPopup::aboutToHide() signal and hence it stays activated/highlighted even after the menu has been dismissed, which results in having to click twice on the QQuickMenuBarItem to open the menu the next time. This patch fixes the issue by simply setting the menu on the item before setting its parent: - 1 Begin creation of the item - 1.1 Set the menu on the item - 1.2 Set the parent of the MenuBarItem to the MenuBar - 2 Complete creation of the item - 3 Add the item This ensures that the item has a menu and the connection is made. Change-Id: I93edf7e5a8616a851595ce28ed43f0348078f0b5 Fixes: QTBUG-71583 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* QQuickPage: fix a typo to avoid a crashLiang Qi2018-11-091-0/+13
| | | | | | | | | when setting null to footer Fixes: QTBUG-71444 Change-Id: Id4b0a3fd7aa104357674b4e2be6206894f8878da Reviewed-by: J-P Nurmi <jpnurmi@gmail.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* tst_qquickmenu: add a test for MenuItems before and after a Repeaterv5.12.0-beta4Mitch Curtis2018-11-022-1/+119
| | | | | | | | Just to verify that it works, as a similar test was added for Instantiator in another patch. Change-Id: I1ab55d98a3726bff1a2984db0d81ae444e05d630 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Fix Instantiator-created MenuItems disappearingMitch Curtis2018-11-023-0/+235
| | | | | | | | | | | | | | | When d5cb26bc fixed a bug in Menu, it also broke the use case of having an Instantiator create menu items. Using an Instantiator like this allows users to create a "Recent Files" menu, for example. The issue was that we would indiscriminately recreate items, even those owned by an Instantiator. This patch avoids recreating items owned by Instantiators. It also adds a logging category for Menu, to aid debugging. Fixes: QTBUG-71066 Change-Id: Ie0e46de1cbfaee81b43d63f3143435f2514371d5 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Tie minor version of all imports to Qt's minor versionMitch Curtis2018-11-02522-1001/+1001
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* tst_QQuickApplicationWindow: remove workaroundMitch Curtis2018-10-261-5/+0
| | | | | | | | | | 30fcc735 introduced this to work around a crash that was apparently caused by 4c71db75. The commit that added the workaround is now three years old, and removing it fixes a crash that is blocking CI. Change-Id: Iefbb32e00d57e5ad86c43977e10120fdc92a3635 Fixes: QTBUG-70064 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Fix heap-use-after-free in tst_QQuickDrawerMitch Curtis2018-10-261-1/+5
| | | | | | | | | Ensure the QByteArray we set as the current test name outlives the test. Task-number: QTBUG-71387 Change-Id: Id5f75b5ffcd1a710b5d8be4796cf48ee8dd1896d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Skip tst_font::font() on macOS 10.12Mitch Curtis2018-10-221-0/+5
| | | | | | | | | It crashes, but I'm unable to debug it with a CI VM because it won't build. Task-number: QTBUG-70063 Change-Id: Ia9c32a145c40cc55ab56dcf3fd52468d7a925f40 Reviewed-by: Liang Qi <liang.qi@qt.io>
* Merge remote-tracking branch 'origin/5.11' into 5.12v5.12.0-beta3Liang Qi2018-10-152-0/+106
|\ | | | | | | | | | | | | | | | | Conflicts: src/quicktemplates2/qquickmenubar.cpp src/quicktemplates2/qquickmenubar_p.h src/quicktemplates2/qquickmenubar_p_p.h Change-Id: I5c2115f05826f68f1b1f5ce6762273cd91e6997e
| * MenuBar: ensure the correct delegates are used when created via ComponentMitch Curtis2018-10-022-0/+106
| | | | | | | | | | | | | | | | | | | | | | | | | | Don't add items until we're complete, as the delegate could change in the meantime. Instead, add them to contentData and create them when we're complete. A similar fix was already done for Menu in d5cb26bc. Task-number: QTBUG-67559 Change-Id: Idb43b7a69fcf1c1ad6396c73a3c090b92e460ab8 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | Stabilize tst_qquickmenubarMitch Curtis2018-10-151-0/+8
| | | | | | | | | | | | | | | | | | | | Something about postponing delegate creation to component completion means that the fileMenuBarItem->isHighlighted() check fails occasionally. Give it a chance to sort itself out before sending move events. Change-Id: I140ec835b5cb4ec7d784215a20567469ad422c5b Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | tst_qquickmenu: fix memory leakv5.12.0-beta2Mitch Curtis2018-10-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | takeItem() unparents the item, so we need to make sure it gets deleted. The leak was caught by valgrind: ==10039== 832 (32 direct, 800 indirect) bytes in 1 blocks are definitely lost in loss record 6,465 of 6,706 ==10039== at 0x4C3017F: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==10039== by 0x112C1E: tst_QQuickMenu::count() (tst_qquickmenu.cpp:121) ==10039== by 0x12F313: tst_QQuickMenu::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (tst_qquickmenu.moc:156) ==10039== by 0x612B6B2: QMetaMethod::invoke(QObject*, Qt::ConnectionType, QGenericReturnArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument) const (qmetaobject.cpp:2305) ==10039== by 0x41B07CD: invoke (qmetaobject.h:123) ==10039== by 0x41B07CD: QTest::TestMethods::invokeTestOnData(int) const (qtestcase.cpp:915) ==10039== by 0x41B15BF: QTest::TestMethods::invokeTest(int, char const*, QTest::WatchDog*) const (qtestcase.cpp:1114) ==10039== by 0x41B1D07: QTest::TestMethods::invokeTests(QObject*) const (qtestcase.cpp:1456) ==10039== by 0x41B2381: QTest::qRun() (qtestcase.cpp:1896) ==10039== by 0x41B24E1: QTest::qExec(QObject*, int, char**) (qtestcase.cpp:1783) ==10039== by 0x12F468: main (tst_qquickmenu.cpp:1505) Change-Id: I459c7897c1088c8b58152d2e0b5ceb8f3684e589 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | Skip tst_font::systemFont()Mitch Curtis2018-09-261-0/+2
| | | | | | | | | | | | | | | | | | | | | | The qmlClearTypeRegistrations() call causes a crash and it's not clear why. Until we can fix it, skip it so that other changes can get in. It should be skipped rather than blacklisted as it shouldn't be run at all. Task-number: QTBUG-70063 Change-Id: I1ff47e034f121014370bbf9d65e8ac68769a8d31 Reviewed-by: Liang Qi <liang.qi@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into 5.12Qt Forward Merge Bot2018-09-181-0/+3
|\| | | | | | | Change-Id: Ic5311418d3f25398380c4a32b35753329efb6f3f
| * Attempt to stabilise Popup::test_shortcut auto testMitch Curtis2018-09-121-0/+3
| | | | | | | | | | | | | | | | | | Ensure that the window is active before trying to activate keyboard shortcuts. Task-number: QTBUG-70413 Change-Id: Ibac1526efd9c53f1f2aa3401da3855ce26d35d6a Reviewed-by: Liang Qi <liang.qi@qt.io>
* | Extend opensuse blacklisting to opensuse-leapTony Sarajärvi2018-09-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | In openSUSE 15.0 /etc/os-release the ID of the OS was changed from "opensuse" to "opensuse-leap". So every blacklisting we did for opensuse, didn't cover opensuse-leap. This one adds opensuse-leap as a blacklisted platform whenever opensuse was blacklisted. Task-number: QTBUG-70413 Change-Id: Ib84cda329160d4cfed28cb168f380269c24f8435 Reviewed-by: Liang Qi <liang.qi@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into 5.12Qt Forward Merge Bot2018-09-117-0/+278
|\| | | | | | | Change-Id: I3fa0011d8b69db2a004feb177a7f89ccb75a724d
| * Menu: ensure the correct delegates are used when created via ComponentMitch Curtis2018-09-057-0/+278
| | | | | | | | | | | | | | | | | | | | Don't add items until we're complete, as the delegate could change in the meantime. Instead, add them to contentData and create them when we're complete. Task-number: QTBUG-67559 Change-Id: I5f42129f49de861ff5f15d0069daeda0b4e5017c Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | Fix blacklist syntax of Popup::test_shortcutTony Sarajärvi2018-09-071-1/+1
| | | | | | | | | | | | Task-number: QTBUG-70413 Change-Id: Ie4ae23a7869bb0cbb41f452637ccf55c58b24182 Reviewed-by: Liang Qi <liang.qi@qt.io>
* | Blacklist flaky Popup::test_shortcut on openSUSETony Sarajärvi2018-09-061-0/+2
| | | | | | | | | | | | Task-number: QTBUG-70413 Change-Id: I86b6d4924b6042b9d934bf3f15901eb9a8a6c7f5 Reviewed-by: Liang Qi <liang.qi@qt.io>
* | Fix tst_QQuickStyle::qrcInQtQuickControlsStylePathEnvVar() failureMitch Curtis2018-08-202-3/+3
| | | | | | | | | | | | | | | | | | Move DummyStyle into a subdirectory of the "data" directory, because otherwise availableStyles() picks it up and makes us fail. Task-number: QTBUG-70065 Change-Id: Ib69075832b5bcf30c6b960e6a4bcda69f016baf2 Reviewed-by: Liang Qi <liang.qi@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-08-082-1/+99
|\| | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I483081703594a8398d51a23c6d2266ac0ae9dfb0
| * QQuickIconImage: prevent color from being applied twiceMitch Curtis2018-07-302-1/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QQuickIconImage::componentComplete() calls QQuickIconImagePrivate::updateIcon(), which loads the icon's image via QQuickImageBase::load(). That eventually calls QQuickImageBase::requestFinished(), which calls QQuickIconImage::pixmapChange(). That then calls QQuickIconImagePrivate::updateFillMode(), which can in turn cause QQuickIconImage::pixmapChange() to be called again, causing recursion. This recursion resulted in icon.color being applied twice. We already have a recursion check in place in QQuickIconImagePrivate::updateFillMode(), so we can reuse that in QQuickIconImage::pixmapChange() to know whether or not we should apply the color to the image. Task-number: QTBUG-69506 Change-Id: I5cd9edaa524c7ceb9c41c53a9efefcc4c647e246 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | tst_qquickstyle: avoid conflicts with other testsMitch Curtis2018-07-184-17/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | qrcStylePaths() uses :/qrcStyles1 and :/qrcStyles2, which conflicts with qrcInQtQuickControlsStylePathEnvVar() in a way that would require us (qrcInQtQuickControlsStylePathEnvVar()) to be aware of tests that ran before us. Avoid this issue by adding more qrc-based styles. Change-Id: I7a5e24f4ea532c19db30d240fe7c077ac2a09a4e Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-07-172-7/+112
|\| | | | | | | | | | | | | | | | | Conflicts: src/quickcontrols2/qquickstyle.cpp src/quicktemplates2/qquickscrollview.cpp tests/auto/qquickstyle/tst_qquickstyle.cpp Change-Id: I9afddf07a956f43cf0445e91b8d1a02f167b6bd5
| * Fix qrc paths in QT_QUICK_CONTROLS_STYLE_PATHMitch Curtis2018-07-164-0/+123
| | | | | | | | | | | | | | | | | | Parse the environment variable manually when the platform's list separator is ':', to avoid issues with qrc paths (which start with ':') not working. Task-number: QTBUG-68219 Change-Id: Ic71d49da5a72a37bc1d2e7b19fbf1de71b3917f3 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| * tst_tumbler: replace loop with tryVerify()Mitch Curtis2018-07-031-7/+1
| | | | | | | | | | | | | | 'cause it's better. Change-Id: I00a538013a10a7ff3b551b9f550427f898610dbb Reviewed-by: Liang Qi <liang.qi@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-07-033-0/+174
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: src/imports/controls/Menu.qml src/imports/controls/fusion/Menu.qml src/imports/controls/imagine/Menu.qml src/imports/controls/material/Menu.qml src/imports/controls/universal/Menu.qml Change-Id: I017949e5ac617c1cdeece71204e5aa519776fb39
| * Menu: fix items not being scrollable when using WindowMitch Curtis2018-06-253-0/+174
| | | | | | | | | | | | | | | | | | | | Use Window.window instead of ApplicationWindow.window, as the former will always result in a window regardless of which type of window is in use. Task-number: QTBUG-68858 Change-Id: I3bdb60350d92b13621b0f4db9085bf067b6ff6e2 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | Merge "Merge remote-tracking branch 'origin/5.11' into dev" into ↵Liang Qi2018-06-251-0/+66
|\ \ | | | | | | | | | refs/staging/dev
| * | Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-06-251-0/+66
| |\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/imports/controls/imagine/TextArea.qml src/imports/controls/imagine/TextField.qml tests/auto/controls/data/tst_tumbler.qml Change-Id: I25a8228a4299fb7a53db70b7223663a1637ed933
| | * Fix Tumbler not respecting currentIndex changes in onModelChangedMitch Curtis2018-06-131-0/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The use case in the referenced bug report looks something like this: Tumbler { model: 4 // ... onModelChanged: { currentIndex = model - 2; } } The problem was that setting currentIndex in onModelChanged would cause the wrap to change to true, which in turn caused the internal view to change to PathView. This would cause the currentIndex to be set to 0 on successive model changes (i.e ++model). By keeping track of whether or not the user set the currentIndex during a model change, we can ignore changes in the internal view's currentIndex and restore the user's currentIndex afterwards. Task-number: QTBUG-68737 Change-Id: I25738f36cf58a331d1b8e50b5029b4aa1dd27db5 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | QQuickStyle::addStylePath(): fix support for qrc pathsMitch Curtis2018-06-254-0/+51
|/ / | | | | | | | | | | | | | | The code lacked handling for the "qrc" scheme. Task-number: QTBUG-68222 Change-Id: Ia0dfdb748b8bdb40c893375b9de77bd8c05986b6 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-06-121-0/+10993
|\| | | | | | | Change-Id: Ifb36ff81047293902c9f9291f724d8e15bca7f3d
| * Add binary compatibility file for 5.11 for QtQuickControls2Milla Pohjanheimo2018-06-051-0/+10993
| | | | | | | | | | | | | | File for bic test added. Change-Id: I99ec3defd695bc7e10cc753a3ee1e0fec56403dd Reviewed-by: J-P Nurmi <jpnurmi@gmail.com>
* | tst_abstractbutton.qml: fix test_trigger()Mitch Curtis2018-06-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bdb8cf49daf4a1c7dfb9bd9caf14e19e3aa66293 in qtdeclarative fixed compliancy with the ES7 spec by correcting the order in which properties were created/assigned. When the qt5 submodules were updated, some rows of AbstractButton::test_trigger() started failing because they were unknowingly relying on the incorrect ordering: var control = createTemporaryObject(actionButton, testCase, {"enabled": data.button, "action.enabled": data.action}) control.action.enabled was set first, and then control.enabled was set. The Action's enabled property can affect the value of Control's enabled property: Control's enabled property is always used if explicitly specified, but if it's not explicitly specified, it is set to the value of Action's enabled property. The motivation for this behavior is explained in 146bc9517c56feda4eba34282d3cc53bd47b6267: "The idea is that you share a generic Action in different places in the UI, and then you override things locally in specific controls." This patch restores the test's previous behavior by swapping the order of the properties so that control.enabled is assigned last. Task-number: QTBUG-68665 Change-Id: I6082c57a8fdbf7f7251dacbb55289fa996393a6e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Create and init QQuickTheme from QtQuickControls2PluginJ-P Nurmi2018-05-223-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of creating and setting the QQuickTheme instance from each style plugin (e.g. QtQuickControls2MaterialStylePlugin), create the QQuickTheme instance in QtQuickControls2Plugin when the style is being resolved, and just pass the instance to be initialized by the style plugin(s). This avoids the problem that QQuickTheme API was virtual, and sub-classes created from plugins would have vtables destroyed before the QQuickTheme was destroyed. Task-number: QTBUG-67062 Task-number: QTBUG-68087 Change-Id: I19e9ced5296b708c2668c30163389cb3da6be7cf Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | QQuickTheme: rename themeFont() and themePalette()J-P Nurmi2018-05-223-5/+5
| | | | | | | | | | | | | | We don't have the conflicting virtual getters anymore. Change-Id: Ia20bfa0a0b1aa67c35a23270eb0241018f8e0ada Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | QQuickTheme: add setters to make getters non-virtualJ-P Nurmi2018-05-223-31/+6
| | | | | | | | | | | | | | | | | | | | This allows us to add more themable attributes (on the side of fonts and palettes) after the QQuickTheme API has been made public, because it won't require adding virtuals. Only the resolve() method is virtual. Task-number: QTBUG-67062 Change-Id: I6a5cc8d15aeaa5a9a0fe9b6d2591077f8822daac Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Rename QQuickTheme::current to instanceJ-P Nurmi2018-05-163-6/+6
| | | | | | | | | | | | | | | | Avoid giving a wrong impression that the theme instance could be changed on the fly. Change-Id: Ifb5078422385d2f15da6a416d89cc9d6f46b0f40 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Dial: add inputMode propertyMitch Curtis2018-05-151-3/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This property adds two new ways of interacting with the dial: horizontally and vertically. These new input modes use a relative input system, which means that, unlike the old absolute input system, changes to the dial's position are "added" to its value. This results in a dial that is less "jumpy", making it safe for operations that could be harmful if done incorrectly, like adjusting audio levels. [ChangeLog][Controls][Dial] Added the inputMode property. This property controls how the dial is interacted with. The circular input mode (default, old behavior) operates on an absolute input system, whereas the horizontal and vertical input modes use a relative input system. Task-number: QTBUG-56323 Change-Id: Iab4e7f048b4797ab626741326ce709914e67bd31 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Imagine: use background insetsJ-P Nurmi2018-05-091-4/+13
| | | | | | | | | | | | | | | | | | All others have been updated, except GroupBox that has some strange special handling for positioning the background. Change-Id: Ief5a68cbeedbdc3c66b85e8d03198f70e35aac61 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | TextArea: add support for background insetsJ-P Nurmi2018-05-021-0/+145
| | | | | | | | | | | | | | | | | | | | | | Same as 5adce042 for QQuickControl. [ChangeLog][Controls][TextArea] Added topInset, bottomInset, leftInset, and rightInset properties to control the geometry of the background similarly to how paddings control the geometry of the contentItem. Change-Id: I1e1b3a79a9f477ec7b64ec4c6cc8021bbf48adc0 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | TextField: add support for background insetsJ-P Nurmi2018-05-021-0/+146
| | | | | | | | | | | | | | | | | | | | | | Same as 5adce042 for QQuickControl. [ChangeLog][Controls][TextField] Added topInset, bottomInset, leftInset, and rightInset properties to control the geometry of the background similarly to how paddings control the geometry of the contentItem. Change-Id: Ic1e4c15fd4b06a58f229b5156668c9a986f7bc3f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Label: add support for background insetsJ-P Nurmi2018-05-021-0/+152
| | | | | | | | | | | | | | | | | | | | | | Same as 5adce042 for QQuickControl. [ChangeLog][Controls][Label] Added topInset, bottomInset, leftInset, and rightInset properties to control the geometry of the background similarly to how paddings control the geometry of the contentItem. Change-Id: I853efcdd6be1d3acfb067128b6195c253350de8d Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Add missing implicitBackground{Width|Height} to non-QQuickControlsJ-P Nurmi2018-05-022-14/+108
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Same as 5bd9d44b for QQuickControl. [ChangeLog][Controls][Label] Added implicitBackgroundWidth and implicitBackgroundHeight properties that can be used to simplify complex implicit size bindings. [ChangeLog][Controls][TextArea] Added implicitBackgroundWidth and implicitBackgroundHeight properties that can be used to simplify complex implicit size bindings. [ChangeLog][Controls][TextField] Added implicitBackgroundWidth and implicitBackgroundHeight properties that can be used to simplify complex implicit size bindings. Change-Id: Idcc2d9af8df086b41c15f352506fd8afdbb2e3e7 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-04-282-3/+89
|\| | | | | | | Change-Id: I6d731149b21d02164220f6cdc485d9e4ae31bd13
| * ComboBox: don't block the escape/back key (with fixed test)J-P Nurmi2018-04-251-0/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Accept Key_Escape or Key_Back only if it actually close the popup. If the popup is not visible, the key is not handled, and the event should therefore propagate (and potentially close the app on Android). Note: def92f7 had a broken test (didn't take the popup exit transition into account) and thus, blocked the CI and got rejected in 110b718. Task-number: QTBUG-67684 Change-Id: I46b4731b3006721f3737cf909fbd97331ac6d8ed Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Revert "ComboBox: don't block the escape/back key"Liang Qi2018-04-251-71/+0
| | | | | | | | | | | | | | | | | | | | This change got integrated by sick COIN. This reverts commit def92f7b657ee9247beffffcb0cadd1eca8be3c6. Task-number: QTBUG-67930 Change-Id: I541579d7112ba386b227b7892d4e0aa8e2bd4edf Reviewed-by: J-P Nurmi <jpnurmi@qt.io>