aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/blackbox
diff options
context:
space:
mode:
authorDenis Klychkov <kd.snake@gmail.com>2016-11-25 23:25:53 +0300
committerJake Petroules <jake.petroules@qt.io>2016-11-28 20:03:27 +0000
commitc6e31fc743eb7dd4bda5eae502c5ebfda59d8b3d (patch)
tree3ad4f60181b78cc087a5352aca48c3ca62506f0d /tests/auto/blackbox
parent5c1183aa377ae8de487d5541360369ebd2ee0f6b (diff)
Accurate handling of Qt.core.resourcePrefix
Previously the value of this property was taken only from the first input. That value became the only prefix for the whole qrc file. Now every unique value of resourcePrefix generates new <qresource> tag with the corresponding prefix. Change-Id: I2177b3bc38085014c41107225bcb4bd4c51ba58b Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Diffstat (limited to 'tests/auto/blackbox')
-rw-r--r--tests/auto/blackbox/testdata/auto-qrc/auto-qrc.qbs8
-rw-r--r--tests/auto/blackbox/testdata/auto-qrc/main.cpp5
-rw-r--r--tests/auto/blackbox/testdata/auto-qrc/qrc-base/subdir/resource3.txt1
3 files changed, 13 insertions, 1 deletions
diff --git a/tests/auto/blackbox/testdata/auto-qrc/auto-qrc.qbs b/tests/auto/blackbox/testdata/auto-qrc/auto-qrc.qbs
index 2d0452d49..3055e51b8 100644
--- a/tests/auto/blackbox/testdata/auto-qrc/auto-qrc.qbs
+++ b/tests/auto/blackbox/testdata/auto-qrc/auto-qrc.qbs
@@ -20,6 +20,14 @@ Project {
Qt.core.resourceSourceBase: "qrc-base/subdir"
files: ["resource2.txt"]
+
+ Group {
+ prefix: "qrc-base/subdir/"
+
+ Qt.core.resourcePrefix: "/theOtherPrefix"
+
+ files: ["resource3.txt"]
+ }
}
}
}
diff --git a/tests/auto/blackbox/testdata/auto-qrc/main.cpp b/tests/auto/blackbox/testdata/auto-qrc/main.cpp
index bbfcd8fee..53a33854d 100644
--- a/tests/auto/blackbox/testdata/auto-qrc/main.cpp
+++ b/tests/auto/blackbox/testdata/auto-qrc/main.cpp
@@ -10,6 +10,9 @@ int main()
QFile resource2(":/thePrefix/resource2.txt");
if (!resource2.open(QIODevice::ReadOnly))
return 2;
+ QFile resource3(":/theOtherPrefix/resource3.txt");
+ if (!resource3.open(QIODevice::ReadOnly))
+ return 3;
std::cout << "resource data: " << resource1.readAll().constData()
- << resource2.readAll().constData() << std::endl;
+ << resource2.readAll().constData() << resource3.readAll().constData() << std::endl;
}
diff --git a/tests/auto/blackbox/testdata/auto-qrc/qrc-base/subdir/resource3.txt b/tests/auto/blackbox/testdata/auto-qrc/qrc-base/subdir/resource3.txt
new file mode 100644
index 000000000..6df9761da
--- /dev/null
+++ b/tests/auto/blackbox/testdata/auto-qrc/qrc-base/subdir/resource3.txt
@@ -0,0 +1 @@
+resource3