aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/sanity/tst_sanity.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.9' into 5.10J-P Nurmi2018-01-151-2/+75
|\ | | | | | | | | | | | | | | Conflicts: src/quicktemplates2/qquickcontrol.cpp tests/auto/sanity/tst_sanity.cpp Change-Id: I62a79fd7788fec635b9917fc91bacd7338b547fd
| * tst_sanity: check for internal IDsJ-P Nurmi2018-01-111-0/+67
| | | | | | | | | | | | Task-number: QTBUG-65341 Change-Id: I51bd3390a18e50e37dfdd880dfa8df262d478b04 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * tst_sanity: exclude internal helper typesJ-P Nurmi2018-01-111-2/+8
| | | | | | | | | | | | | | | | Test file names against registered QML types to avoid including any internal helper types like CursorDelegate.qml and RectangularGlow.qml. Change-Id: Ia3079ea215eea59f7e405a50c3170fb4530f4239 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Default: merge SwitchIndicator back to Switch & SwitchDelegateJ-P Nurmi2017-11-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See the previous commit (CheckIndicator) for more details. Before: running: /home/jpnurmi/Projects/qmlbench/benchmarks/auto/creation/quick.controls2/delegates_switch.qml [...] Average: 87.8 frames; using samples; MedianAll=87; StdDev=2.16795, CoV=0.0246919 After: running: qmlbench/benchmarks/auto/creation/quick.controls2/delegates_switch.qml [...] Average: 92.6 frames; using samples; MedianAll=92; StdDev=2.19089, CoV=0.0236597 Change-Id: Iea9e88e4e771ac27d336c2c87232704d33a226ec Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Default: merge RadioIndicator back to RadioButton & RadioDelegateJ-P Nurmi2017-11-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See the previous commit (CheckIndicator) for more details. Before: running: qmlbench/benchmarks/auto/creation/quick.controls2/delegates_radiobutton.qml [...] Average: 91.6 frames; using samples; MedianAll=91; StdDev=1.51658, CoV=0.0165565 After: running: qmlbench/benchmarks/auto/creation/quick.controls2/delegates_radiobutton.qml [...] Average: 95.8 frames; using samples; MedianAll=96; StdDev=2.04939, CoV=0.0213924 Change-Id: Ic185241767d0b9422e86919356e3155e00803e56 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Default: merge CheckIndicator back to CheckBox & CheckDelegateJ-P Nurmi2017-11-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The internal CheckIndicator helper was introduced together with CheckDelegate in 1acb34a, because we naturally wanted to share the indicator instead of duplicating it. This change is controversial, because it leads to duplicate code, but keeping the indicator definitions inline is clearly faster. This is not seen as a huge problem for the Default style, because the indicator is not too complicated. Basically, this fixes a ~5% performance regression introduced by 1acb34a. Before: running: qmlbench/benchmarks/auto/creation/quick.controls2/delegates_checkbox.qml [...] Average: 72.8 frames; using samples; MedianAll=73; StdDev=1.48324, CoV=0.0203742 After: running: qmlbench/benchmarks/auto/creation/quick.controls2/delegates_checkbox.qml [...] Average: 77 frames; using samples; MedianAll=77; StdDev=1.41421, CoV=0.0183664 Change-Id: Ibee0e29e83a64ee4a6a772a90b1784a9c8c715bb Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | 9-patch export plugin for SketchJ-P Nurmi2017-10-181-1/+1
| | | | | | | | | | | | | | | | This plugin crops upscaled 9-patch PNG assets when exported from Sketch, to ensure that 9-patch borders remain 1px wide when upscaled. Change-Id: Iad46d75f37b76eecf64ac32fa38d2b9e9db8b34d Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | tst_sanity: fix "empty filename passed to function" warningsJ-P Nurmi2017-10-181-3/+6
| | | | | | | | | | Change-Id: Ia1e633af6c64c9e2d538a2d4076e0bdd9667e01e Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Say hello to the Fusion styleJ-P Nurmi2017-05-301-0/+1
|/ | | | | | | | [ChangeLog][Controls] Introduced a Fusion style that offers a platform agnostic desktop-oriented look'n'feel. Change-Id: Id1c1baf10f4b3a79e89bcc72f6d170ed0b2cc8b0 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Cleanup obsolete references to doc/snippets/screenshotsJ-P Nurmi2017-05-041-1/+1
| | | | | Change-Id: Ia631cd493d695aaac44d612f234756b4e5b558dd Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Merge remote-tracking branch 'origin/5.8' into devJ-P Nurmi2017-01-111-1/+1
|\ | | | | | | Change-Id: If797ac58344b20e8de4379343131c097247ba2f2
| * Welcome to 2017J-P Nurmi2017-01-091-1/+1
| | | | | | | | | | Change-Id: If68cff4efacc7dc5719c8b8e61937e85e9076870 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Material: share the CursorDelegateJ-P Nurmi2016-10-281-1/+1
|/ | | | | | | | Duplicate code in TextField, TextArea, and SpinBox. The next one is editable ComboBox. Change-Id: Ibbd054d2f945f4964ee0007f9e9dc8a9450902e9 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Refactor tst_snippets to make it easier to add non-screenshot snippetsMitch Curtis2016-09-261-1/+2
| | | | | | | | Add a separate test for non-screenshot snippets and move the screenshot snippets to their own folder. Change-Id: Ic3e7370321e346b83f7df42205e204d1265ce5b0 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Replace 'foreach' with 'range for'Anton Kudryavtsev2016-09-021-5/+7
| | | | | | | | And add QT_NO_FOREACH define to .qmake.conf. Now QuickControls2 is 'foreach' free. Change-Id: I98695258859decadae6fd2f23f5f6f5ef2b0550f Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* tests: skip material/BoxShadow.qml and material/ElevationEffect.qmlJ-P Nurmi2016-05-061-1/+1
| | | | | | | | | These are not standalone controls, but internal helper types. They are tested and benchmarked together with the enclosing control, just like the various indicator types. Change-Id: I41b756b5f60dbd25719707da5372e13184092748 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* import Qt.labs.controls 1.0 => QtQuick.Controls 2.0J-P Nurmi2016-04-211-4/+4
| | | | | | | | | Docs, resources, .metainfo and plugins.qmltypes will be updated in follow up commits. Change-Id: I4438c5bfb8802bff0fa15c56431cfd288f179861 Task-number: QTBUG-52549 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Tests: prepare for the upcoming import rename - part IIJ-P Nurmi2016-04-211-5/+5
| | | | | | | Move the Qt/labs/ prefix out of addTestRows(). Change-Id: I1bd69fee15e795ca40f8c767dc86be5f80f66530 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Tests: prepare for the upcoming import renameJ-P Nurmi2016-04-201-6/+6
| | | | | | | | | | Looks like a duplicate string right now, but after the import rename, the target path (eg. QT_INSTALL_QML/QtQuick/Controls.2/Material) and the source path (eg. src/imports/controls/material) no longer have a common structure, so pass both paths to addTestRows(). Change-Id: I39228ed5f23434289a5bea95977bbd0e7a378641 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* tst_sanity|creationtime|objectcount: skip the internal indicator typesv5.7.0-beta1J-P Nurmi2016-04-121-3/+3
| | | | | Change-Id: I5c3d5309efeaab826e27ef97c3285803603e5e21 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Support static buildsJ-P Nurmi2016-01-131-7/+11
| | | | | Change-Id: I17bb9131603da912597777b2ec0b9be3894ed858 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Fix tst_Sanity::anchors()J-P Nurmi2015-11-261-7/+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-261-10/+38
| | | | | | | Using basically the same approach than 561b9ce for benchmarks. Change-Id: Ibf78103ef92e5cad6c2b8415a445361d98dbea15 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>
* tst_sanity/tst_creationtime: use the source treeJ-P Nurmi2015-10-101-12/+6
| | | | | | | | | | | Pick the interesting .qml files straight from the project source tree, instead of matching files from the engine's import path list, which might contain undesired stray files eg. while working on multiple features and switching between branches. The tests would fail if it found a file that cannot be instantiated. Change-Id: Ice1e1be3568162a45fafdea3a725e3e3eb27e10d Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
* Rename QtQuick.Controls 2.0 to Qt.labs.controls 1.0J-P Nurmi2015-10-011-1/+1
| | | | | Change-Id: I142622dd85e95ef70b11132e77ccf48701f2cabc Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Rename QtQuick.Calendar 2.0 to Qt.labs.calendar 1.0J-P Nurmi2015-10-011-1/+1
| | | | | Change-Id: Ief7e28f6c595cb60f15a4960dada24a6c2f5ca3e Reviewed-by: Mitch Curtis <mitch.curtis@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>
* Use constBegin/End with const_iteratorFrederik Gladhorn2015-07-241-5/+5
| | | | | | | Change-Id: I9c4801ac91c52d487e98a99ff4d38e133f0679a3 Reviewed-by: Liang Qi <liang.qi@theqtcompany.com> Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* Auto test anchors & attached objectsJ-P Nurmi2015-06-141-0/+287
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>