diff options
author | Kai Koehne <kai.koehne@nokia.com> | 2011-10-15 11:52:03 +0200 |
---|---|---|
committer | Kai Koehne <kai.koehne@nokia.com> | 2011-10-17 15:05:19 +0200 |
commit | 655e6faae8039b7f0f0a9239658d0d27ad6ef32e (patch) | |
tree | b6cda94f1057b7011280665a2778b2890292e6a9 /src/plugins/qmlprofiler | |
parent | a9eb880353ce6b07bab5b57b0663fbe714066907 (diff) | |
download | qt-creator-655e6faae8039b7f0f0a9239658d0d27ad6ef32e.tar.gz |
QmlProfiler: Keep configuration of attach dialog
Change-Id: If9f4918a77c874c82fec63eacf1464b78b5d82ac
Reviewed-by: Christiaan Janssen <christiaan.janssen@nokia.com>
Diffstat (limited to 'src/plugins/qmlprofiler')
-rw-r--r-- | src/plugins/qmlprofiler/qmlprofilertool.cpp | 31 |
1 files changed, 26 insertions, 5 deletions
diff --git a/src/plugins/qmlprofiler/qmlprofilertool.cpp b/src/plugins/qmlprofiler/qmlprofilertool.cpp index 1c2dfe6640..6b12dd2982 100644 --- a/src/plugins/qmlprofiler/qmlprofilertool.cpp +++ b/src/plugins/qmlprofiler/qmlprofilertool.cpp @@ -489,15 +489,36 @@ void QmlProfilerTool::clearDisplay() static void startRemoteTool(IAnalyzerTool *tool, StartMode mode) { Q_UNUSED(tool); - QmlProfilerAttachDialog dialog; - if (dialog.exec() != QDialog::Accepted) - return; + + QString host; + quint16 port; + + { + QSettings *settings = Core::ICore::instance()->settings(); + + host = settings->value(QLatin1String("AnalyzerQmlAttachDialog/host"), QLatin1String("localhost")).toString(); + port = settings->value(QLatin1String("AnalyzerQmlAttachDialog/port"), 3768).toInt(); + + QmlProfilerAttachDialog dialog; + + dialog.setAddress(host); + dialog.setPort(port); + + if (dialog.exec() != QDialog::Accepted) + return; + + host = dialog.address(); + port = dialog.port(); + + settings->setValue(QLatin1String("AnalyzerQmlAttachDialog/host"), host); + settings->setValue(QLatin1String("AnalyzerQmlAttachDialog/port"), port); + } AnalyzerStartParameters sp; sp.toolId = tool->id(); sp.startMode = mode; - sp.connParams.host = dialog.address(); - sp.connParams.port = dialog.port(); + sp.connParams.host = host; + sp.connParams.port = port; AnalyzerRunControl *rc = new AnalyzerRunControl(tool, sp, 0); QObject::connect(AnalyzerManager::stopAction(), SIGNAL(triggered()), rc, SLOT(stopIt())); |