aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmltypeloader/tst_qqmltypeloader.cpp
diff options
context:
space:
mode:
authorJan Arve Sæther <jan-arve.saether@qt.io>2019-07-31 11:41:54 +0200
committerJan Arve Sæther <jan-arve.saether@qt.io>2019-08-29 13:33:12 +0200
commit3ecfd166f352faf21ea425bb0509c9837c311bb9 (patch)
treeff333e115df60c73094cd7792afc222eae0ab0f7 /tests/auto/qml/qqmltypeloader/tst_qqmltypeloader.cpp
parentdc160f85e76d959c42f63af9dd4009228ac3e116 (diff)
Fix qqmltypeloader autotest for android
Change-Id: I7a1a3c225119c4ab972beccff68d0d4b764aab4d Task-number: QTBUG-73512 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'tests/auto/qml/qqmltypeloader/tst_qqmltypeloader.cpp')
-rw-r--r--tests/auto/qml/qqmltypeloader/tst_qqmltypeloader.cpp21
1 files changed, 18 insertions, 3 deletions
diff --git a/tests/auto/qml/qqmltypeloader/tst_qqmltypeloader.cpp b/tests/auto/qml/qqmltypeloader/tst_qqmltypeloader.cpp
index 2993b4b3c8..63a43eebad 100644
--- a/tests/auto/qml/qqmltypeloader/tst_qqmltypeloader.cpp
+++ b/tests/auto/qml/qqmltypeloader/tst_qqmltypeloader.cpp
@@ -60,10 +60,16 @@ private slots:
void implicitComponentModule();
void qrcRootPathUrl();
void implicitImport();
+
+private:
+ void checkSingleton(const QString & dataDirectory);
};
void tst_QQMLTypeLoader::testLoadComplete()
{
+#ifdef Q_OS_ANDROID
+ QSKIP("Loading dynamic plugins does not work on Android");
+#endif
QQuickView *window = new QQuickView();
window->engine()->addImportPath(QT_TESTCASE_BUILDDIR);
qDebug() << window->engine()->importPathList();
@@ -157,7 +163,7 @@ void tst_QQMLTypeLoader::trimCache3()
QCOMPARE(loader.isTypeLoaded(testFileUrl("ComponentWithIncubator.qml")), false);
}
-static void checkSingleton(const QString &dataDirectory)
+void tst_QQMLTypeLoader::checkSingleton(const QString &dataDirectory)
{
QQmlEngine engine;
engine.addImportPath(dataDirectory);
@@ -166,8 +172,8 @@ static void checkSingleton(const QString &dataDirectory)
"import QtQuick 2.6\n"
"import \"..\"\n"
"Item { property int t: ValueSource.something }",
- QUrl::fromLocalFile(dataDirectory + "/abc/Xyz.qml"));
- QCOMPARE(component.status(), QQmlComponent::Ready);
+ testFileUrl("abc/Xyz.qml"));
+ QVERIFY2(component.status() == QQmlComponent::Ready, qPrintable(component.errorString()));
QScopedPointer<QObject> o(component.create());
QVERIFY(o.data());
QCOMPARE(o->property("t").toInt(), 10);
@@ -389,6 +395,9 @@ public:
void tst_QQMLTypeLoader::intercept()
{
+#ifdef Q_OS_ANDROID
+ QSKIP("Loading dynamic plugins does not work on Android");
+#endif
qmlClearTypeRegistrations();
QQmlEngine engine;
@@ -478,6 +487,9 @@ static void checkCleanCacheLoad(const QString &testCase)
void tst_QQMLTypeLoader::multiSingletonModule()
{
+#ifdef Q_OS_ANDROID
+ QSKIP("Android seems to have problems with QProcess");
+#endif
qmlClearTypeRegistrations();
QQmlEngine engine;
engine.addImportPath(testFile("imports"));
@@ -498,6 +510,9 @@ void tst_QQMLTypeLoader::multiSingletonModule()
void tst_QQMLTypeLoader::implicitComponentModule()
{
+#ifdef Q_OS_ANDROID
+ QSKIP("Android seems to have problems with QProcess");
+#endif
QQmlEngine engine;
QQmlComponent component(&engine, testFileUrl("implicitcomponent.qml"));
QCOMPARE(component.status(), QQmlComponent::Ready);