diff options
author | hjk <hjk@qt.io> | 2018-05-29 14:23:07 +0200 |
---|---|---|
committer | hjk <hjk@qt.io> | 2018-05-29 14:30:22 +0000 |
commit | 772098c7106a41e35a773afa455a4bed2d8598b6 (patch) | |
tree | 9fe7072370b0d7737030db30b14a0828fb79f457 /src/plugins/projectexplorer/appoutputpane.cpp | |
parent | bb28b10add34e8a66cde77beb66242892a7fd08a (diff) |
Inline RunControl::canReUseOutputPane into its only caller
Change-Id: I2e858ab3bf715b41c26cfb6246d470787d003e3c
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Diffstat (limited to 'src/plugins/projectexplorer/appoutputpane.cpp')
-rw-r--r-- | src/plugins/projectexplorer/appoutputpane.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/plugins/projectexplorer/appoutputpane.cpp b/src/plugins/projectexplorer/appoutputpane.cpp index d6644e1255..3a27db8553 100644 --- a/src/plugins/projectexplorer/appoutputpane.cpp +++ b/src/plugins/projectexplorer/appoutputpane.cpp @@ -411,8 +411,15 @@ void AppOutputPane::createNewOutputWindow(RunControl *rc) this, &AppOutputPane::appendMessage); // First look if we can reuse a tab - const int tabIndex = Utils::indexOf(m_runControlTabs, [rc](const RunControlTab &tab) { - return rc->canReUseOutputPane(tab.runControl); + const Runnable thisRunnable = rc->runnable(); + const int tabIndex = Utils::indexOf(m_runControlTabs, [&](const RunControlTab &tab) { + if (!tab.runControl || tab.runControl->isRunning()) + return false; + const Runnable otherRunnable = tab.runControl->runnable(); + return thisRunnable.executable == otherRunnable.executable + && thisRunnable.commandLineArguments == otherRunnable.commandLineArguments + && thisRunnable.workingDirectory == otherRunnable.workingDirectory + && thisRunnable.environment == otherRunnable.environment; }); if (tabIndex != -1) { RunControlTab &tab = m_runControlTabs[tabIndex]; |