aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2016-10-28 16:14:38 +0200
committerChristian Kandeler <christian.kandeler@qt.io>2016-10-28 14:37:20 +0000
commit6e58286b955d32d5be1381802e92fd4a7cd3a4d2 (patch)
tree7911af75f294e2b33b3ec74608d039bfbc09ac77 /tests
parent7a8a21c03b8e49e7dbf0462d2c698e960bdacbb4 (diff)
Improve autotest for generating qrc files
Aside from improving performance, commit 9cd8653eef also fixed Group- level property assignments for modules with more than one name component. We make use of that here by amending the "autoQrc" test so that it tests resources with different base directory settings, which was not possible before due to said bug. Change-Id: I76fa70c547a9608670520cbacf992d5702d8c329 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/blackbox/testdata/auto-qrc/auto-qrc.qbs21
-rw-r--r--tests/auto/blackbox/testdata/auto-qrc/main.cpp2
2 files changed, 15 insertions, 8 deletions
diff --git a/tests/auto/blackbox/testdata/auto-qrc/auto-qrc.qbs b/tests/auto/blackbox/testdata/auto-qrc/auto-qrc.qbs
index 7ad4a5798..499e8a373 100644
--- a/tests/auto/blackbox/testdata/auto-qrc/auto-qrc.qbs
+++ b/tests/auto/blackbox/testdata/auto-qrc/auto-qrc.qbs
@@ -5,16 +5,23 @@ Project {
name: "app"
files: ["main.cpp"]
- // TODO: Use two groups with different base dirs once QBS-1005 is fixed.
- Qt.core.resourceSourceBase: "qrc-base"
- Qt.core.resourcePrefix: "/thePrefix"
Group {
prefix: "qrc-base/"
- files: [
- "resource1.txt",
- "subdir/resource2.txt",
- ]
+
+ Qt.core.resourcePrefix: "/thePrefix"
+ Qt.core.resourceSourceBase: "qrc-base"
+
+ files: ["resource1.txt"]
fileTags: ["qt.core.resource_data"]
+
+ Group {
+ prefix: "qrc-base/subdir/"
+
+ Qt.core.resourceSourceBase: "qrc-base/subdir"
+
+ files: ["resource2.txt"]
+ fileTags: ["qt.core.resource_data"]
+ }
}
}
diff --git a/tests/auto/blackbox/testdata/auto-qrc/main.cpp b/tests/auto/blackbox/testdata/auto-qrc/main.cpp
index 64acf8680..bbfcd8fee 100644
--- a/tests/auto/blackbox/testdata/auto-qrc/main.cpp
+++ b/tests/auto/blackbox/testdata/auto-qrc/main.cpp
@@ -7,7 +7,7 @@ int main()
QFile resource1(":/thePrefix/resource1.txt");
if (!resource1.open(QIODevice::ReadOnly))
return 1;
- QFile resource2(":/thePrefix/subdir/resource2.txt");
+ QFile resource2(":/thePrefix/resource2.txt");
if (!resource2.open(QIODevice::ReadOnly))
return 2;
std::cout << "resource data: " << resource1.readAll().constData()