aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qmlcachegen/tst_qmlcachegen.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2018-03-26 13:24:43 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2018-03-27 18:44:32 +0000
commite09a02fac0d1ecbffeebcb2012ecc659c8986a4e (patch)
tree3a78fa3f024ff606204cacb947f83e9e7df32dd4 /tests/auto/qml/qmlcachegen/tst_qmlcachegen.cpp
parent3ae0e1504e94e5c531fa5e919cc8e9f503a5bd34 (diff)
Fix CONFIG+=qtquickcompiler with paths that contain spaces
Map spaces to underscores as well. Task-number: QTBUG-54683 Change-Id: Id73c086a2845111623df631c06733ba2b42249e0 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Diffstat (limited to 'tests/auto/qml/qmlcachegen/tst_qmlcachegen.cpp')
-rw-r--r--tests/auto/qml/qmlcachegen/tst_qmlcachegen.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/auto/qml/qmlcachegen/tst_qmlcachegen.cpp b/tests/auto/qml/qmlcachegen/tst_qmlcachegen.cpp
index 1c05005c90..5c1692f086 100644
--- a/tests/auto/qml/qmlcachegen/tst_qmlcachegen.cpp
+++ b/tests/auto/qml/qmlcachegen/tst_qmlcachegen.cpp
@@ -52,6 +52,8 @@ private slots:
void versionChecksForAheadOfTimeUnits();
void workerScripts();
+
+ void trickyPaths();
};
// A wrapper around QQmlComponent to ensure the temporary reference counts
@@ -402,6 +404,18 @@ void tst_qmlcachegen::functionExpressions()
QCOMPARE(obj->property("h_connections_handler_called").toBool(), true);
}
+void tst_qmlcachegen::trickyPaths()
+{
+ QString pathWithSpaces(QStringLiteral(":/directory with spaces/file name with spaces.qml"));
+ QVERIFY2(QFile::exists(pathWithSpaces), qPrintable(pathWithSpaces));
+ QCOMPARE(QFileInfo(pathWithSpaces).size(), 0);
+ QQmlEngine engine;
+ QQmlComponent component(&engine, QUrl("qrc" + pathWithSpaces));
+ QScopedPointer<QObject> obj(component.create());
+ QVERIFY(!obj.isNull());
+ QCOMPARE(obj->property("success").toInt(), 42);
+}
+
QTEST_GUILESS_MAIN(tst_qmlcachegen)
#include "tst_qmlcachegen.moc"