Utils: filepathify pathchooser

Change-Id: Ib8e8493a5f7883bead353f015ef476ba0bfc3e0e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
David Schulz
2021-06-08 14:10:12 +02:00
parent 4899e133c9
commit 0e6a4e757c
7 changed files with 25 additions and 32 deletions

View File

@@ -64,7 +64,8 @@ void ExtPropertiesMView::visitMPackage(const qmt::MPackage *package)
m_configPath->setValidationFunction([=](Utils::FancyLineEdit *edit, QString *errorMessage) {
return edit->text().isEmpty() || m_configPath->defaultValidationFunction()(edit, errorMessage);
});
m_configPath->setInitialBrowsePathBackup(QFileInfo(project->fileName()).absolutePath());
m_configPath->setInitialBrowsePathBackup(
Utils::FilePath::fromString(project->fileName()).absolutePath());
addRow(tr("Config path:"), m_configPath, "configpath");
connect(m_configPath, &Utils::PathChooser::pathChanged,
this, &ExtPropertiesMView::onConfigPathChanged);