From d0d1e1af1f148c820637ae3d79d9632659b13fbe Mon Sep 17 00:00:00 2001 From: hjk Date: Thu, 29 Jun 2023 17:21:18 +0200 Subject: [PATCH] A few more direct FilePathAspect value accesses Task-number: QTCREATORBUG-29167 Change-Id: I8eba582303c16dddbdb5cea5bce43f048bac06b7 Reviewed-by: Christian Stenger --- src/plugins/python/pythonwizardpage.cpp | 4 ++-- src/plugins/qmlprofiler/qmlprofilertool.cpp | 6 +++--- src/plugins/terminal/terminalwidget.cpp | 2 +- src/plugins/valgrind/valgrindsettings.cpp | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/plugins/python/pythonwizardpage.cpp b/src/plugins/python/pythonwizardpage.cpp index 4a8fb800c70..f74e5a90b72 100644 --- a/src/plugins/python/pythonwizardpage.cpp +++ b/src/plugins/python/pythonwizardpage.cpp @@ -132,7 +132,7 @@ void PythonWizardPage::initializePage() const FilePath projectDir = FilePath::fromString(wiz->property("ProjectDirectory").toString()); m_createVenv.setValue(!projectDir.isEmpty()); - if (m_venvPath.filePath().isEmpty()) + if (m_venvPath().isEmpty()) m_venvPath.setValue(projectDir.isEmpty() ? FilePath{} : projectDir / "venv"); updateInterpreters(); @@ -171,7 +171,7 @@ void PythonWizardPage::setupProject(const JsonWizard::GeneratorFiles &files) } } }; - PythonSettings::createVirtualEnvironment(m_venvPath.filePath(), + PythonSettings::createVirtualEnvironment(m_venvPath(), interpreter, openProjectWithInterpreter, project ? project->displayName() diff --git a/src/plugins/qmlprofiler/qmlprofilertool.cpp b/src/plugins/qmlprofiler/qmlprofilertool.cpp index e84a27531af..c87562e3f9b 100644 --- a/src/plugins/qmlprofiler/qmlprofilertool.cpp +++ b/src/plugins/qmlprofiler/qmlprofilertool.cpp @@ -567,7 +567,7 @@ void QmlProfilerTool::showErrorDialog(const QString &error) static void saveLastTraceFile(const FilePath &filePath) { QmlProfilerSettings *settings = QmlProfilerPlugin::globalSettings(); - if (filePath != settings->lastTraceFile.filePath()) { + if (filePath != settings->lastTraceFile()) { settings->lastTraceFile.setValue(filePath); settings->writeGlobalSettings(); } @@ -579,7 +579,7 @@ void QmlProfilerTool::showSaveDialog() QLatin1String zFile(QztFileExtension); FilePath filePath = FileUtils::getSaveFilePath( nullptr, Tr::tr("Save QML Trace"), - QmlProfilerPlugin::globalSettings()->lastTraceFile.filePath(), + QmlProfilerPlugin::globalSettings()->lastTraceFile(), Tr::tr("QML traces (*%1 *%2)").arg(zFile).arg(tFile)); if (!filePath.isEmpty()) { if (!filePath.endsWith(zFile) && !filePath.endsWith(tFile)) @@ -603,7 +603,7 @@ void QmlProfilerTool::showLoadDialog() QLatin1String zFile(QztFileExtension); FilePath filePath = FileUtils::getOpenFilePath( nullptr, Tr::tr("Load QML Trace"), - QmlProfilerPlugin::globalSettings()->lastTraceFile.filePath(), + QmlProfilerPlugin::globalSettings()->lastTraceFile(), Tr::tr("QML traces (*%1 *%2)").arg(zFile).arg(tFile)); if (!filePath.isEmpty()) { diff --git a/src/plugins/terminal/terminalwidget.cpp b/src/plugins/terminal/terminalwidget.cpp index 4b6442753e1..de464b326cb 100644 --- a/src/plugins/terminal/terminalwidget.cpp +++ b/src/plugins/terminal/terminalwidget.cpp @@ -142,7 +142,7 @@ void TerminalWidget::setupPty() m_process = std::make_unique(); CommandLine shellCommand = m_openParameters.shellCommand.value_or( - CommandLine{TerminalSettings::instance().shell.filePath(), + CommandLine{TerminalSettings::instance().shell(), TerminalSettings::instance().shellArguments.value(), CommandLine::Raw}); diff --git a/src/plugins/valgrind/valgrindsettings.cpp b/src/plugins/valgrind/valgrindsettings.cpp index 1dbcef72035..6140760b283 100644 --- a/src/plugins/valgrind/valgrindsettings.cpp +++ b/src/plugins/valgrind/valgrindsettings.cpp @@ -64,7 +64,7 @@ void SuppressionAspectPrivate::slotAddSuppression() const FilePaths files = FileUtils::getOpenFilePaths(nullptr, Tr::tr("Valgrind Suppression Files"), - conf->lastSuppressionDirectory.filePath(), + conf->lastSuppressionDirectory(), Tr::tr("Valgrind Suppression File (*.supp);;All Files (*)")); //dialog.setHistory(conf->lastSuppressionDialogHistory()); if (!files.isEmpty()) {