diff --git a/src/plugins/modeleditor/extpropertiesmview.cpp b/src/plugins/modeleditor/extpropertiesmview.cpp index a6bf554287a..1c76398dee0 100644 --- a/src/plugins/modeleditor/extpropertiesmview.cpp +++ b/src/plugins/modeleditor/extpropertiesmview.cpp @@ -67,7 +67,7 @@ void ExtPropertiesMView::visitMPackage(const qmt::MPackage *package) m_configPath->setInitialBrowsePathBackup( Utils::FilePath::fromString(project->fileName()).absolutePath()); addRow(tr("Config path:"), m_configPath, "configpath"); - connect(m_configPath, &Utils::PathChooser::pathChanged, + connect(m_configPath, &Utils::PathChooser::filePathChanged, this, &ExtPropertiesMView::onConfigPathChanged); } if (!m_configPath->hasFocus()) { @@ -86,7 +86,7 @@ void ExtPropertiesMView::visitMPackage(const qmt::MPackage *package) } } -void ExtPropertiesMView::onConfigPathChanged(const QString &path) +void ExtPropertiesMView::onConfigPathChanged(const Utils::FilePath &path) { bool modified = false; qmt::Project *project = m_projectController->project(); @@ -98,7 +98,7 @@ void ExtPropertiesMView::onConfigPathChanged(const QString &path) } } else { // make path relative to current project's directory - QFileInfo absConfigPath(path); + QFileInfo absConfigPath = path.toFileInfo(); absConfigPath.makeAbsolute(); QDir projectDir = QFileInfo(project->fileName()).dir(); QString configPath = projectDir.relativeFilePath(absConfigPath.filePath()); diff --git a/src/plugins/modeleditor/extpropertiesmview.h b/src/plugins/modeleditor/extpropertiesmview.h index f9f2564ce2e..55563d1aa5e 100644 --- a/src/plugins/modeleditor/extpropertiesmview.h +++ b/src/plugins/modeleditor/extpropertiesmview.h @@ -28,7 +28,11 @@ #include "qmt/model_widgets_ui/propertiesviewmview.h" namespace qmt { class ProjectController; } -namespace Utils { class PathChooser; } + +namespace Utils { +class FilePath; +class PathChooser; +} // Utils namespace ModelEditor { namespace Internal { @@ -46,7 +50,7 @@ public: void visitMPackage(const qmt::MPackage *package) override; private: - void onConfigPathChanged(const QString &path); + void onConfigPathChanged(const Utils::FilePath &path); private: qmt::ProjectController *m_projectController = nullptr;