summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
...
| | | * Ensure that styleData.row is initialized in delegatesJens Bache-Wiig2014-04-151-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While we specifically documented that you should not depend on the value being correct in onCompleted for 5.3, it is not optimal that the initial value is consistently set to 0 and later changed to it's appropriate value. This patch ensures that delegates are not instantiated until after the model model and row values have been fully initialized. Task-number: QTBUG-38307 Change-Id: Ib3300539a0283c997ab8b808fb229d3f22ed6324 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
| * | | Test that attached Keys behavior is identical to TextInput/AreaJ-P Nurmi2014-04-242-1/+169
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | Such composite controls that consist of a TextInput or TextArea should offer identical behavior for the Keys attached property on the control itself as it would behave if it was used on the internal editor. Task-number: QTBUG-38289 Change-Id: I4e6d77d2cc1f3c7202418b9aa21d1f40ddd0eb96 Reviewed-by: Liang Qi <liang.qi@digia.com>
* | | Add ability to dynamically add items to SplitViewChristian Manning2014-05-121-0/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Factor out the loop body of init() into a pushItem() function to make the ability user-accessible. Can only append items due to the list property limitation. Takes account of item's fill property Task-number: QTBUG-35281 Change-Id: Ibb2a5e3cf945bede544cf6bf8eebe13ffd2f79e5 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* | | Merge branch 'origin/stable' into devJ-P Nurmi2014-05-121-4/+7
|\| | | | | | | | | | | | | | | | | | | | | | | 70bd266 resolves the current tst_controls failure which is blocking qtdeclarative#dev integration. We cannot merge the latest origin/stable yet, because that depends on the next qtdeclarative stable->dev merge. Change-Id: I170aec576a06bc79e2df9564e8cf77a0044bd3aa
| * | Fix manual keynavigation testBerthold Krevert2014-04-151-4/+7
| |/ | | | | | | | | | | | | | | Update the manual keynavigation test to QtQuick.Controls 1.2 and use other background colors to better highlight the focus rectangle Change-Id: I4022918cf1dc00e853dadd89a8682680063d2402 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-04-1186-344/+344
|\| | | | | | | | | | | | | Conflicts: src/controls/ApplicationWindow.qml Change-Id: I2ab8efb4e04006724410da0f6ed03bd2672c5eb6
| * Bump QtQuick.Controls import version to 1.2J-P Nurmi2014-04-0780-227/+227
| | | | | | | | | | Change-Id: Idc0b93cbfc2fe23e8be3bcaece672d06555a81f6 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
| * Import QtQuick 2.2J-P Nurmi2014-04-0779-160/+160
| | | | | | | | | | Change-Id: Ifc9719ec6fbbd80b866c01eebc471d0ed121bd16 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* | Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Shawn Rutledge2014-03-259-17/+277
|\| | | | | | | refs/staging/dev
| * 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>
| * Fix some typosSergio Ahumada2014-03-031-1/+1
| | | | | | | | | | Change-Id: Ic2e2060b57b0d74e96d6aad0ceff4679d986a26c 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>
| * Add Calendar to testbench.Mitch Curtis2014-02-262-3/+20
| | | | | | | | | | | | Change-Id: Id8c636c768afd9eecba5517c66371dde179fd998 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com> 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>
* | Fix shaders for OpenGL core profilesLaszlo Agocs2014-03-241-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Add also a --coreprofile command-line parameter to the gallery and systemdialogs examples to allow testing Quick Controls with an OpenGL 3.2+ core profile. This depends on the new features introduced to qtdeclarative in I75a47182 and I41b513e9. Change-Id: I408263a108a71df221943915849a4c3e18e0d3e4 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* | Fix tst_applicationwindow::test_minimumHeight()J-P Nurmi2014-03-041-1/+2
|/ | | | | | | | | | QQuickWindow::contentItem is now resized in resizeEvent() so the window must be visible if a test relies on content item's size. Change-Id: If354306d80bd2fcf47114d726fa5987c60399b2e Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com> Reviewed-by: Jan Arve Sæther <jan-arve.saether@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 "Merge remote-tracking branch 'origin/stable' into dev" into ↵Caroline Chao2014-01-223-6/+89
|\ \ | | | | | | | | | refs/staging/dev
| * | 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>
* | | Set currentIndex of combobox to match defaultAlignmentJan Arve Saether2014-01-171-0/+9
|/ / | | | | | | | | Change-Id: Ie7ceaa9ddf66e3657c38773a242a7f88855b4f4a Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* | Expose PopupWindow type privatelyGabriel de Dietrich2014-01-171-0/+94
| | | | | | | | | | | | | | | | | | | | | | Still needs some API refinement. Includes manual test for key event handling. It did not work as expected on Mac, hence this test. Patch pending in integration in qtdeclarative. Change-Id: Id88f5f84d2534cf9b9d93f9224207e661894189d Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* | Expose contentArea as contentItem in ApplicationWindowJan Arve Saether2014-01-142-0/+259
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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