summaryrefslogtreecommitdiff
path: root/src/plugins/projectexplorer
diff options
context:
space:
mode:
authorOrgad Shaneh <orgad.shaneh@audiocodes.com>2015-01-19 10:44:30 +0200
committerOrgad Shaneh <orgads@gmail.com>2015-02-02 09:09:50 +0000
commitf99e2570fb0df4537e25ddfe1cb0d91f69c0e20c (patch)
tree32d288f234b09834934226bb38422e8573a1a839 /src/plugins/projectexplorer
parent349f4150672d98ce13c0c5c2232582210451e01e (diff)
downloadqt-creator-f99e2570fb0df4537e25ddfe1cb0d91f69c0e20c.tar.gz
Support multiple instances listening for debug output...
... only not simultaneously Task-number: QTCREATORBUG-3443 Change-Id: Ie88ee305a1ad134d81a19cece42f7fd81fc08f16 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Diffstat (limited to 'src/plugins/projectexplorer')
-rw-r--r--src/plugins/projectexplorer/appoutputpane.cpp6
-rw-r--r--src/plugins/projectexplorer/windebuginterface.cpp13
-rw-r--r--src/plugins/projectexplorer/windebuginterface.h2
3 files changed, 17 insertions, 4 deletions
diff --git a/src/plugins/projectexplorer/appoutputpane.cpp b/src/plugins/projectexplorer/appoutputpane.cpp
index 14436cbc27..d44ba304cf 100644
--- a/src/plugins/projectexplorer/appoutputpane.cpp
+++ b/src/plugins/projectexplorer/appoutputpane.cpp
@@ -33,6 +33,7 @@
#include "projectexplorersettings.h"
#include "runconfiguration.h"
#include "session.h"
+#include "windebuginterface.h"
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/coreconstants.h>
@@ -203,6 +204,11 @@ AppOutputPane::AppOutputPane() :
this, SLOT(aboutToUnloadSession()));
connect(ProjectExplorerPlugin::instance(), SIGNAL(settingsChanged()),
this, SLOT(updateFromSettings()));
+
+#ifdef Q_OS_WIN
+ connect(this, &AppOutputPane::allRunControlsFinished,
+ WinDebugInterface::instance(), &WinDebugInterface::stop);
+#endif
}
AppOutputPane::~AppOutputPane()
diff --git a/src/plugins/projectexplorer/windebuginterface.cpp b/src/plugins/projectexplorer/windebuginterface.cpp
index 60a616dc52..293b533f7e 100644
--- a/src/plugins/projectexplorer/windebuginterface.cpp
+++ b/src/plugins/projectexplorer/windebuginterface.cpp
@@ -56,20 +56,25 @@ WinDebugInterface *WinDebugInterface::instance()
return m_instance;
}
+bool WinDebugInterface::stop()
+{
+ if (!m_waitHandles[TerminateEventHandle])
+ return false;
+ SetEvent(m_waitHandles[TerminateEventHandle]);
+ return true;
+}
+
WinDebugInterface::WinDebugInterface(QObject *parent) :
QThread(parent)
{
m_instance = this;
setObjectName(QLatin1String("WinDebugInterfaceThread"));
- start();
}
WinDebugInterface::~WinDebugInterface()
{
- if (m_waitHandles[TerminateEventHandle]) {
- SetEvent(m_waitHandles[TerminateEventHandle]);
+ if (stop())
wait(500);
- }
m_instance = 0;
}
diff --git a/src/plugins/projectexplorer/windebuginterface.h b/src/plugins/projectexplorer/windebuginterface.h
index 4ee7474ee8..58a62e0aef 100644
--- a/src/plugins/projectexplorer/windebuginterface.h
+++ b/src/plugins/projectexplorer/windebuginterface.h
@@ -46,6 +46,8 @@ public:
static WinDebugInterface *instance();
+ bool stop();
+
signals:
void debugOutput(qint64 pid, const QString &message);
void cannotRetrieveDebugOutput();