aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.12' into 5.13v5.13.0-alpha1Qt Forward Merge Bot2019-02-0213-55/+11320
|\ | | | | | | Change-Id: I13c6458d7a7f92daf58c12e4c120d99a1f56cbfa
| * Merge remote-tracking branch 'origin/5.12.1' into 5.12Qt Forward Merge Bot2019-02-012-0/+11143
| |\ | | | | | | | | | Change-Id: I555418c45b33fa9bc02072b32736403090f1bdbc
| | * QQuickAbstractButton: fix clicked() not being emitted after long pressv5.12.1Mitch Curtis2019-01-252-1/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a button is pressed long enough (QStyleHints::mousePressAndHoldInterval()) and there is a connection (e.g. signal handler) to the pressAndHold() signal, it is emitted. If nothing is connected to the signal, clicked() is emitted. Before this patch, QQuickAbstractButton used QObjectPrivate::isSignalConnected() to check whether or not anything was connected to pressAndHold(). The problem with this function is described by Olivier: "[...] there is an optimisation for the first 64 signals we store a bit in a 64bit integer to quickly see if a signal is connected. There is also the problem that it can return true even if the signal has been disconnected." This is also mentioned in a comment in the code: Returns \c true if the signal with index \a signal_index from object \a sender is connected. Signals with indices above a certain range are always considered connected (see connectedSignals in QObjectPrivate). When 5adce04 added inset signals to QQuickControl, it meant that signals in QQuickAbstractButton (which derives from QQuickControl) were pushed outside of that 64 signal range, resulting in the IS_SIGNAL_CONNECTED macro returning true. This patch fixes the issue by using QObject::isSignalConnected(), which does not use the 64 signal optimization. Fixes: QTBUG-72811 Change-Id: Ic6e54d6cab062e528522ef7e3cf27c1023d31347 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> (cherry picked from commit bbc81363f082ab6a2736f8de83968a3941e367e2) Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
| | * Add changes file for Qt 5.12.1Antti Kokko2019-01-131-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + 33966b5b9b026f24ac94c0905280deb4d004df81 Stop using wildcards with "direct" RESOURCES syntax in examples + e236382e8cc1017597ae67bf739e91a2bd4dfd0a Bump version + 431d605edb48321c71935fbd2bb82d33e231ea55 Add changes file for Qt 5.11.3 + 8317e62c3e2381e6287c9a7e861d20f78aaea03f Fix compilation with qreal=float + 343cea9b49d7afa7614aea27aed7c48ef9c5be2e QQuickScrollView: override getContentWidth/Height() + 60a43aeba785e52b89fb65913f69101528401e53 Doc: Add qmake include flag for module + e25970ffff3db1d0b2de17510514b5f92c5ba3eb qquickfusionstyle: do not force a fixed blue color as highlight color + ccf9a78e366695ce4ac3b8040c034800469804a7 Doc: add "1" to all mentions of the old Qt Quick Controls + da55026c975093e9e1e4374d9930861bcffdf8bf Fix compilation with gcc 4.8 + 1dff93937db7b3be48fdedbb60449260221dedc0 Doc: clarify event handling + bbd6c9972206eccc4d2872be44db509ef716c351 Fix QQuickIconLabel's baselineOffset + 98b6f8eee9affce6df8be137068e49f88becb9ce Port QQuickComboBox to QRegularExpression + 70199a43a978649d87c5b2815808c4a04902c6e0 Fix for SpinBox crash in Qt Quick Designer + 05597ef3e576a7cc09d193cb46dba490b7886ec1 Doc: Update \titles with "Controls 2" in it + 021c6064addd168017e0e9eff17639669e2f85d1 tst_QQuickStyle::availableStyles(): Ignore case when checking paths on Windows + b943bbf91162ba8aad4a6c3b0c7ca2e944a26105 Make it visually clear which ComboBox item is the current item + 69f02184a9a71f3a5e2dd1ada12367ddccd29787 QQuickComboBox: update QRegularExpression wildcard code + 1006eb36e58832b7142d1dfacbd1f878938fc155 Add binary compatibility file for QtQuickĆontrols2 for Qt 5.12 + b563bd583a50442b52e47f8c5f149aebafb385f2 Fix TextField background not respecting control's width + 520657bdfa0aba68e31758c5952a01c45940cd8f Bump version Change-Id: Id659474f4566319efa559797fd07d0977dd5aff1 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| | * Merge 5.12 into 5.12.1Kari Oikarinen2019-01-089-4/+70
| | |\ | | | | | | | | | | | | Change-Id: I442b103e352bc49b35fb816104c87c112e2fd958
| | * | Add binary compatibility file for QtQuickĆontrols2 for Qt 5.12Milla Pohjanheimo2018-12-181-0/+11123
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Binary compatibility file added. Change-Id: Icc07524dfd195642a2e5fc2d566f4270e4f505e0 Reviewed-by: Sergio Ahumada <sahumada@texla.cl>
| * | | Fusion: use white ButtonText when a dark system theme is in useMitch Curtis2019-01-311-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Button's text was previously black on a dark background with macOS' dark mode. This patch makes it more readable. Task-number: QTBUG-70819 Change-Id: Iaa9d31133434e67e04d5d831dcb8eeba191cbab4 Reviewed-by: Nils Jeisecke <nils.jeisecke@saltation.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
| * | | Update Qt Creator-related filesMitch Curtis2019-01-313-34/+125
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Add Dial's new inputMode property to DialSpecifics.qml - Update plugins.qmltypes files Fixes: QTBUG-73412 Change-Id: Id9e3818db49d6d130da1256d3019a5074902c66d Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
| * | | Doc: explain how to move active focus out of TextArea with tabMitch Curtis2019-01-301-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-73202 Change-Id: Id0f760f0dd41079c823234b916b5419bf8c68552 Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
| * | | qquickfusionstyle: do not force a fixed white color for highlightedTextNils Jeisecke2019-01-291-17/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | just like the previous fix for for the highlight color: use the system palette. Task-number: QTBUG-70652 Change-Id: I5c31927c53ba386f54de7c46ec9fe66c26e7a31b Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * | | ComboBox: propagate palette colors to popupMassimo Callegari2019-01-241-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows a quick alternative to redefining the whole popup item by just acting on palette colors. Fixes: QTBUG-72786 Change-Id: I19e5158e2ad18fa9bf512f02d4bbe74cb06aba35 Reviewed-by: Massimo Callegari <massimocallegari@yahoo.it> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * | | Fix Qt.labs.platform.FileDialog not honoring folder propertyPaolo Angelelli2019-01-232-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | Fixes: QTBUG-73179 Change-Id: I99fb1c7cfcf61920889da909152b23b40bc96104 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * | | QQuickAbstractButton: fix clicked() not being emitted after long pressMitch Curtis2019-01-232-1/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a button is pressed long enough (QStyleHints::mousePressAndHoldInterval()) and there is a connection (e.g. signal handler) to the pressAndHold() signal, it is emitted. If nothing is connected to the signal, clicked() is emitted. Before this patch, QQuickAbstractButton used QObjectPrivate::isSignalConnected() to check whether or not anything was connected to pressAndHold(). The problem with this function is described by Olivier: "[...] there is an optimisation for the first 64 signals we store a bit in a 64bit integer to quickly see if a signal is connected. There is also the problem that it can return true even if the signal has been disconnected." This is also mentioned in a comment in the code: Returns \c true if the signal with index \a signal_index from object \a sender is connected. Signals with indices above a certain range are always considered connected (see connectedSignals in QObjectPrivate). When 5adce04 added inset signals to QQuickControl, it meant that signals in QQuickAbstractButton (which derives from QQuickControl) were pushed outside of that 64 signal range, resulting in the IS_SIGNAL_CONNECTED macro returning true. This patch fixes the issue by using QObject::isSignalConnected(), which does not use the 64 signal optimization. Fixes: QTBUG-72811 Change-Id: Ic6e54d6cab062e528522ef7e3cf27c1023d31347 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | | Doc: fix SplitView exampleMitch Curtis2019-01-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't use explicit size properties like width; use implicitWidth instead. Change-Id: If983bc5a38289bd860652f063eca93b12aace881 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | | QQuickIcon: Add support to cache a pixmapMikhail Svetkin2019-01-225-1/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][Controls] Added cache property to icon. Change-Id: I9b3410e74ab8962d039939a8e005a2aff8e026cb Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2019-01-214-1/+102
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: Ib3b90cce1f4422b308515b06e89b1c4a0bf7f474
| * | | QQuickPopupPositioner: fix crash on application exitMitch Curtis2019-01-143-1/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't add duplicate change listeners, since only one of them will be removed. Coincidentally, this is the same fix as d56c193e, which was reverted for unrelated reasons as part of a bulk revert in d3545dbd. Change-Id: If6fde09f884929c7928f3a1f78625559c9fcbf07 Fixes: QTBUG-72746 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| * | | Bump versionKari Oikarinen2019-01-141-1/+1
| | | | | | | | | | | | | | | | Change-Id: I0285c0bd03187fafa4f3261a877257f56242d24d
| * | | Doc: Give a hint to Popup's margins property in the positioning sectionNils Jeisecke2019-01-111-0/+3
| | | | | | | | | | | | | | | | | | | | Change-Id: I6878b06d67b6066da1ca187cd879b77b96539ddc Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | | Merge remote-tracking branch 'origin/5.12' into devLiang Qi2019-01-101217-3129/+3396
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/imports/controls/qtquickcontrols2plugin.cpp Change-Id: I27f1260b539354e084beb28be78385e57fda63e1
| * | | DialogButtonBox: fix issue where single button would go outside boxMitch Curtis2019-01-082-2/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | c2fd8f7d made the following changes to the geometry calculation of QQuickDialogButtonBox's contentItem: @@ -244,11 +252,8 @@ void QQuickDialogButtonBoxPrivate::resizeContent() return; QRectF geometry = q->boundingRect().adjusted(q->leftPadding(), q->topPadding(), -q->rightPadding(), -q->bottomPadding()); - if (alignment != 0) { - qreal cw = (alignment & Qt::AlignHorizontal_Mask) == 0 ? q->availableWidth() : contentItem->property("contentWidth").toReal(); - qreal ch = (alignment & Qt::AlignVertical_Mask) == 0 ? q->availableHeight() : contentItem->property("contentHeight").toReal(); - geometry = alignedRect(q->isMirrored() ? Qt::RightToLeft : Qt::LeftToRight, alignment, QSizeF(cw, ch), geometry); - } + if (alignment != 0) + geometry = alignedRect(q->isMirrored() ? Qt::RightToLeft : Qt::LeftToRight, alignment, QSizeF(contentWidth, contentHeight), geometry); It turns out that this breaks the use case of a fixed width box (e.g. where a Dialog is assigned a width of 400 and the box assumes that width) with a single button. For example, in the case of the Default style, QQuickDialogButtonBox::contentWidth is 100 because Button's implicitWidth is 100. Since contentWidth is "used for calculating the total implicit width" of the box, it's not useful for positioning items which have an explicit width. The result is that QQuickDialogButtonBox thinks the contentItem is smaller than it really is, and therefore the ListView is positioned too far to the right. Only the Default and Universal styles are affected, as they are the only styles that resize the button to cover half of the button box. This patch fixes the issue by reverting the code above to its original state, where the content size of the contentItem is used instead of the contentWidth of the box. Change-Id: Idd2f94f3b4d3413fc2057c0ade2efdd66d701c08 Fixes: QTBUG-72372 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| * | | Fix incorrect font size in certain styles on WindowsMitch Curtis2019-01-082-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a style is loaded, QtQuickControls2Plugin::loadStylePlugins() is called. This function uses QPluginLoader to search the style directory for the style plugin. On Windows, the code was looking for the plugin without the debug "d" suffix, causing the style plugin to fail to load for debug builds. This results in the QQuickTheme subclasses not being created, causing controls to be shown with default font sizes. This patch fixes the issue by appending the "d" suffix on Windows. Change-Id: I706dbe39325a104bcd6ce72cb0a8d37025adb055 Fixes: QTBUG-71902 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| * | | Slider: fix wheel event propagationMassimo Callegari2019-01-082-1/+57
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | Don't propagate wheel events when reaching the limits. Sync the behavior with Qt widgets and SpinBox/ComboBox. Task-number: QTBUG-72750 Change-Id: Iefb8562c1d9632badc4a39bc4c301bd96b8a515b Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * | Bump versionKari Oikarinen2019-01-071-1/+1
| | | | | | | | | | | | Change-Id: I94cf44b8054c6450b818a16ee5330715e4adef89
| * | Fix TextField background not respecting control's widthMitch Curtis2018-12-212-2/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After 6858d4e9, the background of the Material style TextField does not respect the width of the control if the control is resized (e.g. due to being in a layout). - The first time resizeBackground() is called, !extra.isAllocated() returns true - that is, extra has not been allocated yet. - The if statement is executed and the background's width is set to the available width of the control (e.g. 120). - As a result of the background's width being set, its widthValid flag is set to true. This would previously be undone directly afterwards by setting widthValid flag to false. - In the case of the test case, the implicitWidth was already 120, so geometryChanged is not emitted. However, when the height of the background is set, this *does* cause itemGeometryChanged() to be called, which in turn does the following: extra.value().hasBackgroundWidth = p->widthValid; extra.value().hasBackgroundHeight = p->heightValid; resizeBackground(); So now all of the following checks evaluate to false: (!p->widthValid || !extra.isAllocated() || !extra->hasBackgroundWidth) This prevents the background from being resized. This patch fixes the issue by unsetting the widthValid (and heightValid) flags of the background directly after setting its width. To be safe, it also only unsets it if we were the ones to set it. By doing this, the check mentioned above succeeds because p->widthValid and extra->hasBackgroundWidth are both now false. It also adds some extra safety into itemGeometryChanged() that ensures that extra.value().hasBackgroundWidth is only set if necessary, and therefore prevents the extra data from unnecessarily being allocated. This is not necessary for the fix, but feels like the right thing to do. Change-Id: I051e281718bd8a2a20c100767d929fb71497ce1b Fixes: QTBUG-71875 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| * | QQuickComboBox: update QRegularExpression wildcard codeSamuel Gaist2018-12-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Following the update of qtbase because of QTBUG-72539, the code using wildcardToRegularExpression must be updated as anchoredPattern is not needed anymore. Task-number: QTBUG-72539 Change-Id: I51c895560866079c9cc27fa076e29fa4546ecf8f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * | Make it visually clear which ComboBox item is the current itemMitch Curtis2018-12-123-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do as the Default style does and make the current item bold. If we don't do this, it can be impossible to distinguish the current item from the highlighted item, especially when the popup obscures the button. Change-Id: If40b9c73c207d07fb5669564cdcfcea29ebed2f1 Fixes: QTBUG-68794 Reviewed-by: Nils Jeisecke <nils.jeisecke@saltation.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
| * | tst_QQuickStyle::availableStyles(): Ignore case when checking paths on WindowsFriedemann Kleint2018-12-121-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | It is actually possible to get the test to fail in command line environments. Change-Id: I9e37e968bd259e3c7ad4acdb8bf289a64f199891 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * | Merge remote-tracking branch 'origin/5.11' into 5.12Qt Forward Merge Bot2018-12-111-0/+20
| |\ \ | | |/ | |/| | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I89330c51bc38b8ad5d32a0aec3fbd645ceab8b5b
| | * Merge remote-tracking branch 'origin/5.11.3' into 5.11Qt Forward Merge Bot2018-12-042-1/+21
| | |\ | | | | | | | | | | | | Change-Id: Ie54d62fee6d397c685cc12411f0bcf0cc49c3547
| | | * Add changes file for Qt 5.11.3v5.11.3Antti Kokko2018-11-261-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + 65374a95a33a677740f6e6b25c424b4a4b466b3f Doc: improve SwipeView docs + d5cb26bc56a3b6f6e99c88654d4f7a65f43551ac Menu: ensure the correct delegates are used when created via Component + b41a32bc8ed42001c59af22345af4b733398aa34 wearable: fix items still being visible when returning to LauncherPage + e7213c0460788f49ec6c2204bfd5c0517699aa51 Attempt to stabilise Popup::test_shortcut auto test + d923dd467c1aeb3e195a09949b04862084002f88 MenuBar: ensure the correct delegates are used when created via Component + d56c193eb4ceb640611d66f22e1f26aae91cd7d1 QQuickPopupPositioner: avoid adding duplicate item change listeners + e236382e8cc1017597ae67bf739e91a2bd4dfd0a Bump version Change-Id: If38333444bb6ae9d5556bd995a155bfbd5d2111c Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | | * Bump versionOswald Buddenhagen2018-11-131-1/+1
| | |/ | | | | | | | | | Change-Id: If437ba7a6fbd1127f97c3ac84722bd2ec6422baa
| * | Merge remote-tracking branch 'origin/5.12.0' into 5.12Qt Forward Merge Bot2018-12-051194-3102/+3024
| |\ \ | | | | | | | | | | | | Change-Id: I7fe9e74beff3cdbfbf02ee0f129a8204ad31046e
| | * | Revert all Menu delegate patchesv5.12.0-rc2v5.12.0-rc1v5.12.0Mitch Curtis2018-11-1517-770/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * | Doc: Fix the examplesinstallpath in the qdocconfVenugopal Shivashankar2018-11-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Qt Creator tries to look for the example sources in this path, before listing them in the welcome screen. Task-number: QTBUG-71694 Change-Id: I333f380f2f8ada91865474ff95cb0df1affba9cb Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
| | * | Doc: Rename landing page title to 'Qt Quick Controls'Topi Reinio2018-11-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Qt Quick Controls 2 module is referred to without the version number. The landing page title still had the version number, which caused the table of contents to fail to find the html filename. Fix the landing page title and use the old title as a \keyword, so any external links still continue to work. Task-number: QTBUG-71694 Change-Id: I99e5eabf56028bd8a3180cb7161a0b0dcbdf9863 Reviewed-by: Martin Smith <martin.smith@qt.io>
| | * | QQuickMenuBar: fix menu not openingMitch Curtis2018-11-093-5/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-092-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-024-4/+279
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-021178-2787/+2806
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * | Add changes file for Qt 5.12.0Antti Kokko2018-10-311-0/+171
| | | | | | | | | | | | | | | | | | | | Change-Id: If4c5bcfd6bb5e6a837e124e001ea1df54c65c88f Reviewed-by: J-P Nurmi <jpnurmi@gmail.com>
| * | | Doc: Update \titles with "Controls 2" in itVenugopal Shivashankar2018-12-0415-15/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Alternatively, the old \title is now a \keyword, to avoid broken links to the page. Change-Id: Ib8b97efe8be13559c45c7ca430b2afc93edaa3e7 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * | | Fix for SpinBox crash in Qt Quick DesignerThomas Hartmann2018-12-044-2/+174
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The crash was not 100% reliable and depends on the order in the hash(). Something in beginDeferred() has a side effect on deferData->bindings and an element gets deleted. This causes a crash while iterating (++it). Therefore we do a copy of the hash. I added a regression test. The test did only crash for SpinBox and it did only crash roughly half the time. Task-number: QTBUG-71942 Change-Id: I339e0a4382f97db44f6ff2e9f07f2be7278d1e24 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * | | Port QQuickComboBox to QRegularExpressionSamuel Gaist2018-12-041-5/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch updates the QQuickComboBox code to use QRegularExpression in place of QRegExp which is to be considered deprecated. Change-Id: I6551fac80b071073e3cd09d2016ef99df510e8ff Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | | SplitView: schedule another layout if requested sizes changed during layoutMitch Curtis2019-01-083-5/+119
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As mentioned in the review of ed87e837, there could be a scenario where the user sets the preferred size of an item inside the onWidthChanged handler of another item: onWidthChanged: if (width < 10) secondItem.SplitView.preferredWidth = 100 Before this patch, this would result in the preferredWidth assignment being ignored since it happened during a layout. This patch adds some auto tests to ensure that this works, as the previous patch (that converted layouts to be done in polish/updatePolish cycles) already fixed the issue. It also adds a check to avoid doing too many layouts in the case of one of the split handles being dragged. Change-Id: Ide519b33a2fa3bf746ae3793e0671fd1750c70d8 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | | SplitView: batch layout requests via polish()/updatePolish()Mitch Curtis2019-01-083-30/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This results in less layouts, especially when a bunch of properties change one after the other. Change-Id: I8dd76d147bcc20f2ccddb587e59ac3e59f580f21 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | | Add logging categories for Tumbler and TumblerViewMitch Curtis2018-12-173-0/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Both types are complex, so it helps having logging that can simply be turned on or off to aid debugging. Change-Id: Id90a8b48b949d17710e8e0882531a497e80aae8b Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | | SplitView: react to changes in implicit size of split itemsMitch Curtis2018-12-053-0/+75
| | | | | | | | | | | | | | | | | | | | Change-Id: Id81aac71f26ec9cbf643fdc480d76841d1e3be47 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2018-12-0413-22/+115
|\| | | | | | | | | | | | | | | Change-Id: I0d2601b897e4cb8ce7a0d562927f3895d1f08f25