summaryrefslogtreecommitdiff
path: root/tests/auto/controls/data/tst_combobox.qml
Commit message (Collapse)AuthorAgeFilesLines
* Unify license header usageAntti Kokko2016-02-041-3/+13
| | | | | | | Updated BSD license headers Change-Id: I73d67dbc6dbbe7c58d2b9c301b46fb6163243095 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Fixed missing close of the ComboBox when clicking on itFilippo Cucchetto2015-12-071-0/+14
| | | | | | | | | | The mouse event that dismissed a popup window should not dispatched to the visual item. Otherwise the menu open again. Task-number: QTBUG-44532 Change-Id: Id8aca1634e4f1795e546230953bff49518589714 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Allow ComboBox to select items with empty textNikita Krupenko2015-10-261-0/+19
| | | | | | | | | | | | ComboBox checks selected text like a boolean value. This check is unnecessary and prevents from item with empty text could be selected. [ChangeLog][ComboBox] ComboBox is now able to select items with empty text. Task-number: QTBUG-42127 Change-Id: Ifaa0598d17c85cee099c88f4e03092137ba17c70 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Menus: Clean popup hide and destroy logicGabriel de Dietrich2015-10-011-2/+2
| | | | | | | | | | | | | | | | | | | When a menu popup gets closed it usually needs to be destroyed right away since we don't recycle its contents. There is an exception, however, and it's when he user triggers a menu item. In this case, we need to proceed in three steps. First, we hide the menu popup, then we emit the triggered signal, and when that one returns, the menu contents can be disposed. If we did all in a single step, we may end up with a crash since we don't support deleting a QtQuick item while it's running a signal handler. Delayed deletions don't work either in the case when the triggered handler ends up running the event loop. Task-number: QTBUG-45182 Task-number: QTBUG-47682 Task-number: QTBUG-48382 Change-Id: Ic39717e09f38df602f641250cd81cf4931863db6 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Menu: Schedule popup deletion when it's about to hideGabriel de Dietrich2015-09-111-0/+1
| | | | | | | | | | This leads to serious memory/OpenGL context leaks on Windows. No such thing has been noticed on Linux which may hint to differences in the backend. Task-number: QTBUG-47682 Change-Id: I274ed98db348ffe2c78707f2c92b812f272c2723 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* ComboBox: Update selected text with item textSanttu Lakkala2015-06-231-0/+11
| | | | | | | | | Bind the text of a inactive ComboBox to the text of the selected popup menu item, so that the text updates when the model changes. Task-number: QTBUG-46611 Change-Id: Ieba4d8ee7d9b37390e805a3bde58bf546c5009b1 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* BSD license for QML code in testsJ-P Nurmi2015-03-061-22/+26
| | | | | | Change-Id: Ie45c9b8d5a5d7f92e4b835473b0c76e3a83998b5 Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com> Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
* Use TabFocusBehavior in QStyleHints in QtQuick.ControlsLiang Qi2015-02-131-1/+1
| | | | | | | The all usages of qt_tab_all_widgets in test were updated. Change-Id: I35393c67f183c4e0695e869553007ea00d38c06a Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Tests: update license headersJ-P Nurmi2015-02-111-29/+25
| | | | | | | Change-Id: I364c2ee1983f59f4c1b3e4e411b46f71c85599ee Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com> Reviewed-by: Mitch Curtis <mitch.curtis@digia.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* ComboBox: Update currentText when currentIndex goes from -1 to 0Gabriel de Dietrich2014-04-281-0/+14
| | | | | | | | | | | | We need to help things a bit because the internal selectedText property won't change in that specific case. Task-number: QTBUG-38036 Change-Id: Id997da97a77faad8ffaad08e8b9c7614d8b6b7fc Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com> Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* Bump QtQuick.Controls import version to 1.2J-P Nurmi2014-04-071-24/+24
| | | | | Change-Id: Idc0b93cbfc2fe23e8be3bcaece672d06555a81f6 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Import QtQuick 2.2J-P Nurmi2014-04-071-4/+4
| | | | | Change-Id: Ifc9719ec6fbbd80b866c01eebc471d0ed121bd16 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Controls: Fixed support for Keys attached property on controls allowing text ↵Liang Qi2014-01-221-0/+32
| | | | | | | | | | | | | | | | | | | | | | | input By forwarding key events from the internal control. It includes TextField, TextArea, ComboBox, SpinBox. The key events from internal are Keys.forwardTo controls, then user could customize their own behavior for those controls. Autotest are included. [ChangeLog][QtQuickControls] Fixed support for Keys attached property on controls allowing text input, by forwarding key events from the internal control. Task-number: QTBUG-33493 Task-number: QTBUG-34101 Task-number: QTBUG-35763 Change-Id: I00ea131160e55048b34fe0713e1ee02ff9472f05 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* ComboBox: Allow setting currentIndex to -1 to clear selectionv5.2.1Gabriel de Dietrich2014-01-081-0/+17
| | | | | | | | Task-number: QTBUG-35794 [ChangeLog][QtQuickControls]ComboBox: Allow setting currentIndex to -1 to clear selection Change-Id: I034b061484ab095a9ec049fb3b35614b98bfb956 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* ComboBox: Don't suggest auto-complete text if editText is emptyGabriel de Dietrich2014-01-081-0/+1
| | | | | | | ... for editable ComboBoxes, that is. Change-Id: Ieda089f715e8252ae47bbbff647982f96ec5f797 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Make editable Combobox accept substringsJens Bache-Wiig2013-12-131-0/+18
| | | | | | | | | | | | | | | This fixes the issue that onAccepted would not update the currentText or current index if the string was a substring/partial match. Note that the new internal MatchFixedString case matches the complete string in a case insensitive way. [ChangeLog][Qt Quick Controls][Editable Combobox would not update currentText when accepting a substring of an existing value.] Task-number: QTBUG-35521 Change-Id: Ied850208425ae71b2414f1abf9389e9a8ed50cfb Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* ComboBox: Call resolveTextValue() after any model changeGabriel de Dietrich2013-11-261-7/+9
| | | | | | | | Particularly if the nature of the model has changed (e.g., from null to array). Task-number: QTBUG-34936 Change-Id: If07690a8836dcd786ed7a32afda1e344d048d31f Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* ComboBox: Minimize currentText changes when changing modelGabriel de Dietrich2013-10-251-9/+66
| | | | | | | | | | | | | | | | Bonus change, changing the model after its initial value will reset currentIndex to 0. test_arraymodelwithtextrole needs some rework. The issue relies on textRole and model being set separately, and a late change to __modelIsArray updating the currentText when it probably shouldn't. [ChangeLog][QtQuick Controls][ComboBox] Changing the model after initialization will reset currentIndex to 0 Change-Id: If6c0dee9e022036ef888f2aef87a5c405868684b Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Make ComboBox editableJens Bache-Wiig2013-09-171-0/+252
| | | | | | | | | | | | | | | | | | In addition - Added text completion - Added validator - Added accepted signal - Added activated signal - Added textAt function - Added find function - Added keyboard indexing for non-editable as well Note that we do not support adding values to the model, but leave this up to the user to handle in onAccepted. Change-Id: I1d76fa83aea0e488959c418d22ce7b6027675d86 Reviewed-by: Caroline Chao <caroline.chao@digia.com> Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Update imports to 1.1 and remove version from qmlmodule definitionJens Bache-Wiig2013-09-101-13/+13
| | | | | Change-Id: Icb4c6d78225c072da787e4646a55d8cf71a5db7a Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* Make ComboBox work with variant listJens Bache-Wiig2013-06-271-0/+28
| | | | | | | | Task-number: QTBUG-31992 Change-Id: If63c762cf3789ca1353dd40e7059f2d334e2dbe3 Reviewed-by: Caroline Chao <caroline.chao@digia.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Adapt to Qt.platform.os rename ("mac" -> "osx")v5.1.0-rc2v5.1.0J-P Nurmi2013-06-241-5/+5
| | | | | | Change-Id: I089a01bee10b92f85dcdd338c695a3b796b0ecd1 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com> Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
* Mac: respect the system settings in Full Keyboard AccessLiang Qi2013-05-151-0/+4
| | | | | | | | Because we use TableView as ListView, then only SpinBox, TextField, TextAre and TableView could be selected. Change-Id: I65ca106e60a57d86e029647653ae110fd81edaa4 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Autotests: Remove expectfail for test addRemoveItemsInModelCaroline Chao2013-05-081-2/+0
| | | | | | | The bug QTBUG_30379 has been fixed. Change-Id: Ic05f70e3dec528cacefba44d14a76952b5636315 Reviewed-by: Liang Qi <liang.qi@digia.com>
* ComboBox: Arrays of strings don't have textRole.Caroline Chao2013-04-301-0/+10
| | | | | | | | | Don't return a get function when the model is an array and the return value is a string. So resolveTextValue() won't try to retrieve a textRole in that case. Change-Id: Ifc85eacc67accd34d63805487e20ae5829523c14 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Tests: Add autotests for ComboBoxCaroline Chao2013-04-221-0/+86
| | | | | Change-Id: Ie1496463831785d598e611289146a925f1e42af1 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* ComboBox: Add activeFocusOnPress propertyCaroline Chao2013-04-221-0/+32
| | | | | | | | We want this property to allow the user to open the menu using the space key. Change-Id: I291195cdb0e9658860636934d25315b100747eca Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Tests: add more tests for activeFocusOnTab propertyCaroline Chao2013-04-121-0/+75
| | | | | | | Qml tests. Change-Id: I0b0f8b9de7a6e0da97a94eb9476e985f3539055a Reviewed-by: Liang Qi <liang.qi@digia.com>
* Tests: Destroy created components at the end of the tests functionsCaroline Chao2013-04-111-0/+9
| | | | | | | To ensure the components don't interfere with other functions. Change-Id: Ie22311471021175d23ae47c9e3a1ec603e803f2c Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Fix ComboBox textRole when used with an array as a modelJosh Faust2013-04-091-0/+29
| | | | | | | Task-number: QTBUG-30455 Change-Id: If80dd74a5967a6a7392967fb6a19a094f81abd36 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Change imports from QtQuick 2.0 to QtQuick 2.1Caroline Chao2013-03-141-2/+2
| | | | | | Change-Id: If9df032c76e36f385aacd30cc31d6f02574c6f11 Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* ComboBox: Rename 'selectedIndex' property to 'currentIndex'Gabriel de Dietrich2013-03-131-10/+8
| | | | | | | | | | Also, removed 'pressed' property. In Menu, we removed 'selectedProperty' as well. (And by 'removed', we mean 'made it private'.) Auto-tests have also been updated. Change-Id: I4b4f9c81aad1165df1d2925964a9cd383079aa9c Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Menu: Remove 'model' property, ContextMenuGabriel de Dietrich2013-03-131-3/+5
| | | | | | | | | | | | | | | In the near future, we hope that QML types like Creator/Instantiator (currently under review) will help simplify model binding, and object creation and deletion. Also, given the differences between QML models and QAbstractItemModel APIs, it's hard to provide a unified and elegant solution for this right now. ComboBox gets the part of the logic that ContextMenu was responsible for, extended to support string list and number models. Auto-tests updated and XFAIL removed where applicable. Change-Id: I9f5d4059644c495bffff76fb7c353e6fe7fde62e Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Replaced BSD with LGPL license to conform with Qt Project modulesShawn Rutledge2013-02-211-1/+1
| | | | | | | | We want to use the same license as the other Qt modules. QML files stay as BSD for now. Change-Id: I10b1484f5ab0dfe2138ff7e045d0ecfd85556aa1 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Rename QtDesktop to QtQuick.ControlsJens Bache-Wiig2013-02-211-0/+83
Change-Id: Icc61dbfc74cc2a303b9847e7d2c7ace4a9002046 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>