summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Fix StackView focus handlingJ-P Nurmi2014-11-282-1/+27
| | | | | | | | | | Make StackView a FocusScope so inner focus changes don't have undesired side effects in other parts of the application. Task-number: QTBUG-42506 Change-Id: I0d901083196cf90f236a24e1dcd2e91bd9f320db Reviewed-by: Mitch Curtis <mitch.curtis@digia.com> Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com>
* Fix Spinbox missing value change if minimumValue is setFilippo Cucchetto2014-11-251-1/+4
| | | | | | | | | The Spinbox validator considered invalid an intermediate value preventing the user for inserting a valid value. Task-number: QTBUG-42342 Change-Id: I24d2f9f7d6fb9d5d4f96f81821b37a30421665a3 Reviewed-by: Filippo Cucchetto <filippocucchetto@gmail.com> Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* tst_spinbox: destroy dyn. created spinbox before leaving testRichard Moe Gustavsen2014-11-201-0/+1
| | | | | Change-Id: Ifceb9c69e94d3c4fd31169785fb6a5b8c8694561 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Slider: don't clamp to the initial press pointJ-P Nurmi2014-11-071-0/+25
| | | | | Change-Id: I5115bbab670f534dae44eb19c2208aff21293889 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* Workshop manual test (the former Gallery example)J-P Nurmi2014-11-0431-0/+1128
| | | | | | Change-Id: Ib62be83b1652777e7603a262a8a89c132d3766e7 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com> Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com>
* Share QtQuickControlsTestApp used by auto tests also for manual testsJ-P Nurmi2014-11-042-14/+56
| | | | | | Change-Id: I5853c6c4c315aebdc378af1f3c0e6d34a2b19115 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com> Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com>
* Slider: Hover only on the handleGabriel de Dietrich2014-10-311-0/+4
| | | | | | | | | | Most styles rely on the handle being hovered, not the whole slider. [ChangeLog][Slider] The hovered property is set only when the handle is hovered, not anymore on the groove Change-Id: I749b076c98fba8e344218e46637ec00d24c0250c Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Revert "qquickrangemodel: don't emit signals before component is completed"J-P Nurmi2014-10-302-0/+86
| | | | | | | | | | | This reverts commit 774f2aa14e8742d77bb92968b06fab4dc35d79b4 that broke sliders (auto test for RangeModel included to prevent that from happening again) in the Qt Quick Enterprise Controls gallery. Some sliders with a hard-coded range [0..360] and value 240 ended up having a value of 0 at Component.onCompleted. Change-Id: Ib3024c51c0552ac06528ba47b08e1a33a5f48324 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* Dialogs: FileDialog can only be modal on WindowsShawn Rutledge2014-10-301-0/+4
| | | | | | | The autotest has been failing on Windows because of this. Change-Id: I6ec42a256455d7a71a522fa7e75dc44f93b741ea Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Make the cursor and selection handle delegates private for nowJ-P Nurmi2014-10-301-8/+8
| | | | | | | | | | | | | | | | | | The API is not ideal, we don't want to lock this thing down like as it is now. All styles implemented so far created CursorHandleStyle.qml and SelectionHandleStyle.qml so perhaps that's the better way to go. Furthermore, there's never going to be multiple occurrences of the handle pairs, so it should be one shared instance. Thus, the relevant style delegates probably shouldn't be sprinkled around various control styles... So, for now, the most pragmatic solution is to make the handles and cursors internal since we don't have time to revamp it before 5.4.0. Change-Id: Ib9fcc4a431bb510c8c55a760159f4d6a631554b3 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* testbench: Fix propertyMap type, move update out of loopGabriel de Dietrich2014-10-291-5/+5
| | | | | | Change-Id: If109280bca207d0d5d7bd43964f5aaec9df553d3 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com> Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com>
* BasicButton: handle mnemonicsJ-P Nurmi2014-10-162-0/+28
| | | | | Change-Id: Ie5cb9d5e4d5d48aedf211f4dff1f6a44cc1c9571 Reviewed-by: Liang Qi <liang.qi@digia.com>
* AbstractCheckable: handle mnemonicJ-P Nurmi2014-10-162-0/+12
| | | | | | Change-Id: I402d674cb5a88fb0bc7bd41062c97703bc8aefbc Reviewed-by: Liang Qi <liang.qi@digia.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* TableView: correct event.accepted in key handlersLiang Qi2014-10-092-0/+124
| | | | | | | | Autotest is included. Task-number: QTBUG-41444 Change-Id: Ia3120b62a58361fbb13cd06e9c17b0e511cecace Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Controls: Fixed support for Keys attached property on TableViewLiang Qi2014-10-082-0/+91
| | | | | | | | | | | | | | | By forwarding key events from the internal control. The key events from internal are Keys.forwardTo TableView, then user could customize their own behavior. Autotest are included. [ChangeLog][TableView] Fixed support for Keys attached property, by forwarding key events from the internal control. Change-Id: Ic59273ae2589bf6d1a0ccf5babf8fd1741376e6c Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* ApplicationWindow: top level items must get focus when they ask for it.Mitch Curtis2014-10-022-0/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, the following Item will not receive any key events: import QtQuick 2.2 import QtQuick.Controls 1.2 ApplicationWindow { visible: true width: 200 height: 200 Item { focus: true anchors.fill: parent Keys.onLeftPressed: textItem.text = "Left" Keys.onRightPressed: textItem.text = "Right" Keys.onPressed: { if (event.key === Qt.Key_Home) { textItem.text = "Home"; } else if (event.key === Qt.Key_End) { textItem.text = "End"; } } Text { id: textItem anchors.centerIn: parent } } } Using Window instead of ApplicationWindow does, however. ApplicationWindow can behave the same if we ensure that the panel has focus set to true. When the panel has focus, the contentItem can receive focus. [ChangeLog][ApplicationWindow] Top level items now receive focus when their focus property is set to true, in the same way that top level items of Window do. Change-Id: I16ef1632fc6df1989015e62e8683b6cd7c5be8a6 Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Liang Qi <liang.qi@digia.com>
* import tst_dialogs from qtdeclarativeJ-P Nurmi2014-09-224-1/+245
| | | | | Change-Id: I3e3ee93de9f89aa2b674ac91f92aae93e3756167 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* SpinBox: intermediate values outside the range are invalid.Mitch Curtis2014-09-191-0/+9
| | | | | | | | | | | | When the maximumValue is 100 and the user enters 200, the input will be considered "Intermediate" by QQuickSpinBoxValidator and the value set to 20 when the input is confirmed. This is not how QSpinBox behaves; it prevents any more digits from being entered after the second one. Change-Id: I72490894d0073babda6ed00a0ba081a7ee686fe7 Task-number: QTBUG-40567 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Merge "Merge remote-tracking branch 'origin/5.3' into 5.4" into refs/staging/5.4Frederik Gladhorn2014-09-181-0/+29
|\
| * Merge remote-tracking branch 'origin/5.3' into 5.4Frederik Gladhorn2014-09-161-0/+29
| |\ | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/controls/Styles/Base/ComboBoxStyle.qml Change-Id: Iaf45bc77be0bd80d21af49a5663dc9fba3caa0da
| | * TableView: fix tab navigationJ-P Nurmi2014-09-101-0/+24
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-41202 Change-Id: I13c420dd1443c152053ac331da7bfe5a9fbc9603 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
| | * tst_tableview: cleanup test items to avoid side effects in later testsJ-P Nurmi2014-09-101-0/+5
| | | | | | | | | | | | | | | Change-Id: I2027a4576529accb623045d4ce63c76af723c5e9 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* | | Remove sleep(4000) from SpinBox auto test.Mitch Curtis2014-09-171-1/+0
|/ / | | | | | | | | | | | | | | This slows down the test significantly, and judging from the lines above and below this one, it wasn't necessary. Change-Id: Iaef85b4940740193fb65e5fa4ce89f576d292bcb Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* | Do not crash when removing children from hidden layoutsJan Arve Saether2014-09-031-0/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem was that the proxy items (QQuickGridLayoutItem) that was added to the layout was not removed when a child item got deleted from a hidden layout. The proxy item therefore ended up having a dangling pointer to the deleted item. The solution is to also update the layout with a new list of items even when the layout is hidden. This will also fix a problem with that size hints was not correct when layouts were hidden. Note that the test included has an expected failure. This is because the case it tests is not very common and the problem is shared with positioners. The problem stems from the fact that a layouts implicit size should change when a child item is changed from implicitly hidden to explicitly hidden. Unfortuntately, QQuickItem does not notify about such changes. This is a problem independent of this crash patch fix, and I would like to address that in a separate commit. Change-Id: I67ac28b9d08208432559622c9cd412e24b197b32 Task-number: QTBUG-39045 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* | Update license headers and add new license filesAntti Kokko2014-08-2516-304/+176
| | | | | | | | | | | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 & LICENSE.GPLv2 - Removed LICENSE.GPL Change-Id: I470909ba0980db33ab551790d619c59a35978590 Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
* | Add scollBarPolicy properties to scrollviewDavid Edmundson2014-07-221-0/+36
| | | | | | | | | | | | | | | | This adds horizontal and vertical scrollbar policies allowing one to pernamently show or hide the scrollbars like in QAbstractScrollArea. Change-Id: I4989dbf2225ab34741b5a2811d7c6ff52880e0c3 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* | Merge remote-tracking branch 'origin/5.3' into devJ-P Nurmi2014-07-194-4/+4
|\ \ | |/ | | | | Change-Id: Icc15fe685e94dd043979b6b9c6a624f18f2d1e4c
| * Centralize determination of "no desktop" configurationsJ-P Nurmi2014-07-184-4/+4
| | | | | | | | | | | | Change-Id: I030012f48668db4f01737ef92fdb7e6e0426e025 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Liang Qi <liang.qi@digia.com>
* | ComboBox: add support for selection handlesJ-P Nurmi2014-07-181-0/+27
| | | | | | | | | | | | Task-number: QTBUG-38934 Change-Id: I0d7bfc821ff345e76d1ae89818f6a5e0120695f5 Reviewed-by: Liang Qi <liang.qi@digia.com>
* | SpinBox: add support for selection handlesJ-P Nurmi2014-07-181-0/+16
| | | | | | | | | | | | Task-number: QTBUG-38934 Change-Id: I8f23d20a24977f1787dcd451b48b22326959e3bc Reviewed-by: Liang Qi <liang.qi@digia.com>
* | Add styleData.hasSelection for text selection handlesJ-P Nurmi2014-07-181-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Text selection handles typically look different based on whether the editor has selection or not (one handle for moving the cursor vs. two handles for selecting text). SpinBox and ComboBox do not have suitable properties for testing whether the control has selection or not, so styleData.hasSelection is introduced to abstract and expose that information. Task-number: QTBUG-38934 Change-Id: I362b5790f5d487e5ba258e42d1b801a5cce76770 Reviewed-by: Liang Qi <liang.qi@digia.com>
* | Fix Calendar::clicked() signal emissionJ-P Nurmi2014-07-161-1/+1
| | | | | | | | | | | | | | Emit only when releasing over the same date than was pressed. Change-Id: I7a8d4d6e3871231ae2589d565a75d9b641b649ac Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* | Add Calendar::pressAndHold(date) signalJ-P Nurmi2014-07-161-0/+40
| | | | | | | | | | | | | | | | [ChangeLog][Calendar] Added pressAndHold(date) signal that is emitted when the user presses and holds a valid date. Change-Id: Ie880a3ed827332d35fabc76cd6a09eebc7685eb7 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* | Introduce TableView::pressAndHold(int row) [signal]J-P Nurmi2014-07-143-0/+18
| | | | | | | | | | | | | | | | [ChangeLog][TableView] Introduced a pressAndHold(int row) signal that is emitted when the user presses and holds a row. Change-Id: I823a7fd534fd6fca78831f00e7ecbb9f2118e006 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* | Merge remote-tracking branch 'origin/5.3' into devJ-P Nurmi2014-07-091-82/+86
|\ \ | |/ | | | | | | | | | | Conflicts: src/controls/ToolBar.qml Change-Id: I5510496219a4ebe8bfced4192307219238ca9bb6
| * Revise unstable and slow GridLayout auto testJ-P Nurmi2014-06-301-82/+86
| | | | | | | | | | | | | | | | - add missing destroy()'s - use tryCompare() instead of waitForRendering() Change-Id: I6dfbb9c55d3cb199d8351b83d67a6ef45890143b Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* | texthandles test: add checkbox for disabling mouse selectionJ-P Nurmi2014-06-301-1/+9
| | | | | | | | | | Change-Id: I2888216918e89e0c0ba41aa3125cb57d76fd7827 Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* | Merge remote-tracking branch 'origin/5.3' into devJ-P Nurmi2014-06-254-4/+4
|\ \ | |/ | | | | | | | | | | | | Conflicts: .qmake.conf src/controls/Styles/Desktop/SpinBoxStyle.qml Change-Id: Ia501c1388a2af9f273ec2742abbfc766717ad9e6
| * Cleanup whitespaceJ-P Nurmi2014-06-244-4/+4
| | | | | | | | | | Change-Id: I9e84ce56e853a18205aa180cef1ee8ff4f2f678c Reviewed-by: Caroline Chao <caroline.chao@digia.com>
| * Remove QtWidgets dependency for WinRTJ-P Nurmi2014-06-244-4/+4
| | | | | | | | | | Change-Id: Ifacceae8690d2ab4dfaed0d5439b9e29804c1943 Reviewed-by: Andrew Knight <andrew.knight@digia.com>
| * Remove Widgets dependency for QNXAndreas Holzammer2014-06-244-4/+4
| | | | | | | | | | | | | | | | | | Changes.txt says that with Qt 5.2.0 dependency for Widgets have been removed for touch based platforms. But QNX is also a touch based platform and its missing. Change-Id: I140842d4501422537175ac5acb07beebe994f0eb Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* | TextField & TextArea: add support for selection handlesJ-P Nurmi2014-06-165-0/+250
| | | | | | | | | | | | | | Task-number: QTBUG-38934 Change-Id: Id581a6e56d3461b0df476c2b35c3e642fd505fc9 Reviewed-by: Caroline Chao <caroline.chao@digia.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* | Merge remote-tracking branch 'origin/5.3' into devJ-P Nurmi2014-06-111-1/+2
|\ \ | |/ | | | | Change-Id: I7ab0f7c218d462515c5aaaac3fbe3cd88d5cb5a5
| * CalendarStyle: do not hard code the height of dayOfWeekDelegateJ-P Nurmi2014-06-111-1/+2
| | | | | | | | | | | | Task-number: QTBUG-39482 Change-Id: I7b610a098402f5ec684fc0d7f9b47c4b9981e733 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* | Switch: add pressed-property and clicked() signalJ-P Nurmi2014-06-021-0/+30
| | | | | | | | | | | | | | | | Align with the basic functionality offered by CheckBox, and also required by certain styles. Change-Id: I53f2868f19a26e9abc0ed9c94d327edbe940429b Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* | Fix Slider increments on keypressFrederik Gladhorn2014-05-261-3/+11
| | | | | | | | | | | | | | | | | | Instead of always adding/subtracting 1/10 of the range use the step size when the arrow keys are pressed. In addition add accessible actions to inc/dec the value. Task-number: QTBUG-39099 Change-Id: I4fdf2adc8912ab1fa8838be56af4e798eeb59781 Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devJ-P Nurmi2014-05-146-22/+330
|\ \ | |/ | | | | | | | | | | | | Conflicts: .qmake.conf src/controls/Private/TabBar.qml Change-Id: Id176e44fe8e402c1c2c021ecb63c8c5c75736d47
| * Don't allow navigation to previous/next month when dragging mouse.Mitch Curtis2014-05-131-6/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When dragging the mouse over the calendar and a date from a previous month is hit, it will change the visible month to that month. This becomes worse when dragging the mouse between in the start/end of the calendar, because there are usually several days shown from the previous month, and the calendar quickly goes back several months. [ChangeLog][Calendar] Calendar no longer selects dates in the next/previous month when dragging the mouse. Task-number: QTBUG-38848 Change-Id: I0b9bc727a05397a8e4f1280e16c91e39e160bf4a Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
| * Fix CalendarStyle's layouting and grid cell calculation.Mitch Curtis2014-05-131-13/+74
| | | | | | | | | | | | | | | | | | | | | | | | - Wrap all panel items within a container, so that the frame width checks happen in only one place, and the other items don't need to care about it. - Move the logic involving grid line width into CalendarUtils, so that the style code can be for styling and not maths. Task-number: QTBUG-38847 Change-Id: I99a1f131b9cd608f3f7a7627d51a75780a6cbac2 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
| * Fix the update of TabView.currentIndex when inserting/removing tabsJocelyn Turcotte2014-05-071-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Update currentIndex when adding or inserting tabs. - Make sure that we update the current index before updating the array to avoid a state of currentIndex > count -1 when removing the last tab, where a property binding on TabView.count could try fetching a tab past the array limit through TabView.getTab. - Only decrease currentIndex when removedIndex <= currentIndex to keep the current tab active when possible. Activate the next tab instead of the previous one when the current tab is removed to make it more instinctive to remove multiple tabs successively. - Keep the current behavior of leaving currentIndex to 0 when removing the last tab. Change-Id: I030b86a03ce73f1177b1f04857abbdc2f7ec5835 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>