summaryrefslogtreecommitdiff
path: root/tests/auto
Commit message (Collapse)AuthorAgeFilesLines
* Try to maintain bindings to checked property in CheckBoxJens Bache-Wiig2014-03-201-0/+39
| | | | | | | | | | | | | | | | It is currently impossible to keep a binding to the checked property because any external manipulation of checked will cause it to be internally overwritten based on the implicitly triggered checkedStateChanged signal. This adds a protection mechanism similar to what we already have on the checkedStateChanged signal. [ChangeLog][QtQuickControls][CheckBox]Fixed a problem incorrectly causing bindings to the checked state to break. Task-number: QTBUG-31627 Change-Id: I506fa34561529a414c7b088001f96e8f283edd89 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com> Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Let ApplicationWindows default max size be unbounded.Jan Arve Saether2014-03-191-3/+32
| | | | | | | | | | | | | | | | | | | | | | | | Previously, the ApplicationWindow determined its maximum size from its content items maximum size. This was inconsistent with how QWidgets normally behaved. The default max size of an ApplicationWindow is now therefore unbounded. If the application want the ApplicationWindow to have a maximum width or height, the application must set up the binding manually. This can be done with a fixed maximum size or it can be bound to a layout: contentItem.maximumHeight: grid.Layout.maximumHeight contentItem.maximumWidth: grid.Layout.maximumWidth If the grid layout has anchors.margins, those need to be taken into consideration too, resulting in the following binding: contentItem.maximumHeight: grid.Layout.maximumHeight + grid.anchors.topMargin + grid.anchors.bottomMargin Change-Id: Ibac80ba71f12e3eb9e5db8f875ecfa64b1e28b0d Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Do not reduce items size when snapping to pixel grid.Jan Arve Saether2014-03-191-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Due to the required snapping to pixel grid, there was a high risk of reducing the size of an item to become smaller than its minimum size. With the original way of snapping (simply doing qRound) it didn't happen very often, but with the last change the problem became more evident: If an item that covered the full extent of a cell was snapped it would *always* shrink. Sometimes it could then shrink to become smaller than its minimum size. This was easy to see if the item snapped was a Text element with eliding enabled, since that meant that the text was elided as soon as the Text element got resized to smaller than its minimum. The current solution now is to always snap the x,y coordinates (with qCeil), but keep the width and height that was calculated by the layout. This means that snapped items will be shifted slightly to the right. Due to this they might extend almost a pixel outside their calculated cell (on the right or bottom sides). Due to this we also have to adjust the size hint result calculation so that it will also ceil up to the nearest integer. The only downside now is that row/column spacings might be less than specified, but they should not reduce by more than 1 pixel. Task-number: QTBUG-36235 Change-Id: Idca909f2102a1f7c5cb50d2490c7af39d722ff4f Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Styling improvements for CalendarJens Bache-Wiig2014-03-121-3/+3
| | | | | | | | | Also - added the property Calendar::frameVisible. - moved the gridVisible property to CalendarStyle Change-Id: I57da65af130098ac5d0b858c9f964e52e3ba6922 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* Avoid warning when maximum size < minimum sizeJan Arve Saether2014-03-031-0/+38
| | | | | | | | | | | | | | | | | | | | | | | This only happens in intermediate states, where both *minimumHeight* and *maximumHeight* is supposed to be updated. However, since the order of the bindings is not know, we might have intermediate states where minimumHeight > maximumHeight. In our case minimumHeight was set first to a smaller size than maximumHeight, this would trigger the height binding, causing it to try to set its geometry while its minimumHeight and maximumHeight properties were not in sync. This also happened when maximumWidth < minimumWidth. The output was something like this: qwindowswindow.cpp(1306):QWindowsWindow::setGeometry: Attempt to set a size (116x190) violating the constraints(0x200 - 16777215x190) on window ApplicationWindow_QMLTYPE_12_QML_51/'' Change-Id: Ia4f6e340b608bb4cff5a35bc887adc4eea7efbad Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Revise tst_applicationwindowJ-P Nurmi2014-02-261-3/+4
| | | | | | | | | | Use more reliable/applicable waitForRendering(item) instead of wait(0) and make the window visible before testing content item geometry. Task-number: QTBUG-36938 Change-Id: I414749019d1fca01c09ab3361c0355d231b2bcb3 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com> Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* TableView: fix activeFocusOnTab behaviorLiang Qi2014-02-252-0/+135
| | | | | | | | | | Autotest is included. Task-number: QTBUG-36950 Change-Id: I94c5b5225437ce87365740ea7423b09737dd275a Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com> Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* Respect Tab::enabledJ-P Nurmi2014-02-211-0/+15
| | | | | | | | | [ChangeLog][QtQuickControls][TabView] Added support for enabling and disabling tabs. Task-number: QTBUG-36356 Change-Id: I97abc8008d479ce6b7a661e5a986c721a4482773 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Frederik Gladhorn2014-02-171-0/+36
|\ | | | | | | refs/staging/dev
| * Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-02-121-0/+36
| |\ | | | | | | | | | | | | | | | | | | Conflicts: src/layouts/qquicklinearlayout.cpp Change-Id: Ib24dab43c37fc0f3f6a85398766f102a1ac833c3
| | * Allow size hint changes during a rearrange.Jan Arve Saether2014-01-281-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>
* | | Use childAt() instead of cellIndexAt().Mitch Curtis2014-02-151-16/+0
| | | | | | | | | | | | | | | Change-Id: I74ee716620d31363bccaade89d51aa23d3b39830 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* | | Don't ignore horizontal alignment for items with baseline alignmentsJan Arve Saether2014-02-141-1/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | Horizontal alignment were ignored when an item had baseline alignment specified. Change-Id: Ide06e6929a223fa24c3644954fe134756d02f748 Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | | Add Calendar to Qt Quick Controls.Mitch Curtis2014-02-143-0/+978
|/ / | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-29948 [ChangeLog][QtQuickControls] Calendar was added. Calendar allows selection of dates from a grid of days, similar to QCalendarWidget. Change-Id: I279130e704bc0dfd8dfe114ec9b6b49e111faf96 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-01-278-0/+377
|\ \ | |/ | | | | Change-Id: I974d73fda7e0eb4ea99b354a054452f057327644
| * Controls: Fixed support for Keys attached property on controls allowing text ↵Liang Qi2014-01-228-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>
* | Make sure that items don't exceed the layout-computed boundaryJan Arve Saether2014-01-271-0/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When geometries were rounded to their nearest pixel grid geometry they sometimes exceeded the area the layout calculated them to cover. This could often be observed by that the visual spacing got shrunk to a smaller size than was specified. For small spacings values the visual spacing could even disappear. With this fix the visual spacing should never be smaller than the specified spacings value (but might be bigger due to rounding). Task-number: QTBUG-36235 Change-Id: I5142c793460e50fd2de397abfd2ea6730f1bd042 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* | Make sure that layout is invalidated if LayoutMirroring is changed.Jan Arve Saether2014-01-231-0/+12
| | | | | | | | | | | | | | | | | | The old autotest never tested to see if the layout got rearranged if _only_ LayoutMirroring got changed. (It was always tested together with layoutDirection changes). Change-Id: Ie541ccb101884b8d47770f32b4312bccd2329d47 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* | Add missing tests for layoutDirection and mirroringJan Arve Saether2014-01-231-0/+2
| | | | | | | | | | Change-Id: I8eaff4ba2a2a42c5ba01be9a96884ed851c6ee3a Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* | TableView: added resizeToContents and resizeColumnsToContentsShawn Rutledge2014-01-222-0/+74
| | | | | | | | | | | | | | | | | | | | | | | | These are analogous to QTableView::resizeColumnToContents(i) and resizeColumnsToContents(). Double-clicking the header near a width adjustment boundary still provides a means for the user to do this if the application doesn't do it programmatically. Change-Id: Ibded0c9f255301b461dac7080901fc6065fdbe5e Reviewed-by: Caroline Chao <caroline.chao@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-01-173-6/+89
|\ \ | |/ | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/controls/Styles/Base/ComboBoxStyle.qml src/controls/Styles/Desktop/ComboBoxStyle.qml src/layouts/qgridlayoutengine.cpp Change-Id: I14298b9b3521fe220248e4b27e7057d538af5c49
| * Support negative layout spacings (do not assert)Jan Arve Saether2014-01-161-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>
| * tests: update activeFocusOnTab to support editable ComboBoxLiang Qi2014-01-142-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>
* | Expose contentArea as contentItem in ApplicationWindowJan Arve Saether2014-01-141-0/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will intentionally shadow the QQuickWindow::contentItem This enables users of ApplicationWindow to correctly set the {min,max}imumHeight for the contents of the ApplicationWindow (excluding menubar, toolbar and statusbar). With this information at hand, the ApplicationWindow can easily deduct the correct total size of its {min,max}imumHeight *including* the menubar, toolbar and statusbar. Previously, it was for instance not possible to set an exact minimumHeight because it didn't take the toolbar, statusbar or menubar into consideration One small disadvantage is that the contentItem.minimumWidth cannot be autocompleted. qmlplugindump does not inspect the members of ContentItem. Task-number: QTBUG-32443 Change-Id: I9903e7d4b5e6db7bd7c3c46351a2bb5578f67a57 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-01-102-0/+40
|\ \ | |/ | | | | Change-Id: I2491c91285196583e784033e78757743bfa2a423
| * 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>
| * Do not loop infinitely if a span is larger than the layout extentJan Arve Saether2014-01-071-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>
* | Fix TableView auto testFabian Bumberger2014-01-071-2/+2
| | | | | | | | | | | | | | This is related to a patch in QtQuick. UpdatePolish will not be called for invisible items any more. Change-Id: If9569fb6272f8f492e4676092be01d6681e696be Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-12-231-0/+28
|\ \ | |/ | | | | Change-Id: Ic5df7eed17a305e6ebb7235d30467124269ea751
| * Fixed: Regression in key navigation on TableViewJens Bache-Wiig2013-12-211-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>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-12-161-0/+18
|\ \ | |/ | | | | Change-Id: I1a5f92b0677644b52b86605616938e6dff9a8f65
| * 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>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-12-051-0/+26
|\ \ | |/ | | | | Change-Id: I04b45f6e998fdeff87d237ec49a74f7c53b1d9f2
| * SpinBox: attempt to fixup the input as appropriateJ-P Nurmi2013-12-041-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>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-11-295-7/+283
|\ \ | |/ | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I626baf91e8bb9e9816346fdb842c0d577ca23d77
| * Make TextFieldStyle and SpinBoxStyle respect font sizeJens Bache-Wiig2013-11-262-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>
| * 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>
| * SpinBox: add editingFinished signalLiang Qi2013-11-222-0/+91
| | | | | | | | | | | | | | | | Autotest is included. Task-number: QTBUG-34780 Change-Id: I2da9d57b409c24cbf1d90ce42da9b4071dd6dac8 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
| * TextField: add editingFinished signalLiang Qi2013-11-222-0/+93
| | | | | | | | | | | | | | | | Autotest is included. Task-number: QTBUG-34780 Change-Id: I19e73ca0c988a9d294aca52f9c0eabb9274f40d7 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
| * SpinBox: get active focus when up or down was pressedLiang Qi2013-11-151-0/+70
| | | | | | | | | | | | | | | | This behavior also needs activeFocusOnPress was true. Task-number: QTBUG-34773 Change-Id: I681c1cb20c1803e3bf7f60af5cdf45ae3fe34dae Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devSergio Ahumada2013-11-088-23/+195
|\ \ | |/ | | | | Change-Id: I678a00ebdf769eaa87d43214c2a32c303d3877ca
| * Fix warning in Tests_TabView::test_mousePressOnTabBarCaroline Chao2013-11-081-1/+1
| | | | | | | | | | | | Task-number: QTBUG-34666 Change-Id: I13506cc7504c71d9411e2b100bec803abb2eaccd Reviewed-by: Liang Qi <liang.qi@digia.com>
| * Tests: Fix warning in activeFocusOnTab testCaroline Chao2013-11-071-0/+0
| | | | | | | | | | | | | | Missing image. Change-Id: I3c52d7d60690346bed4002dee5c6b0844194784f Reviewed-by: Liang Qi <liang.qi@digia.com>
| * Expose ToolBarStyle and StatusBarStyleJens Bache-Wiig2013-10-311-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>
| * More styling improvements for Base StyleJens Bache-Wiig2013-10-311-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>
| * Fix: Button does not toggle on keypressJens Bache-Wiig2013-10-291-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>
| * Adjust height if the ToolBar or StatusBar is dynamically hiddenJan Arve Saether2013-10-251-0/+98
| | | | | | | | | | | | | | Triggered by a manual test I'm working on Change-Id: I8d49a7d19ac7daebda388df8e2d8595607fdd52c 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>
| * Use depends instead of ordered for dependenciesFrederik Gladhorn2013-10-251-1/+1
| | | | | | | | | | Change-Id: Ia24df4e387655106c7b7d31535f00ecb675860b4 Reviewed-by: Robin Burchell <robin+qt@viroteck.net>