Commit Graph

92 Commits

Author SHA1 Message Date
Andy Shaw df33c79fb6 Reset the opacity and scale properties after the exit transition
By resetting the opacity and scale properties after an exit transition
we are ensuring that it does not lose the original values that the user
may have set.

[ChangeLog][Important Behavior Changes][Popup] After the exit
transition is finished, then the opacity and scale properties will
be reset to their values before the enter transition is started.

Pick-to: 5.15
Fixes: QTBUG-87283
Change-Id: I2b192c96eaea2906d968341255e80cd19be177e6
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2021-01-06 15:03:57 +01:00
Mitch Curtis d451cab0c8 Remove all version numbers from QML imports
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>
2020-08-26 11:46:00 +02:00
Andy Shaw 64230bf97c Get the scale of the popup item when setting the parent item
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>
2020-08-17 10:53:15 +02:00
Mitch Curtis 49ffc6e6af ComboBox: add implicitContentWidthPolicy
[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>
2020-07-16 16:40:36 +02:00
Mitch Curtis 3adeceaa1c ComboBox: fix currentValue not being updated on model changes
Make sure we call updateCurrentValue() where necessary.

Fixes: QTBUG-83554
Pick-to: 5.15
Change-Id: Iad593c2fc094a26429de1eda91bbdb152ffee2c2
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2020-05-12 10:05:01 +00:00
Lars Knoll e13c5b753a Remove the remaining usages of QRegExp and QRegExpValidator
Change-Id: Iab8e682eeb43b3403eba37f7decb7f7a494ae361
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-03-19 17:26:06 +01:00
Liang Qi ec686af14f Merge remote-tracking branch 'origin/5.14' into 5.15
Conflicts:
	.qmake.conf
	tests/auto/controls/data/tst_combobox.qml

Change-Id: I8471cdac4397f77a8e58140d58c6b50d3c437928
2019-12-30 11:44:50 +01:00
Mitch Curtis 0425562e14 ComboBox: add selectTextByMouse property
Allows configuring the selectByMouse property of the underlying
TextField for editable combo boxes.

Named selectTextByMouse instead of selectByMouse to avoid confusion
with selection of the items themselves.

[ChangeLog][Controls][ComboBox] Added selectTextByMouse property.

Change-Id: I852e4cd44ebe6b2a1ed2535513ea2fc35cbe0a32
Fixes: QTBUG-71406
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2019-12-12 16:04:48 +01:00
Mitch Curtis cb1c352807 ComboBox: change currentIndex (if applicable) when focus is lost
When the user enters text into an editable ComboBox that matches
the text of an entry in the model, and then tabs out to another
item, the currentIndex should be changed to that entry.

This brings the behavior of ComboBox in line with QComboBox.

Change-Id: Ibb1e201a503704681ebcbc7135d1964cc1f6bbca
Fixes: QTBUG-78885
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2019-12-10 12:40:32 +01:00
Qt Forward Merge Bot 6dd8ac1719 Merge remote-tracking branch 'origin/5.13' into dev
Conflicts:
	.qmake.conf

Change-Id: Ib55ecb95e5ae47cc7a46f136a2f2eb158676ea34
2019-07-04 14:45:46 +02:00
Jan Arve Sæther bb88d84475 Add a test for having a ShaderEffect as a delegate
Change-Id: If4f3dca99638015b479509e4aa73e0190b1182ac
Task-number: QTBUG-67343
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2019-05-22 15:41:56 +02:00
Mitch Curtis 291b95d201 tst_combobox.qml: remove temporary skips
4e5ff56a18 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 6c787542df for more information.

Task-number: QTBUG-74919
Change-Id: Ia993e5c138cdf9369e6bff868bba3f49c6d20270
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2019-04-23 12:47:05 +00:00
Mitch Curtis f462312365 Add valueRole API to ComboBox
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>
2019-04-23 11:11:18 +00:00
Qt Forward Merge Bot 8b61881469 Merge remote-tracking branch 'origin/5.13' into dev
Change-Id: Ica87b5aac6a7ca335acd9c5da998cc1831347420
2019-04-16 03:01:00 +02:00
Alberto Mardegan bd126fdea9 QQuickComboBox: don't hide popup if focused
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>
2019-04-10 13:15:58 +00:00
Mitch Curtis 6c787542df Fix broken build
- 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>
2019-04-03 09:01:36 +00:00
Mitch Curtis 3c7bfc1567 Tie minor version of all imports to Qt's minor version
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>
2018-11-02 16:45:04 +00:00
J-P Nurmi bc93333958 ComboBox: don't block the escape/back key (with fixed test)
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>
2018-04-25 11:50:41 +00:00
Liang Qi 110b7187ce Revert "ComboBox: don't block the escape/back key"
This change got integrated by sick COIN.

This reverts commit def92f7b65.

Task-number: QTBUG-67930
Change-Id: I541579d7112ba386b227b7892d4e0aa8e2bd4edf
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
2018-04-25 05:42:37 +00:00
J-P Nurmi def92f7b65 ComboBox: don't block the escape/back key
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).

