aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto
Commit message (Collapse)AuthorAgeFilesLines
...
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-07-132-0/+96
|\| | | | | | | | | | | Change-Id: I76bfa11f39261e03b52ad237a09ff623bc865e0f
| * | QQuickComboBox: emit countChanged signal when model is updatedWang Chuan2019-07-112-0/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QtQuick][QQuickComboBox] countChanged signal now will be emitted when a new model is set to the ComboBox Fixes: QTBUG-75972 Change-Id: Ic26718453ba06ba284ac5903fc6f55ddf3523331 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-07-046-4/+11613
|\| | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: Ib55ecb95e5ae47cc7a46f136a2f2eb158676ea34
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Liang Qi2019-07-045-4/+115
| |\| | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf tests/auto/accessibility/tst_accessibility.cpp Change-Id: I0bc187e2a8edb4e357c1bf114dd9b1977d5c1e45
| | * Add a test for having a ShaderEffect as a delegateJan Arve Sæther2019-05-221-0/+58
| | | | | | | | | | | | | | | | | | Change-Id: If4f3dca99638015b479509e4aa73e0190b1182ac Task-number: QTBUG-67343 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| | * Accessibility: Switch should have checkbox as roleFrederik Gladhorn2019-06-131-1/+1
| | | | | | | | | | | | | | | | | | Fixes: QTBUG-76356 Change-Id: I8f8e8331adbe741be2c893f2140d793d1b901434 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| | * Don't unnecessarily transform keysequences into stringsUlf Hermann2019-05-161-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise we cannot interpret them as the original key sequence anymore. When passing them on they are interpreted as the number key that represents the numeric value of the key sequence enum. Change-Id: Idd94ef95bc693cb6d51162dd1994adc953b52e25 Fixes: QTBUG-75572 Reviewed-by: Henning Gründl <henning.gruendl@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| | * tst_accessibility: Simplify role verificationFrederik Gladhorn2019-05-141-50/+50
| | | | | | | | | | | | | | | | | | | | | Instead of casting to int and back to enum, just use the enum directly. Change-Id: Ifbd6a74ee499ffaeb99b0b4274cd59365833bfbd Reviewed-by: Liang Qi <liang.qi@qt.io>
| | * Container: Keep currentIndex at 0 when removing item 0 if possibleJüri Valdmann2019-05-071-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current behavior is to always decrement the currentIndex when the current item is removed -- even when the current item is item 0. This means, for example, that in a TabBar with three tabs and the first tab selected closing the first tab will leave nothing at all selected. Change behavior to keep currentIndex at 0 if there are still items left in the container. Now closing the first tab will leave the next remaining tab selected. Change-Id: If4e1903366e29fcee8226b776d5b2e03cec189df Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| | * Fix flaky tst_qquickmenu testMitch Curtis2019-05-071-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The important part of the "cascading" test is checking that the sub-sub menu eventually opens, so move the !visible check to the non-cascading branch of the if statement. Change-Id: I5a09bf0b5d45832f7b75c3e8c397fdb9e6fcc011 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
| * | Binary compatibility file against Qt5.13.0 for QtQuickControls2Milla Pohjanheimo2019-07-011-0/+11498
| | | | | | | | | | | | | | | | | | | | | BC file added. Change-Id: I7aca8182bb24e0064d8b76e71ad7353a4988c2f7 Reviewed-by: Sergio Ahumada <sahumada@texla.cl>
* | | Adapt to new signature for QQmlJS::DiagnosticMessageLiang Qi2019-06-271-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | A result of qtdeclarative d4d197d06279f9257647628f7e1ccc9ec763a6bb. Following similar change in qttools 875a927b49b241e6a96f2c8aace8a9c69da04ce7. Change-Id: I0f11dbf09ffa3aeb7395e7a8eb6a38bcc5f60133 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | | unblacklist passing testsDaniel Smith2019-06-251-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | These tests have not failed on the removed platforms for at least 60 days Task-number: QTBUG-76608 Change-Id: I0f49529cc567fcc8eaffbe06adb4b260cd1a9e06 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | | Remove usages of deprecated QLatin1LiteralSona Kurazyan2019-06-251-7/+7
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-76491 Change-Id: I2d141866c13046abaaa7eead1989372fa9fbc5de Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-06-152-55/+63
|\| | | | | | | | | | | Change-Id: Id8cb931daffd3dd0f75c283a9adb98ddc976973b
| * | Simplify test a bit and make it less error-prone (adding type-safety)Jan Arve Sæther2019-06-131-50/+50
| | | | | | | | | | | | | | | Change-Id: I1e8a6fec5af58ec7e94aaf20849ac3f48affb15f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * | SplitView: fix preferredHeight not being restored in restoreState()Mitch Curtis2019-06-101-5/+13
| | | | | | | | | | | | | | | Change-Id: Icc236494f5df382d6bc49092d23a460822c835a1 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-05-114-92/+433
|\| | | | | | | | | | | Change-Id: I2d9537a060ecbed1cc51dbebcc20b09753e41330
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-05-044-92/+433
| |\| | | | | | | | | | Change-Id: I1ec3d930d4131ba6d1de687250c0f4f698946af4
| | * Fix MenuItem width not matching Menu's available widthMitch Curtis2019-05-032-0/+253
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Short version: There are currently two problems with MenuItems: - Mirrored MenuItems don't fill the Menu's available width. - MenuItem does not fill the Menu's available width when changed after Component completion. This patch fixes both of them by listening to geometry changes in both the contentItem and individual menu items, and setting the explicit width of those menu items when either changes. Longer version: The first problem can be seen whenever the MenuItem's implicitWidth changes: - QQmlEngine::retranslate() is called, causing all bindings to be re-evaluated - The MenuItem's font size changes - The MenuItem's icon size changes - etc. We fix this by making Menu listen to the width of each of its MenuItems and call resizeItem() if it doesn't have an explicit width. The second problem can be seen when e.g. resizing a Menu to account for new items that are wider and hence require more space. This can be fixed by listening to width changes in Menu's contentItem, which was actually done in earlier versions but (probably accidentally) removed in 482ecb0f. I had tried to solve both issues by setting the explicit width of MenuItem to the width of its Menu, or undefined if it has none (which means it reverts to its implicit width). However, this does not account for e.g. MenuSeparator and custom items that can be added to Menu - they should also have their width fill the Menu automatically if they don't have an explicit width set. Change-Id: I95dd0da0919a1e297f2e2030da746ff1f1a17644 Fixes: QTBUG-75051 Fixes: QTBUG-75142 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| | * Make tst_qquickmenu run with all stylesMitch Curtis2019-05-033-92/+180
| | | | | | | | | | | | | | | | | | | | | | | | | | | This is a prerequisite for ensuring that an Imagine-style-specific fix works. Fixes: QTBUG-75141 Change-Id: Iafef3bf947151cb35b88a1230e3541d8e4e15fd9 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-05-042-4/+4
|\| | | | | | | | | | | Change-Id: I687ae31ea78ae5a39066e5ea47ec1d661642a7cb
| * | Fix tst_cursor when running in Android emulatorMitch Curtis2019-05-032-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Explicitly set hoverEnabled to true on the ScrollBar to account for platforms like Android, where the UiEffects style hint does not include HoverEffect, and hence QQuickControlPrivate::calcHoverEnabled() would otherwise return false. Change-Id: Iee2b1f7c3ee8e5caf2a7b4f6695ab4dabd6b4753 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-04-272-3/+10
|\| | | | | | | | | | | Change-Id: I26d74fad831ec1379b88742c577fea9e6b02f456
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-04-252-3/+10
| |\| | | | | | | | | | Change-Id: Ibf39232616ea6ef67242b70011aa683ce8dc0b4f
| | * Use resource path for test data on Android and iOSMitch Curtis2019-04-242-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qtbase/mkspecs/features/testcase.prf already generates a .qrc file containing the files in TESTDATA, so instead of trying to copy QML files to the device, we can just use the existing resources. This fixes the following failure, which affects all tests using util.pri: FAIL! : tst_cursor::initTestCase() 'QDir::setCurrent(m_directory)' returned FALSE. (Could not chdir to :/) Change-Id: I1fd7449437be045a7230a7679e24252cdf9c0ccc Fixes: QTBUG-73604 Fixes: QTBUG-73606 Fixes: QTBUG-73607 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | tst_combobox.qml: remove temporary skipsMitch Curtis2019-04-231-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4e5ff56a18dc7bb13680a8fbe30ba5aae2dfa206 has now been included in a qt5.git submodule update (74eab55ea83a9919e0a3085015d2e522bd351ac1), so the tests are no longer failing and hence do not need to be skipped. See 6c787542df32c59fe0299b2ad884968de28dbcba for more information. Task-number: QTBUG-74919 Change-Id: Ia993e5c138cdf9369e6bff868bba3f49c6d20270 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | Add valueRole API to ComboBoxMitch Curtis2019-04-231-1/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows the user to conveniently manage data for a role associated with the text role. A common example of this is an enum stored in a backend with nicely formatted text displayed to the user. Before this patch, developers would have to write code like this: ComboBox { textRole: "text" onActivated: backend.modifier = model[currentIndex].value Component.onCompleted: currentIndex = findValue(backend.modifier) model: [ { value: Qt.NoModifier, text: qsTr("No modifier") }, { value: Qt.ShiftModifier, text: qsTr("Shift") }, { value: Qt.ControlModifier, text: qsTr("Control") } ] function findValue(value) { for (var i = 0; i < model.length; ++i) { if (model[i].value === value) return i } return -1 } } With this patch, the code becomes much simpler: ComboBox { textRole: "text" valueRole: "value" onActivated: backend.modifier = currentValue Component.onCompleted: currentIndex = indexOfValue(backend.modifier) model: [ { value: Qt.NoModifier, text: qsTr("No modifier") }, { value: Qt.ShiftModifier, text: qsTr("Shift") }, { value: Qt.ControlModifier, text: qsTr("Control") } ] } [ChangeLog][Controls][ComboBox] Added valueRole, currentValue and indexOfValue(). These allow convenient management of data for a role associated with the text role. Change-Id: I0ed19bd0ba9cf6b044a8113ff1a8782d43065449 Fixes: QTBUG-73491 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-04-162-0/+84
|\| | | | | | | | | | | Change-Id: Ica87b5aac6a7ca335acd9c5da998cc1831347420
| * | Merge remote-tracking branch 'origin/5.12' into 5.13v5.13.0-beta3Qt Forward Merge Bot2019-04-132-0/+84
| |\| | | | | | | | | | Change-Id: Ice7d2ed56c85521a946b218d84087b255d3613ae
| | * QQuickComboBox: don't hide popup if focusedAlberto Mardegan2019-04-101-0/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ComboBox popup should be closed when the ComboBox loses focus, but not if the control gaining focus is the popup itself. While all the styles implemented in this module implement the ComboBox popup as an unfocusable window and handle all the keyboard events in QQuickComboBox itself, the developer can choose to replace the popup with a custom implementation, which might need the keyboard focus. Fixes: QTBUG-74661 Change-Id: I838ab9cb697df63ea2099e68f1ae99eadb06be08 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| | * SpinBox: fix indicators being hovered when mouse is moved while pressedMitch Curtis2019-04-081-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We also need to update the hovered state of each indicator when the mouse is moved while pressed, not just when we get hover move events. Change-Id: I6fa71344fd540f648683958e5804ae735523e72d Fixes: QTBUG-74688 Reviewed-by: Henning Gründl <henning.gruendl@qt.io> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-04-093-34/+25
|\| | | | | | | | | | | Change-Id: Icc0bf6680e7c329a797f9924c283023a3d42b93a
| * | Merge remote-tracking branch 'origin/5.12' into 5.13v5.13.0-beta2Qt Forward Merge Bot2019-04-063-34/+25
| |\| | | | | | | | | | Change-Id: I5b112e0e4021191c387da86bb5b0477fe0c4da30
| | * tst_dialogbuttonbox.qml: consolidate two similar testsMitch Curtis2019-03-291-24/+11
| | | | | | | | | | | | | | | | | | | | | into one data-driven one. Change-Id: I7507765747dd984530e50df5cd08152b9d71cb66 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| | * tst_dialogbuttonbox.qml: use tryVerify() consistently to avoid flakinessMitch Curtis2019-03-291-8/+12
| | | | | | | | | | | | | | | | | | Change-Id: Ic18cca692b09f55818b9c99379aae4be72ba4159 Fixes: QTBUG-74711 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| | * Attempt to stabilize Tumbler::test_itemsCorrectlyPositionedMitch Curtis2019-03-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I'm not sure if this will help (because I haven't been able to reproduce the flakiness, even in a CI VM), but the tumbler should really not still be spinning after we got the position of its items, so make sure it's stopped before doing any comparisons. Task-number: QTBUG-70597 Change-Id: I72555747b2ea4ef136cdaa13f7b0757be2624e73 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| | * Mark BaseValidator::throwRecursionDepthError() as finalUlf Hermann2019-03-271-1/+1
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-74512 Change-Id: I7b154d793c134a93aa3a48ade7d3ae785c44e7ea Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | Fix broken buildMitch Curtis2019-04-031-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Remove the override keyword from QQuickComboBoxDelegateModel::stringValue() as the function is no longer virtual, and a change in dev will fix this properly once a qt5.git submodule update happens. - Temporarily skip any failing ComboBox tests that result from the previous step. Task-number: QTBUG-74919 Change-Id: If57bfbd1c8b253cb9ad3bfad4b5f9b9a271744ab Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-03-301-0/+29
|\| | | | | | | | | | | Change-Id: Iede101fc3931d918c1796eb32fd6352e3b2f3b68
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-03-271-0/+29
| |\| | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I37f9f88a11946d5d67935c682273eb0aa8593f9b
| | * DialogButtonBox: don't sort buttons based on their memory addressesMitch Curtis2019-03-221-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When two buttons' roles are equal, the code would fall back to comparing the buttons' memory addresses. This leads to random results, which are especially noticeable on Windows and with release builds. This patch fixes the issue by instead returning false if the roles are equal. This still satisfies the "comp(a,a)==false" requirement of strict weak ordering: https://en.cppreference.com/w/cpp/named_req/Compare The patch also changes the sorting algorithm used from std::sort() to std::stable_sort(). Although it doesn't appear to be necessary from the testing that I did, it is good to ensure that the order of equal elements is maintained. Fixes: QTBUG-70451 Change-Id: I47561604108b12bf8ec0c794a2372767f0b2e04e Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-03-212-2/+140
|\| | | | | | | | | | | Change-Id: I48383fc70de754394259d5dfd19c7b25f1280f67
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-03-201-0/+6
| |\| | | | | | | | | | Change-Id: Id548fd29dd5cc357c4bd00c3c842006f2d62c758
| | * Handle recursion depth errors in tst_sanity.cppUlf Hermann2019-03-181-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | Implementations of QQmlJS::AST::Visitor are required to do so. Fixes: QTBUG-74512 Change-Id: I19d40d2d3a5d3588cad4caa7f0a48c13919077a0 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-03-161-2/+134
| |\| | | | | | | | | | Change-Id: If27c142786ad2457a80ce1ef65220834eda81e94
| | * Fix DialogButtonBox content size calculationMitch Curtis2019-03-151-2/+134
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some history: - f1f884d3 worked around an issue in DialogButtonBox. - c2fd8f7d fixed it by using contentWidth; i.e. the implicit width of the contentItem. It caused QTBUG-72372. - I tried to fix QTBUG-72372 with 6476de0b, but created (or exposed) QTBUG-73860. The problem in QTBUG-73860 can be seen with the following example: Dialog { id: dialog visible: true standardButtons: Dialog.Ok } The single 'Ok' button here will go outside of the dialog. The underlying issue can be seen by looking into DialogButtonBox.qml: implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, (control.count === 1 ? contentWidth * 2 : contentWidth) + leftPadding + rightPadding) implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, contentHeight + topPadding + bottomPadding) The implicit width of the box in this case is contentWidth * 2 (there is one button, so control.count === 1). This should result in the button taking half the width of the box and being aligned to the right: alignment: count === 1 ? Qt.AlignRight : undefined ... delegate: Button { width: control.count === 1 ? control.availableWidth / 2 : undefined } What actually happens is that the contentItem (ListView) is temporarily 0 until it gets its final size of 100. However, QQuickDialogButtonBox doesn't respond to this change in the ListView's contentWidth. This problem can be fixed by returning to c2fd8f7d's resizeContent() implementation, which uses contentWidth. Then, there is a second issue: Dialog { id: dialog visible: true standardButtons: Dialog.Ok width: 300 } The button here is also positioned outside of the box. The problem is that the contentWidth is based on implicitContentWidth: QQuickContainerPrivate::updateContentWidth() { // ... contentWidth = implicitContentWidth; // ... } implicitContentWidth is calculated by calling getContentWidth(): void QQuickControlPrivate::updateImplicitContentWidth() { // ... implicitContentWidth = getContentWidth(); // ... } In the case of horizontal alignment, QQuickDialogButtonBoxPrivate::getContentWidth() uses the implicit width of the largest button: for (int i = 0; i < count; ++i) { QQuickItem *item = q->itemAt(i); if (item) { totalWidth += item->implicitWidth(); maxWidth = qMax(maxWidth, item->implicitWidth()); } } // ... if ((alignment & Qt::AlignHorizontal_Mask) == 0) totalWidth = qMax(totalWidth, count * maxWidth + totalSpacing); The Default style button has an implicitWidth of 100. The DialogButtonBox in the example above is 300 pixels wide, so the button should be 150, and it is, thanks to its width binding. However, the DialogButtonBox uses contentWidth to size its contentItem (ListView), and the contentWidth is, as mentioned, 100: the implicit width of the button. So, the button ends up hanging over the side of the box, as it's larger than the box thinks it is. This problem is fixed by setting DialogButtonBox's contentWidth to the contentWidth of the contentItem (ListView). This makes DialogButtonBox use the explicit widths of the buttons rather than their implicit widths. Since the contentWidth is no longer implicit, we must also change any use of contentWidth in the implicitWidth binding to implicitContentWidth. While writing auto tests for this, they caught an issue where contentWidth wasn't updated, so now we call resizeContent() in QQuickContainer::setContentWidth(). Change-Id: I99ffda21b47aeb14d4382e453e87c4312f343a1c Fixes: QTBUG-72886 Fixes: QTBUG-73860 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-03-126-17/+201
|\| | | | | | | | | | | Change-Id: I79759d4101b5267c5d9d74ccb81e994da002b0ef
| * | Fix SplitView crash when using certain attached propertiesv5.13.0-beta1Mitch Curtis2019-03-111-7/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the attached property object was created on an item that SplitView doesn't manage, then its m_splitView member will be null, so check for that. Sometimes, an attached SplitView object will be created on an item that SplitView _does_ manage, but SplitView's own contentItem hasn't been created yet (see the comment in the QQuickSplitViewAttached constructor). In that case the SplitView will see the item added as a child of its contentItem eventually, and we just have to wait. While we are waiting, check access to our members in case they are null. Fixes: QTBUG-74276 Change-Id: I70b7f017e621e0d15c239b962f0407743eb70b15 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-03-092-0/+154
| |\| | | | | | | | | | Change-Id: I34009799fe4016339920a7f0884af4dbe6d71418