diff options
Diffstat (limited to 'src/plugins/modeleditor/pxnodeutilities.cpp')
-rw-r--r-- | src/plugins/modeleditor/pxnodeutilities.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/plugins/modeleditor/pxnodeutilities.cpp b/src/plugins/modeleditor/pxnodeutilities.cpp index c9e58d5052..5b8b27c830 100644 --- a/src/plugins/modeleditor/pxnodeutilities.cpp +++ b/src/plugins/modeleditor/pxnodeutilities.cpp @@ -20,6 +20,8 @@ #include <typeinfo> +using Utils::FilePath; + namespace ModelEditor { namespace Internal { @@ -51,7 +53,8 @@ QString PxNodeUtilities::calcRelativePath(const ProjectExplorer::Node *node, ? node->filePath().toFileInfo().path() : node->filePath().toString(); - return qmt::NameController::calcRelativePath(nodePath, anchorFolder); + return qmt::NameController::calcRelativePath(FilePath::fromString(nodePath), + FilePath::fromString(anchorFolder)).toString(); } QString PxNodeUtilities::calcRelativePath(const QString &filePath, const QString &anchorFolder) @@ -63,7 +66,8 @@ QString PxNodeUtilities::calcRelativePath(const QString &filePath, const QString path = fileInfo.path(); else path = filePath; - return qmt::NameController::calcRelativePath(path, anchorFolder); + return qmt::NameController::calcRelativePath(FilePath::fromString(path), + FilePath::fromString(anchorFolder)).toString(); } qmt::MPackage *PxNodeUtilities::createBestMatchingPackagePath( @@ -218,7 +222,7 @@ bool PxNodeUtilities::isProxyHeader(const QString &file) const { CPlusPlus::Snapshot snapshot = CppEditor::CppModelManager::snapshot(); - CPlusPlus::Document::Ptr document = snapshot.document(Utils::FilePath::fromString(file)); + CPlusPlus::Document::Ptr document = snapshot.document(FilePath::fromString(file)); if (document) { QList<CPlusPlus::Document::Include> includes = document->resolvedIncludes(); if (includes.count() != 1) |