aboutsummaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* ApplicationWindow: introduce attached propertiesJ-P Nurmi2015-11-163-1/+280
| | | | | | | | The attached properties provide convenient direct access to an application window and its building blocks. Change-Id: I2d96842d80faec47c875156202c1e33a2af96ad3 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Add highlighted buttons to testbenchMitch Curtis2015-11-161-0/+9
| | | | | Change-Id: I0cb200864304f91413f0e47b786d930b2efaac94 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Introducing Panel typeGabriel de Dietrich2015-11-1416-0/+1761
| | | | | | | | | | | | | | | | | | | | This is the base type to implement all sorts of Popups and Dialogs. Its main role is to keep the panel contents stacked on top of the application window contents and to ensure mouse and key events are forwarded or blocked depending on the visible panels modality. Currently, it only works with ApplicationWindow, which holds a QQuickOverlay. This special item is where the Panel contents gets reparented when the Panel becomes visible. It's also responsible for filtering the mouse events. Future developements may include adding a 'level' property instead of relying on the item's z value. This may or may not result into having several overlays per window. Change-Id: I18a4b8905e4d5a4a4697642b0553a1f9e86b669f Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com> Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Button: add highlighted propertyMitch Curtis2015-11-131-0/+9
| | | | | | | | Since our focus is on embedded, this will be used as an alternative to the "isDefault" property that exists in Qt Quick Controls. Change-Id: I9b6612e3c3b30040295aeea6d217e90a17af4ebe Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Apply all styles' theme switchesMitch Curtis2015-11-131-2/+2
| | | | | | | | So that it's no longer necessary to make changes to the testbench to test a different style. Change-Id: I1eefa5f681e3852baa93e8a240af722edf8a45c2 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Scale testbench automaticallyMitch Curtis2015-11-131-1/+3
| | | | | Change-Id: Ie362fa22b3280733783e7ec2293a98e737717257 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Add tst_stylesJ-P Nurmi2015-11-123-0/+79
| | | | | | | Re-runs tst_controls with all styles Change-Id: I1feda621bfd5f48f42742b1f297abd11c6b437a9 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* tst_dial: remove style specific handle coordinate testsJ-P Nurmi2015-11-121-2/+0
| | | | | Change-Id: I8d389728e6bb46da38588163ab59bac6291db8a5 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Add Universal styleJ-P Nurmi2015-11-127-3/+311
| | | | | | | https://dev.windows.com/design Change-Id: I1d8c633ae246724649a6ed71b300a56ba9572405 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Add Material styleMitch Curtis2015-11-122-0/+31
| | | | | Change-Id: I93662a53b42858a5b65154c5ede334182e738dde Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Refactor press and hold testsJ-P Nurmi2015-11-126-170/+207
| | | | | | | | | | | | | | | | | We can't rely on timers in auto tests. They are not fired accurately under heavy CPU load => random CI failures. This change make the press and hold tests independent of timeouts. The idea in a nutshell: the test creates two control instances, and sends press events to both of them. Both controls run their timers and emit pressAndHold() - unless canceled. The test waits as long as it takes for the second control to emit pressAndHold(). At that point we can reliably assume that the first control would have already emitted the signal, if it was not canceled as appropriate. Change-Id: I96aaf4d204db368171209271a4a0fa2ff15cc323 Task-number: QTBUG-47963 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Cleanup old workarounds from tst_themeJ-P Nurmi2015-11-121-20/+1
| | | | | Change-Id: I87767d7934ec0eecf7342b28a7a158f51393066b Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Update tst_sanity for multiple stylesJ-P Nurmi2015-11-121-3/+3
| | | | | Change-Id: I8e4cf5eb65e6e5f0196704f707c9b9764e36a75b Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* testbench: fix scrollingJ-P Nurmi2015-11-121-3/+6
| | | | | | | | | | | - specify only width for the Flow. let it wrap & freely grow in height - use Flickable content margins instead of anchor margins. Flickable reserves these margins between itself and the internal content item - specify content height for the Flickable so it knows how much content is available for scrolling Change-Id: Iaa52f6ca9c48e6a213ee8e00de04445f806db350 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* tst_applicationwindow: use immediate operation to avoid random crashesJ-P Nurmi2015-11-121-1/+1
| | | | | | | | | | tst_applicationwindow::implicitFill() pushes an item on the stack and the stack gets destructed right away. This seems to be too much for threaded animator jobs... Change-Id: I7b83059424e49d6ae6dbf7ddcafe88550dec03cd Task-number: QTBUG-49338 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* tests: add testbench into manual.proLiang Qi2015-11-121-1/+2
| | | | | Change-Id: Ic3d0c51d10dc5d760d948ccdcb9cbc45c74f3c29 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* testbench: move TabBar to footerMitch Curtis2015-11-121-16/+14
| | | | | | | | This is a more typical use of TabBar, and gives it the room it needs for styles where the text is larger. Change-Id: I302a690dd23a69c4b919ebc9996cfaa641ea1b01 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* tests: fix license headersJ-P Nurmi2015-11-088-8/+8
| | | | | Change-Id: Id3be5a62dec38d610695d71ad792016fabdc922d Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
* Improve testbenchMitch Curtis2015-11-061-283/+295
| | | | | | | | | | - Rearrange items. - Replace more usages of Rectangle with Frame. - Add SpinBox. - Add indeterminate ProgressBar. Change-Id: I38f15fdfbbf35c8d2c87e629e4e0ccaa4ae0b5fd Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Repurpose ExclusiveGroup to ButtonGroupMitch Curtis2015-11-063-339/+352
| | | | | | | | | | This is another way of solving the naming clash with Qt Quick Controls, and narrows our focus to the types of controls that actually make sense to have in an "exclusive" group; buttons (Android calls them "selection controls"). Change-Id: Icf6efe583fe784c3594de8635be84bbf757a55cd Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* tst_objectcount: use componentsJ-P Nurmi2015-11-052-131/+91
| | | | | | | This makes it easier to add different styles to the test. Change-Id: Icd23c809ab9999840b5555f7fb658f38c8b7c15e Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Implement TabBar without ExclusiveGroupJ-P Nurmi2015-11-041-0/+7
| | | | | | | | | Make use of auto-exclusivity introduced in a108298. Fixes also the issue that the TabButton that corresponded currentIndex was not checked at startup. Change-Id: I44152e62c2dff30e8e0255c9403dcf46c4ea2f3a Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Expose AbstractButton.Mitch Curtis2015-11-041-0/+70
| | | | | | | | It will be used as the type that ButtonGroup (will be renamed from ExclusiveGroup) manages. Change-Id: Iedcf81a33ac8e7acad3e119159791995bc2ce2eb Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* tst_creationtime: use componentsJ-P Nurmi2015-11-041-17/+9
| | | | | | | This makes it easier to add different styles to the test. Change-Id: I6be66d09d58317d454fbf219cdbbb43c6000d3cd Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
* Fix QQuickAbstractButtonPrivate::findExclusiveButtons()J-P Nurmi2015-11-041-0/+79
| | | | | | | | | Looks like we can't rely on QObject::findChildren(), because Repeater and item views (object model) don't set the QObject parent. So iterate QQuickItem::childItems() instead. Change-Id: I69e0b4f7f23c1587c887921bd255dd87be3abc54 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Speed up Tumbler's auto testsMitch Curtis2015-11-031-26/+7
| | | | | | | | | - Removed some delays where possible. - Removed a test that wasn't exactly necessary. Change-Id: I4a072b8aa948683bbebf9a6bc7c4457d8028eab3 Task-number: QTBUG-48719 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Add AbstractButton::autoExclusiveJ-P Nurmi2015-11-031-0/+68
| | | | | | | | | | | | | | This feature is adopted from QtWidgets' QAbstractButton. It's no longer necessary to create an ExclusiveGroup to manage a simple list of radio buttons: Column { RadioButton { text: "Option 1" } RadioButton { text: "Option 2" } } Change-Id: Ib4cb718c3b3034c9c956b2f23db4b06b00547b8e Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Add AbstractButton::autoRepeatJ-P Nurmi2015-11-021-0/+58
| | | | | Change-Id: Idbb94bac9ccdfae730f6e4da6d63c664971f41a3 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Fix StackView::busy and child event filteringJ-P Nurmi2015-11-021-0/+154
| | | | | | | | | | | 1) renamed busy() to isBusy() to follow the Qt convention :) 2) fixed spurious busyChanged() emissions (it was always emitted on push/replace/pop even when the state didn't change (null transitions) 3) with null transitions, the child event filter was never turned off and therefore StackView "froze" after the first push/replace/pop Change-Id: I07fffa73db5a182865c7b2779641e1f95ed8b30b Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Improve the hit testing of an interactive PageIndicatorJ-P Nurmi2015-11-021-0/+18
| | | | | | | | The Universal style has relatively large spacing between the dots. The small dots are hard to hit => select the nearest dot. Change-Id: I2207e887706be38c1a6091bd8aca13d26b9957a8 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Move the code snippets to a more logical placeJ-P Nurmi2015-10-30107-1198/+4
| | | | | | | | | | They are part of the documentation, but just auto-tested to ensure that they are actually creatable and don't throw warnings. Therefore the logical place is in the doc/snippets folder instead of somewhere in the tests/ tree. Change-Id: Id79a19890f7457ef277e7434a3fc6b6fb20eaa25 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Update testbenchMitch Curtis2015-10-307-402/+370
| | | | | | | | | Move some things around. Also, begin to set all themes in main.qml. There will be at least two unused themes instantiated, but it doesn't matter, as it's just a manual test. Change-Id: Icd8b24d3db3068e05b35de5ce55b4d418a530e5e Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Simplify TextField & TextArea placeholderJ-P Nurmi2015-10-304-18/+18
| | | | | | | | | | Better not expose the extra Text item in the API. Ideally it should be implemented as a scenegraph node. We might even want to promote the placeholderText property (and add placeholderColor) to TextInput and TextEdit in Qt Quick core. Change-Id: I4f443c77d1c696b87a50ee184f868713dd50316f Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
* SpinBox: add validator, textFromValue and valueFromTextJ-P Nurmi2015-10-291-0/+28
| | | | | | | Change-Id: I45e01199453ac5fd64b7f98c165cc12eeb0ce8c3 Task-number: QTBUG-48989 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com> Reviewed-by: Nikita Krupenko <krnekit@gmail.com>
* tst_control: use pure templates for font testsJ-P Nurmi2015-10-291-6/+6
| | | | | | | The Universal style uses 15px font size by default. Change-Id: Iac60b0c61d085b7fceeefcd69bf4537f3e43c468 Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
* Make testbench work with all stylesMitch Curtis2015-10-276-360/+403
| | | | | | | Take advantage of file selectors to display different styles. Change-Id: I2722fdbeedd343682622a9eb5084f65f11dee371 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* TabBar: fix the default layouting of dynamically added tabsJ-P Nurmi2015-10-271-0/+15
| | | | | | | | | | countChanged() used to be connected to updateLayout(), but this went missing somewhere around 73f931a7. Now we have the itemAdded() and itemRemoved() hooks that allow us to do the same more efficiently. Change-Id: I8a3eefb61555358d63fae63d066851038e332233 Task-number: QTBUG-48993 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Control: fix available sizeJ-P Nurmi2015-10-271-1/+47
| | | | | | | | | | | First of all, don't allow negative available size, because it doesn't make much sense. Secondly, geometryChanged() was comparing new width to old height, so availableHeightChanged() was emitted under wrong conditions. Furthermore, the comparisons should are better done fuzzy to avoid unnecessary change notifiers. Change-Id: Ic2bbc106670882b421f79db82d4b47d846e1c4e0 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* .qmake.conf: set QQC2_SOURCE_TREEJ-P Nurmi2015-10-242-2/+2
| | | | | | | A tad nicer way to pass the correct path for tests. Change-Id: I0415d64737bbaa6de163e855080ed3a147f547d5 Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
* StackView: add dedicated replace transitionsJ-P Nurmi2015-10-231-0/+15
| | | | | | Change-Id: I614d11bb566c96166ebf8bc0d2f5d4286d823a5f Reviewed-by: Kai Uwe Broulik <kde@privat.broulik.de> Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Re-introduce SpinBoxJ-P Nurmi2015-10-2211-3/+409
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It came up in discussions at the QtWS that even if we have Tumbler, people still want and expect to have the good old SpinBox control. SpinBox has it pros, such as that it might work better inside a vertical Flickable, and that in multi-field forms it might visually align better with other controls like TextFields. An early mockup of SpinBox was removed in 1c0edf0. A quote from the commit message: SpinBox is a desktop centric control. It won't be provided in Qt Quick Controls 2.0, but maybe later when desktop support is re-considered. Qt Quick Controls 2.0 will focus on embedded and mobile. SpinBox is still available in 1.x. While it is true that SpinBox might not be optimal for touch or mobile, the real reason for the removal was that validating decimal number input is very complicated. Even though locales have well- defined thousand separators and decimal points, users have very different expectations on how strict or relaxed the input validation should be. This change re-introduces a touch-optimized integer-based SpinBox. What makes it more touch friendly than the earlier version is that it has now auto-repeating buttons. Limiting it to integers avoids the decimal number input validation problem. We can introduce a separate DoubleSpinBox later if necessary - just like in QtWidgets. Change-Id: I2819060eb5d1ae6a8c00b0f12be703456085079d Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Flat style: fix inheritance for re-parented itemsJ-P Nurmi2015-10-221-0/+18
| | | | | Change-Id: I33e77f93477b20a4f7af4f10fa8dde95fad1863a Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Add ExclusiveGroup::isCheckable(QtObject)J-P Nurmi2015-10-221-0/+18
| | | | | Change-Id: Id426592985e38f918b1a0df8ef2acc1c3f69c3c7 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* QQuickControl: dynamically create a11y attached objectLiang Qi2015-10-215-33/+10
| | | | | | | Using QAccessible::ActivationObserver approach. Change-Id: Ib99c1f9b7b0c37a3e8a4747db265c9df77acc1f8 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Add testbench as a manual testMitch Curtis2015-10-215-0/+501
| | | | | | | | This allows us to see every state for each control, and will help with collaboration with designers. Change-Id: I5589b05ef3abf768d26f14bbd85aa674107d956b Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* TextArea & TextField: fix placeholder alignmentJ-P Nurmi2015-10-202-0/+28
| | | | | | | | Placeholder text should follow the alignment of the control itself, so that text input appears in the same place where a placeholder was. Change-Id: I1dfa6c2aece10eb92e62a14f347c7e1ec5e610ea Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
* Docs: Input groupJ-P Nurmi2015-10-196-0/+36
| | | | | Change-Id: Iba6e3503d20e1f141c5dd81a2eeab6176e809914 Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
* Docs: Containers groupJ-P Nurmi2015-10-193-0/+47
| | | | | Change-Id: I5eb80f21edb50413b33a96b934466964e56462aa Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Docs: Navigation groupJ-P Nurmi2015-10-192-0/+53
| | | | | Change-Id: Id866d226fc651a39fffd887600b4bf54d2b7ac6e Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Docs: include ScrollBar in indicators & add a screenshotJ-P Nurmi2015-10-191-0/+26
| | | | | Change-Id: I1ff8df098a358d39020a63aa8f1d920f620f838e Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>