Change-Id: Ibdb0cab8e0ac47005c5112f7ca4882288f1f5a17
Task-number: QTBUG-67684
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2018-04-23 19:37:49 +00:00
J-P Nurmi ec0ad4ca92 ComboBox: reset when hidden
Close the popup and reset the pressed state. Same as in focusOutEvent().

Task-number: QTBUG-67684
Change-Id: I51143175b0f90f3edd116723481faed6ac6e7988
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2018-04-23 13:32:23 +00:00
J-P Nurmi 2acf527d54 Combo|SpinBox: fix wheel event propagation
Sync the behavior with Qt Widgets. Don't propagate wheel events when
reaching the end. The behavior was not nice, that a ScrollView
underneath started suddenly moving whilst these input controls had
input focus.

Task-number: QTBUG-66044
Change-Id: I1b9c7f005652041cd82c77d4a1ca1a01d7d536e9
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2018-03-23 12:14:43 +00:00
J-P Nurmi 79964673d1 ComboBox: fix key search in the popup
ComboBox does not change its current index, but highlighted index,
when navigating in the popup. If the popup is accepted, the currently
highlighted index is applied as the new current index. However, if the
popup is rejected, the old current index is kept intact. This is why
there is a separation between current and highlighted index. The newly
added key search functionality (added together with ComboBox::editable)
was missing a check whether the popup is visible. It was unconditionally
changing the current index, which lead to a wrong behavior when the
popup was open.

Task-number: QTBUG-61348
Change-Id: Ic0295db609495ccefbccb7c425a817926786014e
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2018-03-12 13:03:04 +00:00
J-P Nurmi 1fcec5bf1e Merge remote-tracking branch 'origin/5.9' into 5.10
Conflicts:
	.qmake.conf
	examples/quickcontrols2/quickcontrols2.pro
	src/imports/controls/ComboBox.qml
	src/quicktemplates2/qquickabstractbutton.cpp
	src/quicktemplates2/qquickabstractbutton_p.h
	src/quicktemplates2/qquickapplicationwindow_p.h
	src/quicktemplates2/qquickcombobox.cpp
	src/quicktemplates2/qquickcontainer.cpp
	src/quicktemplates2/qquickcontrol.cpp
	src/quicktemplates2/qquickcontrol_p.h
	src/quicktemplates2/qquickcontrol_p_p.h
	src/quicktemplates2/qquicklabel_p.h
	src/quicktemplates2/qquicklabel_p_p.h
	src/quicktemplates2/qquickslider_p.h
	src/quicktemplates2/qquickspinbox.cpp
	src/quicktemplates2/qquicktextarea_p.h
	src/quicktemplates2/qquicktextarea_p_p.h
	src/quicktemplates2/qquicktextfield_p.h
	src/quicktemplates2/qquicktextfield_p_p.h
	tests/auto/auto.pro
	tests/auto/controls/data/tst_combobox.qml

