Commit bd3f39a3 authored by Oswald Buddenhagen's avatar Oswald Buddenhagen

accept absolute paths in qrc file elements

while untypical, it's perfectly legitimate to have absolute paths in qrc
files. auto-generated files (like the ones created by resources.prf when
shadow-building) can make good use of them.

Change-Id: I59da260b5241096f7c44b9de5ee04f65e8c1218c
Reviewed-by: Tobias Hunger's avatarTobias Hunger <>
parent 7754606b
......@@ -271,6 +271,7 @@ QrcParserPrivate::QrcParserPrivate(QrcParser *)
bool QrcParserPrivate::parseFile(const QString &path)
QDir baseDir(QFileInfo(path).path());
QFile file(path);
if (! {
......@@ -304,9 +305,8 @@ bool QrcParserPrivate::parseFile(const QString &path)
QDomElement felt = relt.firstChildElement(QLatin1String("file"));
for (; !felt.isNull(); felt = felt.nextSiblingElement(QLatin1String("file"))) {
const QString fileName = felt.text();
const QString alias = felt.attribute(QLatin1String("alias"));
QString filePath = QFileInfo(path).path() + QLatin1Char('/') + fileName;
QString filePath = baseDir.absoluteFilePath(fileName);
QString accessPath;
if (!alias.isEmpty())
accessPath = language + prefix + alias;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment