aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/auto.pro
Commit message (Collapse)AuthorAgeFilesLines
* Fix font inheritance for popupsJ-P Nurmi2017-06-071-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1) First of all, Popup's QObject-parent depends on the way the Popup is declared in QML, or what is passed as a parent to createObject() when creating dynamic instances. For example: - Popup becomes a QObject child of of the contentItem: ApplicationWindow { Popup { } } - Popup becomes a QObject child of the window: ApplicationWindow { Item { Popup { } } } - Popup becomes a QObject child of the specified parent: ApplicationWindow { Component { id: component Popup { } } Component.onComplete: component.createObject(overlay) } Since QQuickWindow and QQuickView did not set the QObject-parent of their contentItem and rootObject, respectively, we had troubles finding popup instances, because window->findChildren<QQuickPopup>() and window->contentItem()->findChildren<QQuickPopup>() would produce inconsistent results. This has been fixed in qtdeclarative commit af6655885, so now we can use window->findChildren() reliably. 2) Popups inherit font from the associated window, not the parent item. It was wrong to call resolveFont() in setParentItem(), because the parent item might not change even though the associated window does. The piece of code was moved to setWindow() instead. 3) QQuickPopupItemPrivate::resolveFont() did not propagate the default font at all when the font was resolved before being associated to a window. 4) After the above fixes had been applied, to ensure that popups always inherit fonts and propagate them down to children as appropriate, we got a new test failure in tst_controls::Popup::test_font() indicating that there were extra font change notifiers triggered at creation time. This was fixed by associating "top-level" popups with the window as soon as they are appended to ApplicationWindow's default property, instead of waiting until the popup is complete and then doing a lookup in the parent hierarchy. Task-number: QTBUG-61114 Change-Id: I6185c76d50835cb7a06b03db0a3ac9ddad64bdd3 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Disable/blacklist failing tests for boot2qtSami Nurmenniemi2017-05-081-0/+6
| | | | | | | | | Currently boot2qt is tested with QEMU and some tests fail. Disabling them for now to make it possible to enable qt5 tests for Coin. Task-number: QTBUG-60266 Change-Id: I2b8d7612ae22741cb19037ff47698f096753d9ca Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Re-enable tst_focus on LinuxJ-P Nurmi2017-04-201-4/+1
| | | | | | | | | | The auto test was disabled on Linux, because it was randomly crashing in libdbus on Ubuntu 14.04. The CI has upgraded to Ubuntu 16.04 so this should no longer be a problem. Task-number: QTBUG-50295 Change-Id: If654a30456a0d5e2a516b5e235b9b75e89425c92 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Rename tst_scrollbar to tst_cursorJ-P Nurmi2017-04-051-1/+1
| | | | | | | | | | | This test was added in 88a62b3 that fixed the scrollbar cursor. It was not possible to test in QML, so a separate C++ test was added. It was noticed that most interactive controls have the exact same issue, so we want to utilize the same test for testing the cursors of all relevant controls. Change-Id: I7c307de9f72760b0993007246beb3357a1b5ec2b Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QQuickScrollBar: set implicit Cursor as Qt::ArrowCursorKarol Polak2017-04-041-0/+1
| | | | | | | | Scrollbar over TextArea had Qt::IBeamCursor, although the textarea would not be activated when clicked. Task-number: QTBUG-59629 Change-Id: Ie96ba03360fcfb5872f5bb6345e168c987978aca Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-08-231-0/+2
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: src/imports/controls/material/qquickmaterialstyle.cpp src/imports/controls/universal/qquickuniversalstyle.cpp src/quicktemplates2/qquickpopup_p_p.h src/quicktemplates2/qquicktooltip.cpp tests/auto/auto.pro Change-Id: I88b347dd85278e14f7b2ca468e30648c6432b6f2
| * Universal: ensure setting background/foreground worksMitch Curtis2016-08-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - Add HasGlobalForeground and HasGlobalBackground. These are set to true when a foreground/background color is specified via settings (qtquickcontrols2.conf file or environment variables), and then used to initialize each attached style object's m_hasForeground and m_hasBackground property. - Add tst_qquickuniversalstyleconf auto test to ensure that global settings are respected. Task-number: QTBUG-55366 Change-Id: I7a8b219506f9528c4ae323bd890b418ba056ed23 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| * Material: ensure setting background/foreground worksMitch Curtis2016-08-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - Add hasGlobalForeground and hasGlobalBackground. These are set to true when a foreground/background color is specified via settings (qtquickcontrols2.conf file or environment variables), and then used to initialize each attached style object's m_hasForeground and m_hasBackground property. - Add tst_qquickmaterialstyleconf auto test to ensure that global settings are respected. Change-Id: I436773e355c6d470215fb9cfe8fbff402d2979d9 Task-number: QTBUG-55366 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Restore version 2.0 for the .impl importsJ-P Nurmi2016-08-101-0/+1
| | | | | | | | | | | | | | | | | | | | | | It's a bit of extra hassle, but the type registration can be done so that we keep the old version available to avoid deliberately breaking apps that have had to import .impl to gain access to the internal goodies. For example, someone may have made a copy of one of the controls as our documentation suggests. :) Change-Id: I5308d7e74ecebf69da7fe9c6912380f72c3c9a2b Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Setup a Qt.labs.platform moduleJ-P Nurmi2016-06-161-0/+1
|/ | | | | | | | | This change just prepares the infrastructure and imports an icon loader helper that will be used for the platform menu, dialog, and system tray icon implementations. Change-Id: I34a93050a7c988134c3daa986aca6021eac7a4d1 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Replace tst_styles with tst_material & tst_universalJ-P Nurmi2016-06-141-2/+1
| | | | | | | | | | The CI was not able to catch failures in tst_styles, because the test results were output by separate child processes. This change builds three different versions of tst_controls, which each run with the appropriate style. Change-Id: I95b2bdd90221579a3176e827802236d80d9f1a09 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Rename tst_material and tst_universalJ-P Nurmi2016-06-131-3/+3
| | | | | | | | | | These test specificly the QQuickMaterialStyle and QQuickUniversalStyle implementations, so rename appropriately to make room for the upcoming tst_material and tst_universal tests. See the next commit for more details about that. Change-Id: I08d6116d6219084f6087682b7e712f8499a0e945 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QQuickStyleSelector: fix relative path handlingJ-P Nurmi2016-04-251-0/+1
| | | | | | | | | | | | This makes it possible to pass a relative path to the style: ./myapp -style relative/path/to/my/style To make the tests pass, includes a fix to avoid double slashes in selected URLs. Change-Id: I1b366eb7793523dd0f1058236661cedaa1216f3d Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Implement case-insensitive style name lookupJ-P Nurmi2016-04-231-0/+1
| | | | | | | | Fixes the issue that "./app -style material" did no longer work, but the case had to match exactly (./app -style Material). Change-Id: I446654110af670c391f8e304ce8008fbd6e9acaa Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Fix QQuickDrawerPrivate::positionAt()J-P Nurmi2016-04-211-0/+1
| | | | | | | | The position on the right and bottom edges is relative to the size of the window, not the drawer itself. Change-Id: Ia1d7418d4091a3a9e26f691bd75448023e0ca1cf Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Auto test focus navigation with keysJ-P Nurmi2016-03-151-1/+1
| | | | | Change-Id: Ieb75c3043b9fac972af492598853ad8501637dbb Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Disable tst_activeFocusOnTab on LinuxJ-P Nurmi2016-02-221-1/+4
| | | | | | | | Blacklist doesn't help with crashes. Change-Id: Iae25f48b3e7b5d154ae30d144f3c734bf0de48b9 Task-number: QTBUG-50295 Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
* Add Popup::closePolicyJ-P Nurmi2016-01-281-0/+1
| | | | | Change-Id: Ie3d0f50a59aeaab36ec388af897cbf2596269ce3 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Add MenuMitch Curtis2015-12-021-0/+1
| | | | | | | | | 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>
* Add tst_materialJ-P Nurmi2015-11-301-0/+1
| | | | | | | | | 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-271-1/+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>
* Add tst_stylesJ-P Nurmi2015-11-121-0/+1
| | | | | | | Re-runs tst_controls with all styles Change-Id: I1feda621bfd5f48f42742b1f297abd11c6b437a9 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Add Universal styleJ-P Nurmi2015-11-121-1/+2
| | | | | | | https://dev.windows.com/design Change-Id: I1d8c633ae246724649a6ed71b300a56ba9572405 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Refactor press and hold testsJ-P Nurmi2015-11-121-0/+1
| | | | | | | | | | | | | | | | | 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>
* Fix crash in theme code when loading engines in successionJ-P Nurmi2015-10-091-1/+2
| | | | | | | | | | | | Store global engine specific themes as dynamic properties on the engines themselves. This avoids the problem that storing engines and their themes to a hash map had that destroyed engines and themes were not cleaned up from the hash map. Change-Id: I7330995339c263d456f74d33f6535d5ac7d9d5d4 Task-number: QTBUG-48651 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com> Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
* Fix QQuickDayOfWeekModel::setLocale()J-P Nurmi2015-09-241-0/+1
| | | | | | | | It must emit dataChanged() even if the first day of week of the new and old locales are the same. The names are most likely different. Change-Id: I932215821962910ef1fb8a66f2dab81dcc51a3b1 Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
* Merge Qt Quick Extras into Qt Quick ControlsMitch Curtis2015-09-181-1/+0
| | | | | | | | | | | | The original split existed because the public and enterprise controls were developed separately. Now that all controls are public and developed together, the split no longer makes sense and is difficult for users to understand. Change-Id: I00420f4d09f8c837232231d03fe818b7b3403fab Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com> Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* test: add activeFocusOnTab into auto testLiang Qi2015-09-181-0/+1
| | | | | Change-Id: Idf65a4859d012e290b5614ef84063de9540d29b9 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Controls: move Accessible from QML to C++Liang Qi2015-09-141-0/+1
| | | | | | | | | | | Controls 2.0 could be built with QT_NO_ACCESSIBILITY defined. Added a few helper functions for accessible in QQuickControl. Don't set text as Accessible.name for TextArea and TextField. Change-Id: I40383bbcec2f8c742f709bdec0209623f80da449 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Add ApplicationWindow auto tests.Mitch Curtis2015-07-211-0/+1
| | | | | | | | | | | | These were copied from Qt Quick Controls. There are some issues with regards to QQuickThemeData, so some are commented out for now (see tests for details). I also added a test for QTBUG-47318. Change-Id: Iaee0f4531b8d7bc9b4984146aaf00b76afa77793 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* Add tst_snippetsJ-P Nurmi2015-06-271-1/+2
| | | | | | | | | | | | | | | This is going to include all snippets used in the documentation, which will be then automatically tested for vality, and at the same time the respective screenshots are automatically generated. Notice that copying the screenshots over to src/doc/images is still a manual step. This is fully intentional because the screenshot results may vary quite a bit across different platforms due to different fonts and so on. FWIW, my personal favorite for generating the screenshots is OS X. Change-Id: I72b299f15b498abc1afd0a686c56d43159bee775 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Auto test anchors & attached objectsJ-P Nurmi2015-06-141-2/+2
| | | | | | | | | | | | | | | | | | | Rename the former tst_declarative to tst_sanity and extend it with tests to prevent: a) use of anchors, and b) multiple attached object instances of the same type. Anchors are not allowed for two reasons: - performance (QQuickAnchors is a QObject), and - to let users relayout delegates (x/y/width/height bindings can be overridden, anchors not so easily) Multiple attached object instances (eg. Theme) can easily happen by accident. "Theme.fooColor" can be used in the control root, but in all delegate items, "control.Theme.fooColor" must be used instead. Change-Id: I4045d5bd717fa21db79d1c3bd618fc450e292fa4 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Auto test 100% declarative QML layerJ-P Nurmi2015-06-111-0/+1
| | | | | | | | | | Not allowed: - .js files - signal handlers - function declarations Change-Id: I31247f154b96718ca95835120c9e7326e3c97968 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Import the Qt Quick Controls 2 prototypeJ-P Nurmi2015-02-051-0/+4
Change-Id: Ib8c0c4160958e5cfea29a6e9df1b3f1fb19715fc Reviewed-by: Jari-Pekka Nurmi <jpnurmi@theqtcompany.com>