aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qmlprofiler/qmlprofilertool.cpp
diff options
context:
space:
mode:
authorhjk <[email protected]>2023-07-20 09:09:47 +0200
committerhjk <[email protected]>2023-07-21 06:38:30 +0000
commit81f8a3fd7d13bdfa6610b259df44aa0ef993a8f4 (patch)
tree17d0e368b716bea01ebbdf712fd95b46083d8baa /src/plugins/qmlprofiler/qmlprofilertool.cpp
parent012f926f7c28e34eadfe93f1365d63f0a11b4c80 (diff)
QmlProfiler: Move to new settings setup also for project settings
Change-Id: I204f052ddbc2956ff3bca8e6faaf2f758e4fee17 Reviewed-by: Christian Stenger <[email protected]> Reviewed-by: <[email protected]>
Diffstat (limited to 'src/plugins/qmlprofiler/qmlprofilertool.cpp')
-rw-r--r--src/plugins/qmlprofiler/qmlprofilertool.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/plugins/qmlprofiler/qmlprofilertool.cpp b/src/plugins/qmlprofiler/qmlprofilertool.cpp
index f5ade253be3..c8e38d100f6 100644
--- a/src/plugins/qmlprofiler/qmlprofilertool.cpp
+++ b/src/plugins/qmlprofiler/qmlprofilertool.cpp
@@ -566,10 +566,10 @@ void QmlProfilerTool::showErrorDialog(const QString &error)
static void saveLastTraceFile(const FilePath &filePath)
{
- QmlProfilerSettings *settings = QmlProfilerPlugin::globalSettings();
- if (filePath != settings->lastTraceFile()) {
- settings->lastTraceFile.setValue(filePath);
- settings->writeGlobalSettings();
+ QmlProfilerSettings &s = globalSettings();
+ if (filePath != s.lastTraceFile()) {
+ s.lastTraceFile.setValue(filePath);
+ s.writeSettings();
}
}
@@ -579,7 +579,7 @@ void QmlProfilerTool::showSaveDialog()
QLatin1String zFile(QztFileExtension);
FilePath filePath = FileUtils::getSaveFilePath(
nullptr, Tr::tr("Save QML Trace"),
- QmlProfilerPlugin::globalSettings()->lastTraceFile(),
+ 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(),
+ globalSettings().lastTraceFile(),
Tr::tr("QML traces (*%1 *%2)").arg(zFile).arg(tFile));
if (!filePath.isEmpty()) {