aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qmlprofiler/qmlprofilertool.cpp
diff options
context:
space:
mode:
authorhjk <[email protected]>2021-04-06 16:44:18 +0200
committerhjk <[email protected]>2021-04-12 11:29:16 +0000
commit8eb74080ab387dc4c10fa222b9d73844cc5d6c3f (patch)
tree3a02f32dc088c8a1ed3fb5e42444e94bcc26a32c /src/plugins/qmlprofiler/qmlprofilertool.cpp
parentb88b73d9c1b9fb4c1da4ab8ad85fbcad05512668 (diff)
QmlProfiler: Aspectify settings
Only four simple values. Adapting qmlprofilerconfigwidget_test did not seem desirable, as in the aspectified state this is hidden in the base aspects implementations. Change-Id: I933a8ca065169c61b7f25f109e0b7a0e6d21cb33 Reviewed-by: Christian Stenger <[email protected]>
Diffstat (limited to 'src/plugins/qmlprofiler/qmlprofilertool.cpp')
-rw-r--r--src/plugins/qmlprofiler/qmlprofilertool.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/plugins/qmlprofiler/qmlprofilertool.cpp b/src/plugins/qmlprofiler/qmlprofilertool.cpp
index c41076ede98..3d49dbd59d5 100644
--- a/src/plugins/qmlprofiler/qmlprofilertool.cpp
+++ b/src/plugins/qmlprofiler/qmlprofilertool.cpp
@@ -314,9 +314,9 @@ void QmlProfilerTool::finalizeRunControl(QmlProfilerRunner *runWorker)
if (auto aspect = static_cast<QmlProfilerRunConfigurationAspect *>(
runControl->aspect(Constants::SETTINGS))) {
if (auto settings = static_cast<const QmlProfilerSettings *>(aspect->currentSettings())) {
- d->m_profilerConnections->setFlushInterval(settings->flushEnabled() ?
- settings->flushInterval() : 0);
- d->m_profilerModelManager->setAggregateTraces(settings->aggregateTraces());
+ d->m_profilerConnections->setFlushInterval(settings->flushEnabled.value() ?
+ settings->flushInterval.value() : 0);
+ d->m_profilerModelManager->setAggregateTraces(settings->aggregateTraces.value());
}
}
@@ -589,8 +589,8 @@ void QmlProfilerTool::showErrorDialog(const QString &error)
void saveLastTraceFile(const QString &filename)
{
QmlProfilerSettings *settings = QmlProfilerPlugin::globalSettings();
- if (filename != settings->lastTraceFile()) {
- settings->setLastTraceFile(filename);
+ if (filename != settings->lastTraceFile.value()) {
+ settings->lastTraceFile.setValue(filename);
settings->writeGlobalSettings();
}
}
@@ -601,7 +601,7 @@ void QmlProfilerTool::showSaveDialog()
QLatin1String zFile(QztFileExtension);
QString filename = QFileDialog::getSaveFileName(
ICore::dialogParent(), tr("Save QML Trace"),
- QmlProfilerPlugin::globalSettings()->lastTraceFile(),
+ QmlProfilerPlugin::globalSettings()->lastTraceFile.value(),
tr("QML traces (*%1 *%2)").arg(zFile).arg(tFile));
if (!filename.isEmpty()) {
if (!filename.endsWith(zFile) && !filename.endsWith(tFile))
@@ -625,7 +625,7 @@ void QmlProfilerTool::showLoadDialog()
QLatin1String zFile(QztFileExtension);
QString filename = QFileDialog::getOpenFileName(
ICore::dialogParent(), tr("Load QML Trace"),
- QmlProfilerPlugin::globalSettings()->lastTraceFile(),
+ QmlProfilerPlugin::globalSettings()->lastTraceFile.value(),
tr("QML traces (*%1 *%2)").arg(zFile).arg(tFile));
if (!filename.isEmpty()) {