Change-Id: I34cdd5a9794e34e0f38f70353f2a2d04dfc11074
2017-12-15 11:44:26 +01:00
J-P Nurmi 3ec6d04d97 ComboBox: use deferred execution
As a special case, ComboBox defers the execution of the popup until
the popup is either accessed or made visible. This gives a nice boost
in creation time benchmarks (20->25, ~25%). The old optimization of
setting the delegate model only when the popup is visible is no longer
needed.

Task-number: QTBUG-50992
Change-Id: Ifeaceb759ab676bb54c6bc09dc97810eade72ca1
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2017-12-14 07:16:20 +00:00
J-P Nurmi b311ed261a Merge remote-tracking branch 'origin/5.9' into 5.10
Conflicts:
	.qmake.conf
	src/quicktemplates2/qquickbuttongroup.cpp
	src/quicktemplates2/qquickoverlay.cpp
	tests/auto/controls/data/tst_buttongroup.qml

Change-Id: Iae23aaf039c6095007966475294e93220dbead84
2017-10-12 11:48:59 +02:00
J-P Nurmi 7e8712d575 tst_combobox: attempt to stabilize test_mouse()
Disable hover to avoid unexpected changes.

Task-number: QTBUG-60480
Change-Id: I22fab5c95daa42f3c84437072bce49cac5c705af
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2017-10-02 14:46:53 +00:00
J-P Nurmi 2e8c6a58e2 QQuickComboBox: fix attached Keys signal handlers when editable
Task-number: QTBUG-61135
Change-Id: I3f00cb81eeacbbddecc04d206bf13e602de15af7
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2017-09-11 13:39:23 +00:00
J-P Nurmi b23a0dc60f tst_combobox: remove bogus mouse highlight checks
ComboBox gained mouse hover support in Qt 5.9. The highlighted() signal
is now emitted during the test, because 4c46dce8f in qtdeclarative made
QuickTest use QTest::mouseXxx(), which in turn calls the window system
interface to deliver mouse events, and consequently, items in the combo
box receive hover events. Before, QuickTest was sending mouse events
directly, so there were no hover events involved. There is a separate
test_mouseHighlight() function for the mouse highlighting functionality,
so these tests can be simply removed.

Task-number: QTBUG-62926
Change-Id: I7e5e0df993a9c2f78bae641bdfa9189f3cd0cc67
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2017-09-01 16:44:34 +00:00
Sami Nurmenniemi adb0f009de Fix tests for boot2qt
The tests for boot2qt were disabled with commit
28063805bf. The tests can
be enabled since qtdeclarative now fallbacks to software
renderer if OpenGL is not supported.

Some tests involving mouse behavior and window grabbing
need to be skipped on minimal/offscreen platforms.

Task-number: QTBUG-60268
Change-Id: Ib468638df8d5001bf127dd17aee7dcfe38b11780
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-08-22 12:03:49 +00:00
J-P Nurmi b669a429d0 Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
	src/imports/controls/ButtonGroup.qml
	tests/auto/controls/data/tst_container.qml
	tests/auto/menu/tst_menu.cpp

Change-Id: Ie8ee7e4f83f3fda6a09507b060576ebda929a7cd
2017-06-15 11:41:19 +02:00
J-P Nurmi fe98f10bc7 ComboBox: fix QObject list value models
When ComboBox::model is bound to a QObjectList property, the effective
type of the model is QVariant(QQmlListReference) and things work as
expected. When a similar QObjectList is constructed by hand in JS, or
returned from an invokable method, the effective type of the model is
QVariantList(QObjectStar) instead. In this scenario, we have to help
QQuickComboBoxDelegateModel::stringValue() to lookup the property that
matches the given textRole.

