forked from qt-creator/qt-creator
QmlDesigner: Fix fixResourcePaths()
QML does not accept absolute paths (e.g. C:\working\something\) as urls. We need the file:/// prefix. Change-Id: I9df74cd9c0e730fba056af971751f8eb88cdb536 Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
This commit is contained in:
@@ -126,7 +126,7 @@ QVariant fixResourcePaths(const QVariant &value)
|
|||||||
if (QFileInfo(fixedPath).exists()) {
|
if (QFileInfo(fixedPath).exists()) {
|
||||||
fixedPath.replace(QLatin1String("//"), QLatin1String("/"));
|
fixedPath.replace(QLatin1String("//"), QLatin1String("/"));
|
||||||
fixedPath.replace(QLatin1Char('\\'), QLatin1Char('/'));
|
fixedPath.replace(QLatin1Char('\\'), QLatin1Char('/'));
|
||||||
return fixedPath;
|
return QUrl::fromLocalFile(fixedPath);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user