aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2017-05-11 17:49:08 +0200
committerJ-P Nurmi <jpnurmi@qt.io>2017-05-11 17:49:08 +0200
commit1fc2dfee7e0a0240d0823b5153be7491406518d9 (patch)
treeed3667e135bf16abe4001ef281903211faf4c6dd /tests
parent52e578611c5d9dca43d967c833e23b7bbcb53079 (diff)
parent2d11f49ecd48fbf154cf5dc759526bf28fc732b7 (diff)
Merge remote-tracking branch 'origin/5.9' into dev
Conflicts: .qmake.conf Change-Id: I5c6398e4146e62109bef231fe358b7ed69fa9488
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/auto.pro6
-rw-r--r--tests/auto/controls/data/tst_abstractbutton.qml4
-rw-r--r--tests/auto/controls/data/tst_pane.qml4
-rw-r--r--tests/auto/controls/data/tst_popup.qml6
-rw-r--r--tests/auto/controls/data/tst_stackview.qml8
-rw-r--r--tests/auto/sanity/tst_sanity.cpp2
-rw-r--r--tests/auto/snippets/snippets.pro2
-rw-r--r--tests/auto/snippets/tst_snippets.cpp9
8 files changed, 23 insertions, 18 deletions
diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro
index 7c6f7a16..46275a3c 100644
--- a/tests/auto/auto.pro
+++ b/tests/auto/auto.pro
@@ -23,3 +23,9 @@ SUBDIRS += \
revisions \
sanity \
snippets
+
+# QTBUG-60268
+boot2qt: SUBDIRS -= applicationwindow calendar controls cursor \
+ drawer focus menu platform popup qquickmaterialstyle \
+ qquickmaterialstyleconf qquickuniversalstyle \
+ qquickuniversalstyleconf snippets
diff --git a/tests/auto/controls/data/tst_abstractbutton.qml b/tests/auto/controls/data/tst_abstractbutton.qml
index d38adb0a..a7f4ab8a 100644
--- a/tests/auto/controls/data/tst_abstractbutton.qml
+++ b/tests/auto/controls/data/tst_abstractbutton.qml
@@ -147,7 +147,7 @@ TestCase {
}
function test_keyEvents(data) {
- var container = keyCatcher.createObject(testCase)
+ var container = createTemporaryObject(keyCatcher, testCase)
verify(container)
var control = button.createObject(container)
@@ -161,8 +161,6 @@ TestCase {
keyRelease(data.key)
compare(container.lastKeyRelease, data.result)
-
- container.destroy()
}
function test_icon() {
diff --git a/tests/auto/controls/data/tst_pane.qml b/tests/auto/controls/data/tst_pane.qml
index f495a159..0d7e6536 100644
--- a/tests/auto/controls/data/tst_pane.qml
+++ b/tests/auto/controls/data/tst_pane.qml
@@ -152,15 +152,13 @@ TestCase {
}
function test_implicitContentItem() {
- var control = pane.createObject(testCase, {width: 100, height: 100})
+ var control = createTemporaryObject(pane, testCase, {width: 100, height: 100})
verify(control)
compare(control.width, 100)
compare(control.height, 100)
compare(control.contentItem.width, control.availableWidth)
compare(control.contentItem.height, control.availableHeight)
-
- control.destroy()
}
function test_press() {
diff --git a/tests/auto/controls/data/tst_popup.qml b/tests/auto/controls/data/tst_popup.qml
index beae39d1..bec50ad0 100644
--- a/tests/auto/controls/data/tst_popup.qml
+++ b/tests/auto/controls/data/tst_popup.qml
@@ -197,7 +197,7 @@ TestCase {
}
function test_availableSize() {
- var control = popupTemplate.createObject(testCase)
+ var control = createTemporaryObject(popupTemplate, testCase)
verify(control)
var availableWidthSpy = createTemporaryObject(signalSpy, testCase, {target: control, signalName: "availableWidthChanged"})
@@ -1247,12 +1247,10 @@ TestCase {
}
function test_windowParent() {
- var control = popupControl.createObject(applicationWindow, {width: 100, height: 100})
+ var control = createTemporaryObject(popupControl, applicationWindow, {width: 100, height: 100})
verify(control)
control.open()
verify(control.visible)
-
- control.destroy()
}
}
diff --git a/tests/auto/controls/data/tst_stackview.qml b/tests/auto/controls/data/tst_stackview.qml
index 37bd5222..8650df22 100644
--- a/tests/auto/controls/data/tst_stackview.qml
+++ b/tests/auto/controls/data/tst_stackview.qml
@@ -1022,7 +1022,7 @@ TestCase {
}
function test_pushSameItem() {
- var control = stackView.createObject(testCase)
+ var control = createTemporaryObject(stackView, testCase)
verify(control)
control.push(item, StackView.Immediate)
@@ -1045,12 +1045,10 @@ TestCase {
verify(current !== item)
compare(control.currentItem, current)
compare(control.depth, 3)
-
- control.destroy()
}
function test_visible() {
- var control = stackView.createObject(testCase)
+ var control = createTemporaryObject(stackView, testCase)
verify(control)
var item1 = component.createObject(control)
@@ -1098,8 +1096,6 @@ TestCase {
control.pop(StackView.Immediate)
compare(item1.visible, true)
compare(item1.StackView.visible, true)
-
- control.destroy()
}
function test_resolve() {
diff --git a/tests/auto/sanity/tst_sanity.cpp b/tests/auto/sanity/tst_sanity.cpp
index 8d3fee7b..2988c96c 100644
--- a/tests/auto/sanity/tst_sanity.cpp
+++ b/tests/auto/sanity/tst_sanity.cpp
@@ -139,7 +139,7 @@ private:
void tst_Sanity::initTestCase()
{
QDirIterator it(QQC2_IMPORT_PATH, QStringList() << "*.qml" << "*.js", QDir::Files, QDirIterator::Subdirectories);
- const QStringList excludeDirs = QStringList() << QStringLiteral("snippets") << QStringLiteral("screenshots") << QStringLiteral("designer");
+ const QStringList excludeDirs = QStringList() << QStringLiteral("snippets") << QStringLiteral("designer");
while (it.hasNext()) {
it.next();
QFileInfo info = it.fileInfo();
diff --git a/tests/auto/snippets/snippets.pro b/tests/auto/snippets/snippets.pro
index 82191220..6f366f23 100644
--- a/tests/auto/snippets/snippets.pro
+++ b/tests/auto/snippets/snippets.pro
@@ -1,7 +1,7 @@
TEMPLATE = app
TARGET = tst_snippets
-QT += quick testlib
+QT += quick quickcontrols2 testlib
CONFIG += testcase
macos:CONFIG -= app_bundle
diff --git a/tests/auto/snippets/tst_snippets.cpp b/tests/auto/snippets/tst_snippets.cpp
index 97b10fe1..1185bde9 100644
--- a/tests/auto/snippets/tst_snippets.cpp
+++ b/tests/auto/snippets/tst_snippets.cpp
@@ -36,6 +36,7 @@
#include <QtTest>
#include <QtQuick>
+#include <QtQuickControls2>
typedef QPair<QString, QString> QStringPair;
@@ -111,6 +112,14 @@ void tst_Snippets::verify()
QVERIFY(warnings.isEmpty());
if (takeScreenshots) {
+ const QString currentDataTag = QLatin1String(QTest::currentDataTag());
+ static const QString currentStyle = QQuickStyle::name();
+ static const QStringList availableStyles = QQuickStyle::availableStyles();
+ for (const QString &availableStyle : availableStyles) {
+ if (currentStyle != availableStyle && currentDataTag.startsWith("qtquickcontrols2-" + availableStyle.toLower() + "-"))
+ QSKIP(qPrintable(QString("Not running with the %1 style").arg(availableStyle)));
+ }
+
QQuickWindow *window = qobject_cast<QQuickWindow *>(root);
if (!window) {
QQuickView *view = new QQuickView;