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:
Thomas Hartmann
2016-06-29 12:19:48 +02:00
parent e6be4484a6
commit a63c431916

View File

@@ -126,7 +126,7 @@ QVariant fixResourcePaths(const QVariant &value)
if (QFileInfo(fixedPath).exists()) {
fixedPath.replace(QLatin1String("//"), QLatin1String("/"));
fixedPath.replace(QLatin1Char('\\'), QLatin1Char('/'));
return fixedPath;
return QUrl::fromLocalFile(fixedPath);
}
}
}