diff options
author | Kai Koehne <kai.koehne@nokia.com> | 2011-04-04 15:56:34 +0200 |
---|---|---|
committer | Kai Koehne <kai.koehne@nokia.com> | 2011-04-04 15:59:31 +0200 |
commit | 64fee9c5cb7f067880e0618c29e6ab5c479aebdf (patch) | |
tree | 473281eedb58996a36ededba17d63800861bb5bc /src/plugins/qmlprofiler | |
parent | 12a02c75341745777487574775b299193af6c2d7 (diff) | |
download | qt-creator-64fee9c5cb7f067880e0618c29e6ab5c479aebdf.tar.gz |
QmlProfiler: Enable attach action only if profiler is current tool
Diffstat (limited to 'src/plugins/qmlprofiler')
-rw-r--r-- | src/plugins/qmlprofiler/qmlprofilertool.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/plugins/qmlprofiler/qmlprofilertool.cpp b/src/plugins/qmlprofiler/qmlprofilertool.cpp index 3a4b858baf..5c93421223 100644 --- a/src/plugins/qmlprofiler/qmlprofilertool.cpp +++ b/src/plugins/qmlprofiler/qmlprofilertool.cpp @@ -204,6 +204,11 @@ void QmlProfilerTool::initialize(ExtensionSystem::IPlugin */*plugin*/) command->setAttribute(Core::Command::CA_UpdateText); manalyzer->addAction(command, Analyzer::Constants::G_ANALYZER_STARTSTOP); connect(d->m_attachAction, SIGNAL(triggered()), this, SLOT(attach())); + + Analyzer::AnalyzerManager *analyzerMgr = Analyzer::AnalyzerManager::instance(); + connect(analyzerMgr, SIGNAL(currentToolChanged(Analyzer::IAnalyzerTool*)), + this, SLOT(updateAttachAction())); + updateAttachAction(); } @@ -344,4 +349,7 @@ void QmlProfilerTool::updateAttachAction() d->m_attachAction->setText(tr("Attach...")); } } + + d->m_attachAction->setEnabled(Analyzer::AnalyzerManager::instance()->currentTool() == this); } + |