aboutsummaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Popup: rename show()/hide() to open()/close()J-P Nurmi2015-12-143-7/+7
| | | | | | | | | QML popups have traditionally used more explicit open() and close(). Renaming them to show() and hide() at this stage doesn't seem to have any real advantages. Change-Id: I1e7c8c4817c67e62cef965525e00f5bf125a7d76 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* tst_activeFocusOnTab: remove unnecessary layouts dependencyJ-P Nurmi2015-12-121-3/+2
| | | | | Change-Id: I6e25c7f391bf02c8e15b078bb0d85de8ec7a2f20 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Add QQuickControl::focusReasonJ-P Nurmi2015-12-121-0/+26
| | | | | | | | | This allows the Universal style ApplicationWindow to visualize key/tab focus with a focus rectangle, but hide the focus rectangle when the focus moves around for other reasons (mouse, active window, popups...) Change-Id: I5c5b43d7c4c051679e34b806ee43cd80180d7ab8 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* testbench: fix TextArea placeholder textJ-P Nurmi2015-12-121-1/+1
| | | | | Change-Id: I36b036e9bb7f5f0dd66ffae205a90f3b11a3ee27 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Pane: don't let presses leak throughJ-P Nurmi2015-12-101-0/+28
| | | | | | | | | | | A regression introduced by 38c47c0. Pane is the base type for Frame, GroupBox, and ToolBar. These type of containers shouldn't let presses through. For example, an application that has a listview scrolled below a toolbar, list items under the toolbar should not react when interacting with the toolbar. Change-Id: I7668452fe2d6d89372f032220fa5623b50d334bb Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Add ApplicationWindow::activeFocusControlJ-P Nurmi2015-12-103-33/+280
| | | | | | | | | This makes it possible for ApplicationWindow to visualize key focus navigation with a single focus rectangle that follows the currently active focus control. Change-Id: Ief92bcdc64891b7baa3503216137665a8badcd17 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Move ApplicationHelper to visualtestutil.h and rename itMitch Curtis2015-12-103-27/+31
| | | | | | | This class is useful for other auto tests, like Popup's. Change-Id: Ie193c07e5b53b67493fceba9a1c32798db2f4e34 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Introduce PaneJ-P Nurmi2015-12-091-0/+116
| | | | | | | | Provides a background color that matches with the application style and theme. Change-Id: I5e7ea4fededaaf46687a2ea0391f43dbf55e3b42 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Rename Panel to PopupJ-P Nurmi2015-12-092-27/+27
| | | | | | | | | Popup is a more descriptive name. Furthermore, this name change opens the door for another type called Pane. It gives the appropriate background color for the current style & theme. Change-Id: Idb91d37e807f62e870b50f0b656e84ee2d43a9fb Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* StackView: fix property initializationJ-P Nurmi2015-12-091-0/+19
| | | | | | | | | | | When pushing a url or component, ensure that properties passed to push() are initialized during the incubation. When pushing an item, the properties are set the same way than before, at stack element initialization phase. Change-Id: I19ca10baae43857e1349486059a3317d68d3b2d4 Reviewed-by: Liang Qi <liang.qi@theqtcompany.com> Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Remove Control::layoutDirectionJ-P Nurmi2015-12-094-52/+46
| | | | | | | | Calculate QQuickControl::isMirrored() from LayoutMirroring.enabled (QQuickItemPrivate::isMirrored()) and QLocale::textDirection(). Change-Id: I0e391d27df732734031f3e94d9828a1a2cfa7474 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Round expected event coordinates in Button's events testMitch Curtis2015-12-091-6/+6
| | | | | | | | The test expects 20.5 but gets 21 when run with a 4K monitor on Ubuntu 15.10. Change-Id: I1a71ee8614dcb86a595fd2832f89e0db617f677e Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Print out actual and expected events in Button's events testMitch Curtis2015-12-091-6/+16
| | | | | | | Qt Quick Test only prints out [object Object], which isn't very useful. Change-Id: I01663ea97abae93a5f27e8328a75fb5b3f93129e Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Fix some issues with GifRecorderMitch Curtis2015-12-093-6/+11
| | | | | | | | | | | | - Try to ensure that the correct region is recorded. Sometimes, on specific machines, I've seen the region being offset by a vertical distance of 24 pixels (the size of the title bar). - Try to ensure that the window has time to render before we start recording with byzanz. Change-Id: Ia4c354ba436ed21af0e83303a98faa616be63325 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Add Control::localeJ-P Nurmi2015-12-071-0/+13
| | | | | | Change-Id: I6c6647de6d286a92b35bca09a45e82cd3343a623 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com> Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
* StackView: fix crash when attempting to transition null itemsJ-P Nurmi2015-12-041-0/+13
| | | | | | | | Don't attempt to kick off view transitions for stack elements that have failed to load. Change-Id: I6e42785a30abc815d14a07e7d16aad5bde66391d Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Add ComboBoxJ-P Nurmi2015-12-043-0/+593
| | | | | Change-Id: I4cfc2367db92786097a1ce66bd4b5a2f71322a2e Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* QQuickApplicationWindow: add font propertyLiang Qi2015-12-032-0/+148
| | | | | Change-Id: I6f946994f789704aa2efa94aaea0129d0d73d005 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Promote Button::highlighted to AbstractButtonJ-P Nurmi2015-12-032-9/+9
| | | | | Change-Id: I0e17a6c25dfd89fdb547720e9a626c2ec9d7765a Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Adapt MenuItem to designsMitch Curtis2015-12-031-0/+3
| | | | | | | Decrease the padding and swap the label/indicator order. Change-Id: I0ee2528d3c3111024fe1a6e52acc0da1a0d30990 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Make Qt::Key_Escape close MenuMitch Curtis2015-12-031-0/+4
| | | | | Change-Id: Ib7d74b556378f7ec5ac3156c92a02d6834bff82e Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Add MenuMitch Curtis2015-12-027-0/+495
| | | | | | | | | An item-based menu derived from QQuickPanel. Eventually we'd like to make Panel itself a QQuickItem, as it makes both the implementation and the actual usage of Menu a lot easier. Change-Id: Ic1bf2a05ab98d9e17824c402ed8326ef65d26c69 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Control: resolve the font a bit earlierLiang Qi2015-12-011-0/+51
| | | | | | | Also applied to QQuickLabel, QQuickTextArea and QQuickTextField. Change-Id: Icf10500905980445809eb2375e8957db2c41e03c Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Fix tst_gifs warnings about mouse events being outside windowMitch Curtis2015-12-013-102/+24
| | | | | | | Also replaces event capturer C++ output with moveSmoothly() calls. Change-Id: Ie1cccf6c85517a187588868a90902b82e01d0775 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* GifRecorder: don't assume QQuickViewMitch Curtis2015-11-3010-231/+250
| | | | | | | | | | | | | This allows us to use windows as root items, which means we can have complete examples - not just a snippet without imports. With this, we can have runnable snippets under each GIF, without the need for the user to add code to get it to run. This change is also necessary to generate GIFs for Panel-based items like Menu, which require an ApplicationWindow. Change-Id: I66fec30cde8d719be35766f8c917cd2a06b09127 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* testbench: fix theme switchJ-P Nurmi2015-11-301-2/+3
| | | | | | | It wasn't a good idea to use RTL, because the knob is also inverted :P Change-Id: Iee059807efb2243fb084381216a37f9c93961c19 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Add tst_materialJ-P Nurmi2015-11-304-0/+276
| | | | | | | | | Tests that the inheritance of theme & accent works as expected. This is useful for avoiding regressions in the process of introducing a shared base class for QQuickMaterialStyle and QQuickUniversalStyle. Change-Id: Ib2eb5922323131fb531344b80dc928a0a07cca90 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Remove ThemeMitch Curtis2015-11-274-346/+0
| | | | | | | | | Given the presence of alternative styles, we'd like to focus on making the default style as performant as possible. Removing Theme usage is a step towards this. Change-Id: I8f76dc98442e6c02703885591a44758f40c7a362 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Remove pop-o-rama manual testMitch Curtis2015-11-2711-965/+0
| | | | | | | | We will be working on new examples in cooperation with designers that we can use to manually test and demonstrate popup usage with. Change-Id: Ib3b2ffaa66f99698e1f27bec3ba0610da32bdd85 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Implement more of default style designMitch Curtis2015-11-261-91/+204
| | | | | Change-Id: Ieaa2fa1b876d75f94f48a7fce0c47c166b969d57 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* tst_objectcount: fake qbenchmark-like outputJ-P Nurmi2015-11-261-1/+4
| | | | | Change-Id: I20275e1a1d4d98710db1eadcd51bd17b84503130 Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
* Optimize Material ItemDelegateJ-P Nurmi2015-11-261-4/+0
| | | | | Change-Id: I868475a828e35a08c3f9c65996e896863a372bae Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Fix tst_Sanity::anchors()J-P Nurmi2015-11-262-21/+15
| | | | | | | | | Validate with a AST::Visitor that there are no local anchors -bindings in controls. Other QQuickAnchors instances (in QtGraphicalEffects) are now allowed. Change-Id: Ie862f193860eef7a90b6ac0c8e6c930e5cdd8245 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Fix tst_Sanity::attachedObjects_data()J-P Nurmi2015-11-262-20/+38
| | | | | | | Using basically the same approach than 561b9ce for benchmarks. Change-Id: Ibf78103ef92e5cad6c2b8415a445361d98dbea15 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Optimize Material CheckBoxJ-P Nurmi2015-11-261-2/+0
| | | | | | | | | | | | | | | | | | | Before: tst_ObjectCount::material(CheckBox): QQuickItems: 5 (total of QObjects: 28 ) tst_CreationTime::material():"CheckBox": 0.28 msecs per iteration (total: 72, iterations: 256) After: tst_ObjectCount::material(CheckBox): QQuickItems: 5 (total of QObjects: 19 ) tst_CreationTime::material():"CheckBox": 0.20 msecs per iteration (total: 53, iterations: 256) Change-Id: I63a76f5bfb190655237d21d68397d5dc93941fe0 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* testbench: add support for slow motion animationsJ-P Nurmi2015-11-262-1/+4
| | | | | | | | | Useful for debugging animations. Usage: ./testbench -slow Change-Id: Ic509c8da428dd08eddc9f445f942e3362bad9004 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Specify baseline offsetsJ-P Nurmi2015-11-256-0/+47
| | | | | | Change-Id: I4845a7beac2edc0f0bcc1c810edd7d9e86f31c87 Task-number: QTBUG-49468 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Add ItemDelegateJ-P Nurmi2015-11-251-0/+6
| | | | | Change-Id: I133be230d0d4b2fd36565f8f05d91426c314a085 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Fix ScrollBar layoutingJ-P Nurmi2015-11-241-0/+16
| | | | | | | | | QQuickScrollBar was relying on itemGeometryChanged() for the attached flickable. If the flickable geometry didn't change _after_ scroll bar was attached, the bar was not positioned and resized as appropriate. Change-Id: I8f8695b468596acf570e028dae96f7c31d73ffba Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Fix ScrollIndicator layoutingJ-P Nurmi2015-11-241-0/+16
| | | | | | | | | | QQuickScrollIndicator was relying on itemGeometryChanged() for the attached flickable. If the flickable geometry didn't change _after_ scroll indicator was attached, the indicator was not positioned and resized as appropriate. Change-Id: Ib5b4816b4ba96ad73873722045ac4e3b7e47038d Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Visualize Material Button's highlighted stateMitch Curtis2015-11-231-2/+7
| | | | | | Change-Id: I1c638c0b70a0ba8d0f5cfe1d7e41fd514c38c1c9 Task-number: QTBUG-49551 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Add material style to benchmarksJ-P Nurmi2015-11-202-27/+95
| | | | | Change-Id: I2b8d09f8dcd1380af849f3263bf2ea7599681190 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Fix accessibility initializationJ-P Nurmi2015-11-201-3/+7
| | | | | | | | | | | | If accessibility is already enabled at construction time, QQuickControl does not get a notification of accessibility activation change. This patch fixes the issue that the attached property object was not created at all, by calling accessibilityActiveChange(true) when appropriate at component completion. Change-Id: I5d763d66c97a540687b217b8ae453d073f6bfdb4 Task-number: QTBUG-49361 Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
* 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>