aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2013-07-22 13:43:43 +0200
committerSimon Hausmann <simon.hausmann@digia.com>2013-07-22 13:43:43 +0200
commit3a6f5735ee723ff998114314c5ccdf6609667f6f (patch)
tree9c877dd1e35972fa336cea8a61986594f168b49c /tests/auto/quick
parent000b6330d4ca7165ff241b21ee728ed28d82fba1 (diff)
parent17ded06804576dfde1b19f82f168f7ceb09ec92c (diff)
Merge branch 'dev' of ssh://codereview.qt-project.org/qt/qtdeclarative into wip/v4
Conflicts: src/quick/items/context2d/qquickcontext2d.cpp tests/auto/quick/qquickvisualdatamodel/qquickvisualdatamodel.pro Change-Id: I36a4fd28b3156839aecd70039a3ba566bf19a0bc
Diffstat (limited to 'tests/auto/quick')
-rw-r--r--tests/auto/quick/examples/tst_examples.cpp1
-rw-r--r--tests/auto/quick/qquickanimatedsprite/data/runningChange.qml59
-rw-r--r--tests/auto/quick/qquickanimatedsprite/tst_qquickanimatedsprite.cpp24
-rw-r--r--tests/auto/quick/qquickcanvasitem/data/tst_context.qml79
-rw-r--r--tests/auto/quick/qquickitem2/data/standardkeys.qml57
-rw-r--r--tests/auto/quick/qquickitem2/tst_qquickitem.cpp60
-rw-r--r--tests/auto/quick/qquickloader/qquickloader.pro1
-rw-r--r--tests/auto/quick/qquickpositioners/qquickpositioners.pro1
-rw-r--r--tests/auto/quick/qquickvisualdatamodel/qquickvisualdatamodel.pro4
-rw-r--r--tests/auto/quick/qquickxmllistmodel/data/groups.qml10
-rw-r--r--tests/auto/quick/qquickxmllistmodel/data/groups.xml18
-rw-r--r--tests/auto/quick/qquickxmllistmodel/qquickxmllistmodel.pro3
-rw-r--r--tests/auto/quick/qquickxmllistmodel/tst_qquickxmllistmodel.cpp13
-rw-r--r--tests/auto/quick/quick.pro3
-rw-r--r--tests/auto/quick/touchmouse/touchmouse.pro2
15 files changed, 326 insertions, 9 deletions
diff --git a/tests/auto/quick/examples/tst_examples.cpp b/tests/auto/quick/examples/tst_examples.cpp
index 9c5fb88af2..7ef07e4896 100644
--- a/tests/auto/quick/examples/tst_examples.cpp
+++ b/tests/auto/quick/examples/tst_examples.cpp
@@ -89,6 +89,7 @@ tst_examples::tst_examples()
// Add files to exclude here
excludedFiles << "examples/quick/canvas/tiger/tiger.qml"; // QTBUG-26528
excludedFiles << "snippets/qml/listmodel/listmodel.qml"; //Just a ListModel, no root QQuickItem
+ excludedFiles << "examples/quick/demos/photosurface/photosurface.qml"; // root item is Window rather than Item
// Add directories you want excluded here (don't add examples/, because they install to examples/qtdeclarative/)
excludedDirs << "shared"; //Not an example
diff --git a/tests/auto/quick/qquickanimatedsprite/data/runningChange.qml b/tests/auto/quick/qquickanimatedsprite/data/runningChange.qml
new file mode 100644
index 0000000000..9994ff6d9b
--- /dev/null
+++ b/tests/auto/quick/qquickanimatedsprite/data/runningChange.qml
@@ -0,0 +1,59 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Tasuku Suzuki <stasuku@gmail.com>
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+
+Rectangle {
+ color: "black"
+ width: 320
+ height: 320
+
+ AnimatedSprite {
+ objectName: "sprite"
+ source: "squarefacesprite.png"
+ frameCount: 6
+ loops: 3
+ frameSync: true
+ running: false
+ width: 160
+ height: 160
+ }
+}
diff --git a/tests/auto/quick/qquickanimatedsprite/tst_qquickanimatedsprite.cpp b/tests/auto/quick/qquickanimatedsprite/tst_qquickanimatedsprite.cpp
index bf46b6eca8..6422e0b656 100644
--- a/tests/auto/quick/qquickanimatedsprite/tst_qquickanimatedsprite.cpp
+++ b/tests/auto/quick/qquickanimatedsprite/tst_qquickanimatedsprite.cpp
@@ -53,6 +53,7 @@ public:
private slots:
void initTestCase();
void test_properties();
+ void test_runningChangedSignal();
void test_frameChangedSignal();
};
@@ -87,6 +88,29 @@ void tst_qquickanimatedsprite::test_properties()
delete window;
}
+void tst_qquickanimatedsprite::test_runningChangedSignal()
+{
+ QQuickView *window = new QQuickView(0);
+
+ window->setSource(testFileUrl("runningChange.qml"));
+ window->show();
+ QVERIFY(QTest::qWaitForWindowExposed(window));
+
+ QVERIFY(window->rootObject());
+ QQuickAnimatedSprite* sprite = window->rootObject()->findChild<QQuickAnimatedSprite*>("sprite");
+ QVERIFY(sprite);
+
+ QVERIFY(!sprite->running());
+
+ QSignalSpy runningChangedSpy(sprite, SIGNAL(runningChanged(bool)));
+ sprite->setRunning(true);
+ QTRY_COMPARE(runningChangedSpy.count(), 1);
+ QTRY_VERIFY(!sprite->running());
+ QTRY_COMPARE(runningChangedSpy.count(), 2);
+
+ delete window;
+}
+
void tst_qquickanimatedsprite::test_frameChangedSignal()
{
QQuickView *window = new QQuickView(0);
diff --git a/tests/auto/quick/qquickcanvasitem/data/tst_context.qml b/tests/auto/quick/qquickcanvasitem/data/tst_context.qml
index ad44f6d28e..ab351f0de8 100644
--- a/tests/auto/quick/qquickcanvasitem/data/tst_context.qml
+++ b/tests/auto/quick/qquickcanvasitem/data/tst_context.qml
@@ -71,6 +71,7 @@ Canvas {
}
}
+ // See: http://www.w3.org/TR/css3-fonts/#font-prop
TestCase {
name: "ContextFontValidation"
when: canvas.available
@@ -82,8 +83,82 @@ Canvas {
var ctx = canvas.getContext("2d");
compare(ctx.font, "sans-serif,-1,10,5,50,0,0,0,0,0");
- ctx.font = "80.1px sans-serif";
- compare(ctx.font, "sans-serif,-1,80,5,50,0,0,0,0,0");
+ ctx.font = "80.1px cursive";
+ // Can't verify the chosen font family since it's different for each platform.
+ compare(ctx.font.substr(ctx.font.indexOf(",") + 1), "-1,80,5,50,0,0,0,0,0");
+ }
+
+ function test_valid() {
+ wait(100);
+ compare(contextSpy.count, 1);
+
+ var ctx = canvas.getContext("2d");
+
+ var validFonts = [
+ { string: "12px sans-serif", expected: "sans-serif,-1,12,5,50,0,0,0,0,0" },
+ { string: "12px serif", expected: "serif,-1,12,5,50,0,0,0,0,0" },
+ { string: "12pt sans-serif", expected: "sans-serif,12,-1,5,50,0,0,0,0,0" },
+ { string: "12pt serif", expected: "serif,12,-1,5,50,0,0,0,0,0" },
+ { string: "normal 12px sans-serif", expected: "sans-serif,-1,12,5,50,0,0,0,0,0" },
+ { string: "normal normal 12px sans-serif", expected: "sans-serif,-1,12,5,50,0,0,0,0,0" },
+ { string: "normal normal normal 12px sans-serif", expected: "sans-serif,-1,12,5,50,0,0,0,0,0" },
+ { string: "italic 12px sans-serif", expected: "sans-serif,-1,12,5,50,1,0,0,0,0" },
+ { string: "italic normal 12px sans-serif", expected: "sans-serif,-1,12,5,50,1,0,0,0,0" },
+ { string: "italic normal normal 12px sans-serif", expected: "sans-serif,-1,12,5,50,1,0,0,0,0" },
+ { string: "oblique 12px sans-serif", expected: "sans-serif,-1,12,5,50,2,0,0,0,0" },
+ { string: "oblique normal 12px sans-serif", expected: "sans-serif,-1,12,5,50,2,0,0,0,0" },
+ { string: "oblique normal normal 12px sans-serif", expected: "sans-serif,-1,12,5,50,2,0,0,0,0" },
+ { string: "bold 12px sans-serif", expected: "sans-serif,-1,12,5,75,0,0,0,0,0" },
+ { string: "0 12px sans-serif", expected: "sans-serif,-1,12,5,0,0,0,0,0,0" },
+ { string: "small-caps 12px sans-serif", expected: "sans-serif,-1,12,5,50,0,0,0,0,0" },
+ ];
+ for (var i = 0; i < validFonts.length; ++i) {
+ ctx.font = validFonts[i].string;
+ compare(ctx.font.substr(ctx.font.indexOf(",") + 1),
+ validFonts[i].expected.substr(validFonts[i].expected.indexOf(",") + 1));
+ }
+ }
+
+ function test_invalid() {
+ wait(100);
+ compare(contextSpy.count, 1);
+
+ var ctx = canvas.getContext("2d");
+ var originalFont = ctx.font;
+ var i = 0;
+
+ var insufficientQtyTokens = ["", "12px", "sans-serif"];
+ for (i = 0; i < insufficientQtyTokens.length; ++i) {
+ ignoreWarning("Context2D: Insufficent amount of tokens in font string.");
+ ctx.font = insufficientQtyTokens[i];
+ compare(ctx.font, originalFont);
+ }
+
+ var invalidFontSizes = ["z12px sans-serif", "1z2px sans-serif", "12zpx sans-serif",
+ "12pzx sans-serif", "12pxz sans-serif", "sans-serif 12px"];
+ for (i = 0; i < invalidFontSizes.length; ++i) {
+ ignoreWarning("Context2D: A font size of \"" + invalidFontSizes[i].split(" ")[0] + "\" is invalid.");
+ ctx.font = invalidFontSizes[i];
+ compare(ctx.font, originalFont);
+ }
+
+ var invalidFontFamilies = ["12px !@weeeeeeee!@!@Don'tNameYourFontThis", "12px )(&*^^^%#$@*!!@#$JSPOR)"];
+ for (i = 0; i < invalidFontFamilies.length; ++i) {
+ ignoreWarning("Context2D: The font family \"" + invalidFontFamilies[i].split(" ")[1] + "\" is invalid.");
+ ctx.font = invalidFontFamilies[i];
+ compare(ctx.font, originalFont);
+ }
+
+ var duplicates = [
+ { duplicate: "normal", string: "normal normal normal normal 12px sans-serif" },
+ { duplicate: "bold", string: "normal normal bold bold 12px sans-serif" },
+ { duplicate: "bold", string: "bold bold 12px sans-serif" }
+ ];
+ for (i = 0; i < duplicates.length; ++i) {
+ ignoreWarning("Context2D: Duplicate token \"" + duplicates[i].duplicate + "\" found in font string.");
+ ctx.font = duplicates[i].string;
+ compare(ctx.font, originalFont);
+ }
}
}
}
diff --git a/tests/auto/quick/qquickitem2/data/standardkeys.qml b/tests/auto/quick/qquickitem2/data/standardkeys.qml
new file mode 100644
index 0000000000..c29a143c28
--- /dev/null
+++ b/tests/auto/quick/qquickitem2/data/standardkeys.qml
@@ -0,0 +1,57 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.2
+
+Item {
+ focus: true
+
+ property bool pressed: false
+ property bool released: false
+
+ Keys.onPressed: {
+ pressed = event.matches(standardKey)
+ }
+
+ Keys.onReleased: {
+ released = event.matches(standardKey)
+ }
+}
diff --git a/tests/auto/quick/qquickitem2/tst_qquickitem.cpp b/tests/auto/quick/qquickitem2/tst_qquickitem.cpp
index 992e81aa64..d15a46feca 100644
--- a/tests/auto/quick/qquickitem2/tst_qquickitem.cpp
+++ b/tests/auto/quick/qquickitem2/tst_qquickitem.cpp
@@ -78,6 +78,8 @@ private slots:
void nextItemInFocusChain2();
void keys();
+ void standardKeys_data();
+ void standardKeys();
void keysProcessingOrder();
void keysim();
void keyNavigation();
@@ -1089,6 +1091,64 @@ void tst_QQuickItem::keys()
delete testObject;
}
+Q_DECLARE_METATYPE(QEvent::Type);
+Q_DECLARE_METATYPE(QKeySequence::StandardKey);
+
+void tst_QQuickItem::standardKeys_data()
+{
+ QTest::addColumn<QKeySequence::StandardKey>("standardKey");
+ QTest::addColumn<QKeySequence::StandardKey>("contextProperty");
+ QTest::addColumn<QEvent::Type>("eventType");
+ QTest::addColumn<bool>("pressed");
+ QTest::addColumn<bool>("released");
+
+ QTest::newRow("Press: Open") << QKeySequence::Open << QKeySequence::Open << QEvent::KeyPress << true << false;
+ QTest::newRow("Press: Close") << QKeySequence::Close << QKeySequence::Close << QEvent::KeyPress << true << false;
+ QTest::newRow("Press: Save") << QKeySequence::Save << QKeySequence::Save << QEvent::KeyPress << true << false;
+ QTest::newRow("Press: Quit") << QKeySequence::Quit << QKeySequence::Quit << QEvent::KeyPress << true << false;
+
+ QTest::newRow("Release: New") << QKeySequence::New << QKeySequence::New << QEvent::KeyRelease << false << true;
+ QTest::newRow("Release: Delete") << QKeySequence::Delete << QKeySequence::Delete << QEvent::KeyRelease << false << true;
+ QTest::newRow("Release: Undo") << QKeySequence::Undo << QKeySequence::Undo << QEvent::KeyRelease << false << true;
+ QTest::newRow("Release: Redo") << QKeySequence::Redo << QKeySequence::Redo << QEvent::KeyRelease << false << true;
+
+ QTest::newRow("Mismatch: Cut") << QKeySequence::Cut << QKeySequence::Copy << QEvent::KeyPress << false << false;
+ QTest::newRow("Mismatch: Copy") << QKeySequence::Copy << QKeySequence::Paste << QEvent::KeyPress << false << false;
+ QTest::newRow("Mismatch: Paste") << QKeySequence::Paste << QKeySequence::Cut << QEvent::KeyRelease << false << false;
+ QTest::newRow("Mismatch: Quit") << QKeySequence::Quit << QKeySequence::New << QEvent::KeyRelease << false << false;
+}
+
+void tst_QQuickItem::standardKeys()
+{
+ QFETCH(QKeySequence::StandardKey, standardKey);
+ QFETCH(QKeySequence::StandardKey, contextProperty);
+ QFETCH(QEvent::Type, eventType);
+ QFETCH(bool, pressed);
+ QFETCH(bool, released);
+
+ QKeySequence keySequence(standardKey);
+ if (keySequence.isEmpty())
+ QSKIP("Undefined key sequence.");
+
+ QQuickView view;
+ view.rootContext()->setContextProperty("standardKey", contextProperty);
+ view.setSource(testFileUrl("standardkeys.qml"));
+ view.show();
+ view.requestActivate();
+ QVERIFY(QTest::qWaitForWindowActive(&view));
+
+ QQuickItem *item = qobject_cast<QQuickItem*>(view.rootObject());
+ QVERIFY(item);
+
+ const int key = keySequence[0] & Qt::Key_unknown;
+ const int modifiers = keySequence[0] & Qt::KeyboardModifierMask;
+ QKeyEvent keyEvent(eventType, key, static_cast<Qt::KeyboardModifiers>(modifiers));
+ QGuiApplication::sendEvent(&view, &keyEvent);
+
+ QCOMPARE(item->property("pressed").toBool(), pressed);
+ QCOMPARE(item->property("released").toBool(), released);
+}
+
void tst_QQuickItem::keysProcessingOrder()
{
QQuickView *window = new QQuickView(0);
diff --git a/tests/auto/quick/qquickloader/qquickloader.pro b/tests/auto/quick/qquickloader/qquickloader.pro
index 567917877c..88de3c4c60 100644
--- a/tests/auto/quick/qquickloader/qquickloader.pro
+++ b/tests/auto/quick/qquickloader/qquickloader.pro
@@ -14,3 +14,4 @@ TESTDATA = data/*
QT += core-private gui-private qml-private quick-private network testlib
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
+CONFIG+=insignificant_test # QTBUG-30721
diff --git a/tests/auto/quick/qquickpositioners/qquickpositioners.pro b/tests/auto/quick/qquickpositioners/qquickpositioners.pro
index c625080d7c..f6a046e622 100644
--- a/tests/auto/quick/qquickpositioners/qquickpositioners.pro
+++ b/tests/auto/quick/qquickpositioners/qquickpositioners.pro
@@ -9,6 +9,5 @@ macx:CONFIG -= app_bundle
TESTDATA = data/*
-CONFIG += parallel_test
QT += testlib
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/quick/qquickvisualdatamodel/qquickvisualdatamodel.pro b/tests/auto/quick/qquickvisualdatamodel/qquickvisualdatamodel.pro
index 7b0e0c2878..d9aff688ab 100644
--- a/tests/auto/quick/qquickvisualdatamodel/qquickvisualdatamodel.pro
+++ b/tests/auto/quick/qquickvisualdatamodel/qquickvisualdatamodel.pro
@@ -9,8 +9,6 @@ include (../shared/util.pri)
TESTDATA = data/*
-CONFIG += parallel_test
-
-QT += core-private gui-private qml-private quick-private testlib
+QT += core-private gui-private qml-private quick-private testlib
qtHaveModule(widgets): QT += widgets
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/quick/qquickxmllistmodel/data/groups.qml b/tests/auto/quick/qquickxmllistmodel/data/groups.qml
new file mode 100644
index 0000000000..c1b574a822
--- /dev/null
+++ b/tests/auto/quick/qquickxmllistmodel/data/groups.qml
@@ -0,0 +1,10 @@
+import QtQuick 2.0
+import QtQuick.XmlListModel 2.0
+
+XmlListModel {
+ source: "groups.xml"
+ query: "//animal[@name='Garfield']/parent::group"
+
+ XmlRole { name: "id"; query: "@id/string()" }
+ XmlRole { name: "name"; query: "@name/string()" }
+}
diff --git a/tests/auto/quick/qquickxmllistmodel/data/groups.xml b/tests/auto/quick/qquickxmllistmodel/data/groups.xml
new file mode 100644
index 0000000000..5de4d2ec71
--- /dev/null
+++ b/tests/auto/quick/qquickxmllistmodel/data/groups.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<groups version="2.0">
+ <group id="1" name="Animals" type="root">
+ <group id="11" name="dogs">
+ <animal id="111" name="Lassie"/>
+ <animal id="112" name="Laika"/>
+ <animal id="113" name="Wile E. Coyote" type="fictional"/>
+ </group>
+ <group id="12" name="cats">
+ <animal id="121" name="Garfield" type="fictional"/>
+ <animal id="122" name="Sylvester" type="fictional"/>
+ </group>
+ <group id="13" name="birds">
+ <animal id="131" name="Donald Duck" type="fictional"/>
+ <animal id="132" name="Phoenix" type="fictional"/>
+ </group>
+ </group>
+</groups>
diff --git a/tests/auto/quick/qquickxmllistmodel/qquickxmllistmodel.pro b/tests/auto/quick/qquickxmllistmodel/qquickxmllistmodel.pro
index da899a12ec..574481c456 100644
--- a/tests/auto/quick/qquickxmllistmodel/qquickxmllistmodel.pro
+++ b/tests/auto/quick/qquickxmllistmodel/qquickxmllistmodel.pro
@@ -12,3 +12,6 @@ CONFIG += parallel_test
QT += core-private gui-private qml-private network testlib xmlpatterns
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
+
+OTHER_FILES += \
+ data/groups.qml
diff --git a/tests/auto/quick/qquickxmllistmodel/tst_qquickxmllistmodel.cpp b/tests/auto/quick/qquickxmllistmodel/tst_qquickxmllistmodel.cpp
index 847cc5078d..1f7a8029dc 100644
--- a/tests/auto/quick/qquickxmllistmodel/tst_qquickxmllistmodel.cpp
+++ b/tests/auto/quick/qquickxmllistmodel/tst_qquickxmllistmodel.cpp
@@ -101,6 +101,7 @@ private slots:
void threading();
void threading_data();
void propertyChanges();
+ void selectAncestor();
void roleCrash();
@@ -964,6 +965,18 @@ void tst_qquickxmllistmodel::propertyChanges()
delete model;
}
+void tst_qquickxmllistmodel::selectAncestor()
+{
+ QQmlComponent component(&engine, testFileUrl("groups.qml"));
+ QAbstractItemModel *model = qobject_cast<QAbstractItemModel *>(component.create());
+ QVERIFY(model != 0);
+ QTRY_COMPARE(model->rowCount(), 1);
+
+ QModelIndex index = model->index(0, 0);
+ QCOMPARE(model->data(index, Qt::UserRole).toInt(), 12);
+ QCOMPARE(model->data(index, Qt::UserRole+1).toString(), QLatin1String("cats"));
+}
+
void tst_qquickxmllistmodel::roleCrash()
{
// don't crash
diff --git a/tests/auto/quick/quick.pro b/tests/auto/quick/quick.pro
index 81d4fd3348..d0f8c401d6 100644
--- a/tests/auto/quick/quick.pro
+++ b/tests/auto/quick/quick.pro
@@ -69,7 +69,8 @@ QUICKTESTS = \
qquickcanvasitem \
qquickscreen \
touchmouse \
- dialogs \
+# disabled to allow file dialog changes to use urls internally (qtbase)
+# dialogs \
SUBDIRS += $$PUBLICTESTS
diff --git a/tests/auto/quick/touchmouse/touchmouse.pro b/tests/auto/quick/touchmouse/touchmouse.pro
index e21695904e..e7c50e6f54 100644
--- a/tests/auto/quick/touchmouse/touchmouse.pro
+++ b/tests/auto/quick/touchmouse/touchmouse.pro
@@ -13,8 +13,6 @@ TESTDATA = data/*
# OTHER_FILES += data/foo.qml
-CONFIG += parallel_test
-
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
mac:CONFIG+=insignificant_test # QTBUG-27890