summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)AuthorFilesLines
2014-01-28Allow size hint changes during a rearrange.Jan Arve Saether1-0/+36
Previously, we marked the layout as not dirty straight after a rearrange was done. However, in the case of when a size hint changed during a rearrange that would block the pending rearrange (since it only perform the actual rearrange if its dirty). Instead, mark the layout as not dirty *before* the rearrange. This will allow bindings such as implicitWidth: height to execute the pending rearrange. (Although such bindings are not encouraged) Task-number: QTBUG-36169 Change-Id: I75bd821a0ca4302026bd5dac01287ca3359d471b Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2014-01-22Controls: Fixed support for Keys attached property on controls allowing text ↵Liang Qi8-0/+377
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>
2014-01-16Support negative layout spacings (do not assert)Jan Arve Saether1-0/+41
This tests * default spacing * explicit positive spacing * negative spacings Negative spacings that causes the layout to shrink down to 0 or a negative spacing are not supported. (But make sure they don't crash the whole engine) Task-number: QTBUG-35741 Change-Id: I69521dffb03c35a63db37ab51a2e99152d88272b Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2014-01-14tests: update activeFocusOnTab to support editable ComboBoxLiang Qi2-6/+48
ComboBox was editable since 4c184095d378622fb0c3bb1692b331b3cc04e010. It should get focus when editable is true in tab focus chain. The behavior was fixed in qtdeclarative side. Change-Id: I85f26e99e00f970b8603d8ca23b1e55daa52159b Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2014-01-08ComboBox: Allow setting currentIndex to -1 to clear selectionGabriel de Dietrich1-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>
2014-01-08ComboBox: Don't suggest auto-complete text if editText is emptyGabriel de Dietrich1-0/+1
... for editable ComboBoxes, that is. Change-Id: Ieda089f715e8252ae47bbbff647982f96ec5f797 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2014-01-07Do not loop infinitely if a span is larger than the layout extentJan Arve Saether1-0/+22
There is no point in searching through all cells to see if an item of columnSpan 3 fits into a layout with 2 columns, since it won't ever fit. So instead we detect this case early and ignore the item for inclusion. Task-number: QTBUG-35778 Change-Id: I3f7963df17b05b3eb14ba0bae49e5a885d15b33b Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2013-12-21Fixed: Regression in key navigation on TableViewJens Bache-Wiig1-0/+28
It turns out the currentIndex/CurrentRow was updated but the selection, was ignored for the last row in a TableView. [ChangeLog][Qt Quick Controls][Fixed: TableView regression where the last row in a TableView could not be selected by keyboard.] Task-number: QTBUG-35572 Change-Id: Ifdf11f665733dd63ba56e12fe0dabdd7932a4ab9 Reviewed-by: Caroline Chao <caroline.chao@digia.com>
2013-12-13Make editable Combobox accept substringsJens Bache-Wiig1-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>
2013-12-04SpinBox: attempt to fixup the input as appropriateJ-P Nurmi1-0/+26
So for example "-0", which is a valid intermediate value, becomes "0" when the spinbox is accepted (enter) or it loses focus. Task-number: QTBUG-34774 Change-Id: Ie153294755aae2bf94ba1cb53c40a8fc5f1f5862 Reviewed-by: Liang Qi <liang.qi@digia.com>
2013-11-26Make TextFieldStyle and SpinBoxStyle respect font sizeJens Bache-Wiig2-0/+20
This makes both the controls respect a custom font size. Before this patch these controls would only support the global application font. Task-number: QTBUG-34750 Change-Id: I200a14adba5b75088ab54ba691430330d9226ada Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2013-11-26ComboBox: Call resolveTextValue() after any model changeGabriel de Dietrich1-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>
2013-11-22SpinBox: add editingFinished signalLiang Qi2-0/+91
Autotest is included. Task-number: QTBUG-34780 Change-Id: I2da9d57b409c24cbf1d90ce42da9b4071dd6dac8 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2013-11-22TextField: add editingFinished signalLiang Qi2-0/+93
Autotest is included. Task-number: QTBUG-34780 Change-Id: I19e73ca0c988a9d294aca52f9c0eabb9274f40d7 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2013-11-15SpinBox: get active focus when up or down was pressedLiang Qi1-0/+70
This behavior also needs activeFocusOnPress was true. Task-number: QTBUG-34773 Change-Id: I681c1cb20c1803e3bf7f60af5cdf45ae3fe34dae Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2013-11-08Fix warning in Tests_TabView::test_mousePressOnTabBarCaroline Chao1-1/+1
Task-number: QTBUG-34666 Change-Id: I13506cc7504c71d9411e2b100bec803abb2eaccd Reviewed-by: Liang Qi <liang.qi@digia.com>
2013-11-07Tests: Fix warning in activeFocusOnTab testCaroline Chao1-0/+0
Missing image. Change-Id: I3c52d7d60690346bed4002dee5c6b0844194784f Reviewed-by: Liang Qi <liang.qi@digia.com>
2013-10-31Expose ToolBarStyle and StatusBarStyleJens Bache-Wiig1-2/+2
As they are rather basic, I think we should simply expose them rather than explain why people should use rectangles. Change-Id: I8ef79452fb27ffa0ef11bb477c687033996b4a5e Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-10-31More styling improvements for Base StyleJens Bache-Wiig1-10/+14
- Better scalability - Retina support - Added glow filter to Private - Added focus rects Change-Id: I2ec36a9db546c21e20408429c5e17fde8d67b7c3 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-10-29Fix: Button does not toggle on keypressJens Bache-Wiig1-0/+13
This ensures that you can toggle a button using the space bar. task-number: QTBUG-33540 Change-Id: I7f665623fe113be11ba7e3f2c605e255d45e31a9 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-10-25Adjust height if the ToolBar or StatusBar is dynamically hiddenJan Arve Saether1-0/+98
Triggered by a manual test I'm working on Change-Id: I8d49a7d19ac7daebda388df8e2d8595607fdd52c Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2013-10-25ComboBox: Minimize currentText changes when changing modelGabriel de Dietrich1-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>
2013-10-25Use depends instead of ordered for dependenciesFrederik Gladhorn1-1/+1
Change-Id: Ia24df4e387655106c7b7d31535f00ecb675860b4 Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2013-10-24Switch styling fixesJens Bache-Wiig1-0/+4
- makes it work somewhat better on HDPI devices. - makes it translucent when disabled - makes it show up int testbench Change-Id: I48a4b65f969430a3f7d1c5fe3b6623b86324a3d3 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2013-10-23Add TextAreaStyleJ-P Nurmi2-1/+8
Task-number: QTBUG-33266 Change-Id: I7bcd45469e757f7bde25b62e2324833b85a0ee7f Reviewed-by: Caroline Chao <caroline.chao@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2013-10-23Fix tst_styles nameJ-P Nurmi1-1/+1
Change-Id: I68664c5be3b465a4eea82685356f20c39a113d78 Reviewed-by: Caroline Chao <caroline.chao@digia.com>
2013-10-22Fix checkable Button behavior - toggle on release instead of pressJ-P Nurmi1-0/+68
This way it's consistent with QPushButton, and this is also the appropriate behavior on touch screens. Task-number: QTBUG-33796 Change-Id: I6ab11ed199223cd77e08273f1299a8a668a6f786 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-10-22Ignore shift modifier in single selection modeJens Bache-Wiig1-0/+31
When holding shift in single selection mode, you can incorrectly select multiple rows. This fixes that issue and adds an auto-test. Change-Id: If43846b631e5a3927cf68f69298f71786f664fd0 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2013-10-20Fix disabling of ActionFrederik Gladhorn1-0/+10
A disabled action was reported as ambiguous with a non-amb. one. Instead just ignore the disabled one. Change-Id: I6e03b126a5ef1dddc2342c5c2b27ff6541839e33 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-10-17Remove widget dependency on touch platformsJens Bache-Wiig5-8/+6
We don't want native styling on touch enabled devices and there is no reason to link against widgets there. Change-Id: I70116a0a94227cb58ae25980b97c4177da75a3c8 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2013-10-01Make the manual test nicer and more usefulJan Arve Saether2-236/+228
Change-Id: Iac5e8c32d8fa70664829ce5ded37fe3ff5ceb455 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2013-10-01Update the internal alignment when an item *changes* its alignmentJan Arve Saether1-3/+17
Previously it only respected the initial alignment. Task-number: QTBUG-33773 Change-Id: I1d24209b866babd4bacabaec569f2f7dcc913c02 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2013-10-01Don't apply baseline calculations if Qt.AlignBaseline is not setJan Arve Saether1-0/+40
Parts of the code assumed that if q_minimumDescent or q_minimumAscent was valid, it would reserve enough space in each case for the combined ascents and descents of all items in a row. The extreme case was when one item had a baseline at its bottom edge, and the next item had the baseline at its top edge, the layouts minimum height tried to reserve space for such a case even though baseline alignment was not desired. The last case in the test demonstrates such a (valid) case. The problem was that the same logic was applied to the first case. Change-Id: Ie24503b1a5f7333f16ed84ebe01ab8d48becb4e2 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2013-09-22Add a basic Switch controlJens Bache-Wiig2-0/+258
This is a very simple switch. I left out text label as this is very mobile oriented. A clicked signal is also debatable as you dont really click on a switch. Change-Id: I84269297cba48f0e81af8f25af5b97acadecdd6a Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2013-09-20Enable TableView multi-row selectionJens Bache-Wiig1-0/+219
This adds a new read-only property selection and selectionMode to TableView with the following features: selection.selectAll() selection.select(from, to) selection.deselect(from, to) selection.forEach(callback) selection.contains(index) selection.selectionChanged() selection.count Change-Id: I3cbd433851354bb68a6075f0b31f46dab8c83fd4 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-09-20Make SpinBoxStyle publicJens Bache-Wiig1-1/+1
While it is still not possible to completely configure the look and feel, I think we can expose it as is. Change-Id: If05004ffa4425863fc28094c8c52ba981296882a Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-09-20Add baseline support for Qt Quick LayoutsJan Arve Saether2-0/+309
Change-Id: Ieb5f1a2c9fa81bdb6ff587ef84e97b2233f2e289 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2013-09-19Merge branch 'stable' into devSergio Ahumada1-0/+33
Conflicts: tests/auto/controls/data/tst_splitview.qml Change-Id: I07a169238e747d953b555911790fa782888b85e8
2013-09-19SplitView: fix hidden item after fillWidth item bugRichard Moe Gustavsen1-0/+33
Some of the calculations in SplitView assumed that if item with index i was hidden, then so was handle at index i as well. This is not correct. The reason is that a the handle at i belongs to either item i or item i+1, depending on where the fillWidth item is. And this caused a bug when hiding the item to the right of the fillWidth item. Conflicts: tests/auto/controls/data/tst_splitview.qml Change-Id: I59967813f264a856181c57e32c4820d09d7eb363 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2013-09-18Merge branch 'stable' into devGabriel de Dietrich2-0/+32
Conflicts: src/controls/qquickaction.cpp Change-Id: I85255ba5c27c0d8ea023d0867e5963d43f8f1ddb
2013-09-17Make ComboBox editableJens Bache-Wiig5-0/+475
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>
2013-09-17Add TableViewColumn::movableJ-P Nurmi2-1/+2
Change-Id: Ibf1b68d4c63ca02c603d5203128bb94984a809f2 Reviewed-by: Caroline Chao <caroline.chao@digia.com>
2013-09-17Don't emit onValueChanged during construction of SpinBox.Mitch Curtis1-0/+22
Task-number: QTBUG-33504 Change-Id: I9860be6524ec82274f7d256d65aaef3f7657a09b Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2013-09-10Fix incorrect spinbox validation at startupJens Bache-Wiig1-0/+10
The problem was that the validator was applied during the object creation which means the incorrect decimal values were applied and the initial value was incorrectly changed. Task-number: QTBUG-33309 Change-Id: Ic1ace174b9059b9c6ce24fd88b81c5edd7318e80 Reviewed-by: Caroline Chao <caroline.chao@digia.com> Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2013-09-10Prepare for QtQuick.Layouts 1.1J-P Nurmi1-1/+1
Change-Id: Idf6a9a51389d4f979d19d5232a93754fd468cd41 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2013-09-10Update imports to 1.1 and remove version from qmlmodule definitionJens Bache-Wiig65-190/+190
Change-Id: Icb4c6d78225c072da787e4646a55d8cf71a5db7a Reviewed-by: Caroline Chao <caroline.chao@digia.com>
2013-09-09BusyIndicatorJens Bache-Wiig4-0/+68
A basic BusyIndicator to indicate activity while blocking the UI. Change-Id: Iec88b6a4c7f23b630ebdf445c4cb288684c24cb7 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2013-09-03TabView: fix dynamic tab handlingJ-P Nurmi1-0/+22
Task-number: QTBUG-33162 Change-Id: I873b37bd157230f80237fd40f3e5149fbd0207ca Reviewed-by: Volker Krause <volker.krause@kdab.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2013-08-27Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn1-0/+24
Change-Id: I3b9f25a2eeef14d1e509f3f3edc4118addf73bc9
2013-08-27Fix scroll bar behavior when clickToPosition is enabledJens Bache-Wiig1-0/+24
There were two issues with the scrollbar when using this behavior: Issue 1 - The scroll bar did not account for the grooveRect position, so the handle was not centered correctly around the mouse cursor. Issue 2 - When click-and-holding outside the handle area, you could not continue to move the handle afterwards. Task-number: QTBUG-33133 Change-Id: I251f684f767ce5a372eb0d2b5e6c421f88ac7fbe Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>