A few more direct FilePathAspect value accesses

Task-number: QTCREATORBUG-29167
Change-Id: I8eba582303c16dddbdb5cea5bce43f048bac06b7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
hjk
2023-06-29 17:21:18 +02:00
parent 2cc4967451
commit d0d1e1af1f
4 changed files with 7 additions and 7 deletions

View File

@@ -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()) {