aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qmlpreview/qmlpreviewfileontargetfinder.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/qmlpreview/qmlpreviewfileontargetfinder.cpp')
-rw-r--r--src/plugins/qmlpreview/qmlpreviewfileontargetfinder.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/qmlpreview/qmlpreviewfileontargetfinder.cpp b/src/plugins/qmlpreview/qmlpreviewfileontargetfinder.cpp
index e1e2ca05f3e..cd7beaf7e79 100644
--- a/src/plugins/qmlpreview/qmlpreviewfileontargetfinder.cpp
+++ b/src/plugins/qmlpreview/qmlpreviewfileontargetfinder.cpp
@@ -48,7 +48,7 @@ QString QmlPreviewFileOnTargetFinder::findPath(const QString &filePath, bool *su
// Try the current node first. It's likely that this is the one we're looking for and if there
// is any ambiguity (same file mapped to multiple qrc paths) it should take precedence.
ProjectExplorer::Node *currentNode = ProjectExplorer::ProjectTree::currentNode();
- if (currentNode && currentNode->filePath().toString() == filePath) {
+ if (currentNode && currentNode->filePath().toUrlishString() == filePath) {
const QString path = resourceNodePath(currentNode);
if (!path.isEmpty())
return path;
@@ -58,7 +58,7 @@ QString QmlPreviewFileOnTargetFinder::findPath(const QString &filePath, bool *su
if (ProjectExplorer::ProjectNode *rootNode = project->rootProjectNode()) {
const QList<ProjectExplorer::Node *> nodes = rootNode->findNodes(
[&](ProjectExplorer::Node *node) {
- return node->filePath().toString() == filePath;
+ return node->filePath().toUrlishString() == filePath;
});
for (const ProjectExplorer::Node *node : nodes) {