diff options
author | Kai Koehne <kai.koehne@nokia.com> | 2011-06-28 12:40:25 +0200 |
---|---|---|
committer | Tobias Hunger <tobias.hunger@nokia.com> | 2011-06-28 13:48:01 +0200 |
commit | 7827af971289d8ae7a84b6c3a84137ae24cf530d (patch) | |
tree | 43cad89a7cba1427590a2813c6d6d5f93abc8a14 /src/plugins/projectexplorer/applicationlauncher.cpp | |
parent | 2d4b5fcb65b83e404516f82c53d55a1dd5f05173 (diff) | |
download | qt-creator-7827af971289d8ae7a84b6c3a84137ae24cf530d.tar.gz |
Windows/DebugOutput: Check that only one process reads output
Only one process can attach to the system wide application output
buffer. Re-add checks that makes sure we don't try to attach
as second one.
Change-Id: Ic50b43b8d0ac58d792075b59ecb3e490fdb75df8
Reviewed-on: http://codereview.qt.nokia.com/827
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
Diffstat (limited to 'src/plugins/projectexplorer/applicationlauncher.cpp')
-rw-r--r-- | src/plugins/projectexplorer/applicationlauncher.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/plugins/projectexplorer/applicationlauncher.cpp b/src/plugins/projectexplorer/applicationlauncher.cpp index 105e465a2f..16b2879d03 100644 --- a/src/plugins/projectexplorer/applicationlauncher.cpp +++ b/src/plugins/projectexplorer/applicationlauncher.cpp @@ -117,6 +117,8 @@ ApplicationLauncher::ApplicationLauncher(QObject *parent) this, SLOT(processStopped())); #ifdef Q_OS_WIN + connect(WinDebugInterface::instance(), SIGNAL(cannotRetrieveDebugOutput()), + this, SLOT(cannotRetrieveDebugOutput())); connect(WinDebugInterface::instance(), SIGNAL(debugOutput(qint64,QString)), this, SLOT(checkDebugOutput(qint64,QString))); #endif @@ -154,8 +156,6 @@ void ApplicationLauncher::start(Mode mode, const QString &program, const QString #ifdef Q_OS_WIN if (!WinDebugInterface::instance()->isRunning()) WinDebugInterface::instance()->start(); // Try to start listener again... - if (!WinDebugInterface::instance()->isRunning()) - emit appendMessage(msgWinCannotRetrieveDebuggingOutput(), Utils::ErrorMessageFormat); #endif d->m_currentMode = mode; @@ -247,6 +247,11 @@ void ApplicationLauncher::readStandardError() } #ifdef Q_OS_WIN +void ApplicationLauncher::cannotRetrieveDebugOutput() +{ + emit appendMessage(msgWinCannotRetrieveDebuggingOutput(), Utils::ErrorMessageFormat); +} + void ApplicationLauncher::checkDebugOutput(qint64 pid, const QString &message) { if (applicationPID() == pid) |