From 669d9ede547e3fd970cea34888dc7979d3341744 Mon Sep 17 00:00:00 2001 From: BogDan Vatra Date: Sun, 22 Mar 2015 11:44:50 +0200 Subject: [PATCH] Clenaup handleRunControlFinished. handleRunControlFinished was already handled in ProjectExplorerPlugin::initialize and it just emit updateRunActions signal. There is no need to call a function just to emit a signal as long as "connect" can do it for us. Change-Id: I58e759eb9101b65e6faa117f5157c63f69b18ea9 Reviewed-by: Daniel Teske --- src/plugins/projectexplorer/projectexplorer.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/plugins/projectexplorer/projectexplorer.cpp b/src/plugins/projectexplorer/projectexplorer.cpp index 67b5420a005..5f429755ad3 100644 --- a/src/plugins/projectexplorer/projectexplorer.cpp +++ b/src/plugins/projectexplorer/projectexplorer.cpp @@ -288,7 +288,6 @@ public: void updateWelcomePage(); - void handleRunControlFinished(); void runConfigurationConfigurationFinished(); public: @@ -568,7 +567,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er connect(dd->m_outputPane, &AppOutputPane::runControlFinished, this, &ProjectExplorerPlugin::runControlFinished); connect(dd->m_outputPane, &AppOutputPane::runControlFinished, - dd, &ProjectExplorerPluginPrivate::handleRunControlFinished); + this, &ProjectExplorerPlugin::updateRunActions); addAutoReleasedObject(new AllProjectsFilter); addAutoReleasedObject(new CurrentProjectFilter); @@ -1966,11 +1965,6 @@ void ProjectExplorerPlugin::startRunControl(RunControl *runControl, RunMode runM dd->startRunControl(runControl, runMode); } -void ProjectExplorerPluginPrivate::handleRunControlFinished() -{ - emit m_instance->updateRunActions(); -} - void ProjectExplorerPluginPrivate::startRunControl(RunControl *runControl, RunMode runMode) { m_outputPane->createNewOutputWindow(runControl); @@ -1980,8 +1974,6 @@ void ProjectExplorerPluginPrivate::startRunControl(RunControl *runControl, RunMo || ((runMode == DebugRunMode || runMode == DebugRunModeWithBreakOnMain) && m_projectExplorerSettings.showDebugOutput); m_outputPane->setBehaviorOnOutput(runControl, popup ? AppOutputPane::Popup : AppOutputPane::Flash); - QObject::connect(runControl, &RunControl::finished, - this, &ProjectExplorerPluginPrivate::handleRunControlFinished); runControl->start(); emit m_instance->updateRunActions(); }