Change-Id: Ib44c912cf647e1cd98c5608436427d31caf80d97
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2017-06-12 11:37:30 +00:00
J-P Nurmi 026353c74a Merge remote-tracking branch 'origin/5.9' into dev
Fusion style ComboBox popup height was adjusted according to 90a0d402
to make tst_controls::ComboBox::test_emptyPopupAfterModelCleared pass
with the Fusion style.

Conflicts:
	src/imports/controls/ComboBox.qml
	src/imports/controls/material/ComboBox.qml
	src/imports/controls/universal/ComboBox.qml

Change-Id: I2bad826dc56de9d8952ea2a9ace950c7cf3cbc58
2017-06-06 21:41:33 +02:00
J-P Nurmi 6b23b6b450 Attempt to fix tst_controls::ComboBox flakiness
QQuickWindowPrivate::flushFrameSynchronousEvents() is a real trouble
maker in auto tests, because it keeps delivering spurious hover events
based on the last mouse position from earlier test functions and test
cases.

Task-number: QTBUG-61225
Change-Id: I5a8d40a01e3919033f74b26357505f2b514a3281
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2017-06-06 07:01:31 +00:00
Mitch Curtis 90a0d40232 ComboBox: fix empty popup being shown after model is cleared
Currently, ComboBox's popup is sized vertically in this way:

    implicitHeight: contentItem.implicitHeight

Adding an item to a ComboBox with an empty model and then opening
the popup results in the implicitHeight being used in the line below
(in QQuickPopupPositioner::reposition()):

    QRectF rect(p->allowHorizontalMove ? p->x : popupItem->x(),
                p->allowVerticalMove ? p->y : popupItem->y(),
                !p->hasWidth && iw > 0 ? iw : w,
                !p->hasHeight && ih > 0 ? ih : h);

An explicit height was never set on the popup, and ih (the
implicitHeight of the popupItem) is greater than 0. This is fine.

However, when a ComboBox's popup item grows large enough that it has to
be resized to fit within the window, its explicit height is set. The
problem occurs when the model is then cleared, as the implicit height
of the popup item becomes 0. So, while "!p->hasHeight" is still true,
"ih > 0" is not, and the explicit height of the popup item is used,
which is still the previous "let's fill the entire height of the
window" size.

To fix this, we bind the height of the popup to a different expression:

    height: Math.min(contentItem.implicitHeight,
        control.Window.height - topMargin - bottomMargin)

This ensures that the popup has a zero height when the ListView's
implicitHeight is zero (i.e the model is empty), and a height
that fits within the window in all other cases.

Ideally, we'd have a maximumHeight property that controls this, but
for 5.9, we have to fix it this way.

Task-number: QTBUG-60684
Change-Id: Ied94c79bb7b0e693be34e9c7282d991f6f704770
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
2017-05-31 19:57:09 +00:00
J-P Nurmi eaa2b5d59c QQuickComboBox: update highlighted index on mouse hover
This is the expected behavior on desktop.

NOTE: We can no longer rely on ListView.ApplyRange, because if ListView
adjusts the content position while key navigating or scrolling, "wrong"
items may get hovered and the highlighted index gets set incorrectly
leading to a hovered->highlight->hovered loop. Therefore we force
ListView.NoHighlightRange to keep existing styles working without
modifications.

Change-Id: I57fe3de1230dd6348d01c1785cd09d4fb184d28a
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2017-05-30 13:34:36 +00:00
J-P Nurmi b3e053e2d0 tst_combobox: make test_highlightRange() more reliable
This test is failing with the upcoming Fusion style, perhaps because
the combo delegates are a bit heavier. Give the Popup and ListView some
time to layout themselves, before attempting to find a list item at the
bottom.

