diff options
| author | Marco Bubke <marco.bubke@theqtcompany.com> | 2014-11-25 13:08:18 +0100 |
|---|---|---|
| committer | hjk <hjk121@nokiamail.com> | 2014-12-08 12:02:07 +0100 |
| commit | 2ee9a06f4cb70f8ff5fe7e73385f3fdcb413640b (patch) | |
| tree | 5c5873a1565897c680203693b2c7d98f0427888e /src/plugins/debugger/debuggerplugin.cpp | |
| parent | 7e8db09c502cef08e6f697e0da5e2c83af721df3 (diff) | |
| download | qt-creator-2ee9a06f4cb70f8ff5fe7e73385f3fdcb413640b.tar.gz | |
Debugger: Use Core::AsynchronousMessageBox
Nested event loops can lead to crashes, so it is better to use a dialog
which does not have have its own event loop.
Change-Id: Icd2390c9026bc1ef88e72a570df5813fe5cbdaa2
Reviewed-by: hjk <hjk121@nokiamail.com>
Diffstat (limited to 'src/plugins/debugger/debuggerplugin.cpp')
| -rw-r--r-- | src/plugins/debugger/debuggerplugin.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp index a387e4dd52..85fb547f8f 100644 --- a/src/plugins/debugger/debuggerplugin.cpp +++ b/src/plugins/debugger/debuggerplugin.cpp @@ -78,6 +78,7 @@ #include <coreplugin/imode.h> #include <coreplugin/coreconstants.h> #include <coreplugin/icore.h> +#include <coreplugin/messagebox.h> #include <coreplugin/messagemanager.h> #include <coreplugin/modemanager.h> @@ -1589,8 +1590,8 @@ DebuggerRunControl *DebuggerPluginPrivate::attachToRunningProcess(Kit *kit, IDevice::ConstPtr device = DeviceKitInformation::device(kit); QTC_ASSERT(device, return 0); if (process.pid == 0) { - QMessageBox::warning(ICore::dialogParent(), tr("Warning"), - tr("Cannot attach to process with PID 0")); + Core::AsynchronousMessageBox::warning(tr("Warning"), + tr("Cannot attach to process with PID 0")); return 0; } @@ -1598,14 +1599,14 @@ DebuggerRunControl *DebuggerPluginPrivate::attachToRunningProcess(Kit *kit, if (const ToolChain *tc = ToolChainKitInformation::toolChain(kit)) isWindows = tc->targetAbi().os() == Abi::WindowsOS; if (isWindows && isWinProcessBeingDebugged(process.pid)) { - QMessageBox::warning(ICore::mainWindow(), tr("Process Already Under Debugger Control"), + Core::AsynchronousMessageBox::warning(tr("Process Already Under Debugger Control"), tr("The process %1 is already under the control of a debugger.\n" "Qt Creator cannot attach to it.").arg(process.pid)); return 0; } if (device->type() != PE::DESKTOP_DEVICE_TYPE) { - QMessageBox::warning(ICore::mainWindow(), tr("Not a Desktop Device Type"), + Core::AsynchronousMessageBox::warning(tr("Not a Desktop Device Type"), tr("It is only possible to attach to a locally running process.")); return 0; } |
