diff options
Diffstat (limited to 'src/plugins/qmlpreview')
-rw-r--r-- | src/plugins/qmlpreview/qmlpreviewconnectionmanager.cpp | 2 | ||||
-rw-r--r-- | src/plugins/qmlpreview/qmlpreviewfileontargetfinder.cpp | 4 | ||||
-rw-r--r-- | src/plugins/qmlpreview/qmlpreviewplugin.cpp | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/plugins/qmlpreview/qmlpreviewconnectionmanager.cpp b/src/plugins/qmlpreview/qmlpreviewconnectionmanager.cpp index 9b270478597..3cb78a01113 100644 --- a/src/plugins/qmlpreview/qmlpreviewconnectionmanager.cpp +++ b/src/plugins/qmlpreview/qmlpreviewconnectionmanager.cpp @@ -70,7 +70,7 @@ QUrl QmlPreviewConnectionManager::findValidI18nDirectoryAsUrl(const QString &loc auto tryPath = [&](const QString &postfix) { url.setPath(path + "/i18n/qml_" + postfix); bool success = false; - foundPath = m_projectFileFinder.findFile(url, &success).constFirst().toString(); + foundPath = m_projectFileFinder.findFile(url, &success).constFirst().toUrlishString(); foundPath = foundPath.left(qMax(0, foundPath.lastIndexOf("/i18n"))); return success; }; 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) { diff --git a/src/plugins/qmlpreview/qmlpreviewplugin.cpp b/src/plugins/qmlpreview/qmlpreviewplugin.cpp index c60225607a8..1661136c32a 100644 --- a/src/plugins/qmlpreview/qmlpreviewplugin.cpp +++ b/src/plugins/qmlpreview/qmlpreviewplugin.cpp @@ -340,7 +340,7 @@ void QmlPreviewPlugin::previewCurrentFile() Tr::tr("Start the QML Preview for the project before selecting " "a specific file for preview.")); - const QString file = currentNode->filePath().toString(); + const QString file = currentNode->filePath().toUrlishString(); if (file != d->m_previewedFile) setPreviewedFile(file); else @@ -459,7 +459,7 @@ void QmlPreviewPluginPrivate::checkEditor() dialect = QmlJS::Dialect::QmlQtQuick2Ui; else dialect = QmlJS::Dialect::NoLanguage; - checkDocument(doc->filePath().toString(), doc->contents(), dialect); + checkDocument(doc->filePath().toUrlishString(), doc->contents(), dialect); } void QmlPreviewPluginPrivate::checkFile(const QString &fileName) |