From 368e8046184f71b31618e49de4f5e49ee20db5f4 Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Fri, 22 Dec 2017 13:27:08 +0100 Subject: Fix and test deferred execution for Universal & Material Change-Id: I8ee27a0c65c9ce8c9cc48c6f59d2b34d02849be8 Reviewed-by: Mitch Curtis --- tests/auto/customization/tst_customization.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'tests/auto/customization/tst_customization.cpp') diff --git a/tests/auto/customization/tst_customization.cpp b/tests/auto/customization/tst_customization.cpp index 24635a61..5c6310ba 100644 --- a/tests/auto/customization/tst_customization.cpp +++ b/tests/auto/customization/tst_customization.cpp @@ -251,7 +251,7 @@ void tst_customization::reset() QObject* tst_customization::createControl(const QString &name, const QString &qml, QString *error) { QQmlComponent component(engine); - component.setData("import QtQuick 2.9; import QtQuick.Controls 2.2; " + name.toUtf8() + " { " + qml.toUtf8() + " }", QUrl()); + component.setData("import QtQuick 2.9; import QtQuick.Window 2.2; import QtQuick.Controls 2.2; " + name.toUtf8() + " { " + qml.toUtf8() + " }", QUrl()); QObject *obj = component.create(); if (!obj) *error = component.errorString(); @@ -356,7 +356,7 @@ void tst_customization::override_data() QTest::newRow(qPrintable("overidentified:" + control.type)) << "identified" << control.type << control.delegates << "identified" << true; // test that the built-in styles don't have undesired IDs in their delegates - const QStringList styles = QStringList() << "Default"; // ### TODO: QQuickStyle::availableStyles(); + const QStringList styles = QStringList() << "Default" << "Material" << "Universal"; // ### TODO: QQuickStyle::availableStyles(); for (const QString &style : styles) { for (const ControlInfo &control : ControlInfos) QTest::newRow(qPrintable(style + ":" + control.type)) << style << control.type << control.delegates << "" << false; @@ -392,8 +392,11 @@ void tst_customization::override() // delegates, no item should get un-parented during the creation process. An item being // unparented means that a delegate got destroyed, so there must be an internal ID in one // of the delegates in the tested style. - if (!identify && nonDeferred.isEmpty()) + if (!identify && nonDeferred.isEmpty()) { + QEXPECT_FAIL("Material:BusyIndicator", "TODO: remove internal ID in the OpacityAnimator", Continue); + QEXPECT_FAIL("Universal:ApplicationWindow", "ApplicationWindow.qml contains an intentionally unparented FocusRectangle", Continue); QCOMPARE(qt_unparentedItemCount, 0); + } // -