Change-Id: Ib8486bb7dbc4a43eb3549e2e7ca7ad1be5bad4a0
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2017-05-22 17:31:26 +00:00
J-P Nurmi d5ff436bc4 tst_combobox: get rid of waitForRendering()
Change-Id: I91b0a529b293aaef8d17cfbc2aafa5ea1805a3f8
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2017-04-27 19:31:46 +00:00
J-P Nurmi a02a54622a QQuickComboBox: handle touch events
Task-number: QTBUG-58389
Change-Id: I7120d7bce827beb97a9ae3eaf4e99cf6b6e9f209
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2017-04-19 12:50:52 +00:00
J-P Nurmi ab34a0e545 tst_combobox: use larger window
test_down() needs to place the popup below the combobox button to be
able to test its pressed and down states while the popup is open. On
some high DPI displays (Chromebook Pixel) the popup did not fit fully
below, but got pushed partly over the button. Consequently, mouse
presses went to the popup instead of the button and the test failed.

Change-Id: I03e5768e00cf1eaf6d704a16ffe2b8d1705021b2
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2017-04-04 09:37:57 +00:00
J-P Nurmi 51240b75cc Update license headers to silence qtqa/tst_license warnings
Sync with the qtbase/header.XXX. The license headers were matching
qtbase/header.XXX-OLD, which makes qtqa/tst_license flood warnings:

   Old license being used for foo.qdoc

Change-Id: I199bf303a2d648e0d5f7bc01cb0814a5f945eeff
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2017-02-24 13:04:52 +00:00
Mitch Curtis 5caaf3326b tst_combobox: use TestCase's new createTemporaryObject functions
This ensures that the appropriate objects are destroyed at the end of
each test function, even if the test fails.

Change-Id: Ib807ed5197df390521084c384d4e6ed6eb44fffa
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
2017-01-24 09:45:20 +00:00
J-P Nurmi 7728611e70 tst_controls: update import versions for controls and templates
Change-Id: I104bc44c361351719449cab94dcb14c96e91e32f
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2017-01-12 14:36:25 +00:00
J-P Nurmi 4264061a20 Merge remote-tracking branch 'origin/5.8' into dev
Change-Id: If797ac58344b20e8de4379343131c097247ba2f2
2017-01-11 10:48:42 +01:00
J-P Nurmi 00a062649b Welcome to 2017
Change-Id: If68cff4efacc7dc5719c8b8e61937e85e9076870
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2017-01-09 17:29:40 +00:00
J-P Nurmi 6e46d74b4d Merge remote-tracking branch 'origin/5.8' into dev
Conflicts:
	src/imports/controls/material/DialogButtonBox.qml
	src/imports/controls/universal/DialogButtonBox.qml

Change-Id: I16cbf9912a3526783c21a6f30996f83fce9e02c3
2016-12-20 20:07:34 +01:00
J-P Nurmi 74b6f1705a Stabilize tst_combobox::test_modelReset()
Task-number: QTBUG-57256
Change-Id: I4317242f48f7c94a35d3f0c9a6793ef113b69e77
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2016-12-13 13:31:28 +00:00
J-P Nurmi eba5b547e7 Add ComboBox::editable
[ChangeLog][Controls][ComboBox] Added editable property

Task-number: QTBUG-53876
Change-Id: I1cb035b3bb4c63f7935f08298814005fad51b5eb
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2016-11-24 09:18:02 +00:00
J-P Nurmi 7b33addb8d Merge "Merge remote-tracking branch 'origin/5.8' into dev" into refs/staging/dev 2016-11-11 10:24:46 +00:00
J-P Nurmi d6e03b3837 QQuickComboBox: ensure a parent for delegates
This allows us to replace the "width: control.popup.width" expressions
with "width: parent.width" to avoid explicit references to the popup.
Next, we are ready to defer the execution of the popup until it becomes
visible or is accessed by the user.

Without the parent item fix, ComboBox throws an error:

    ComboBox.qml:58: TypeError: Cannot read property of null

...and tst_snippets fails => tested implicitly. :)

Change-Id: Ib9cfcf7558addbe3403d835d3ae11b6c11c2f0cb
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2016-11-09 11:43:52 +00:00