forked from qt-creator/qt-creator
Debugger: Remove #ifdef Q_OS_WIN from hostutils.
- Provide stubs for Non-Windows - Reduce #ifdefs, check Abi if possible. - Remove unused winGetCurrentProcessId(). Task-number: QTCREATORBUG-8141 Change-Id: I80558ca4e52e87c7371597ea07c091af08097b34 Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
@@ -1692,14 +1692,15 @@ void DebuggerPluginPrivate::attachToProcess(bool startServerOnly)
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
if (isWinProcessBeingDebugged(process.pid)) {
|
||||
bool isWindows = false;
|
||||
if (const ProjectExplorer::ToolChain *tc = ToolChainKitInformation::toolChain(kit))
|
||||
isWindows = tc->targetAbi().os() == ProjectExplorer::Abi::WindowsOS;
|
||||
if (isWindows && isWinProcessBeingDebugged(process.pid)) {
|
||||
QMessageBox::warning(ICore::mainWindow(), 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;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (device->type() == ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE) {
|
||||
DebuggerStartParameters sp;
|
||||
|
||||
Reference in New Issue
Block a user