forked from qt-creator/qt-creator
Debugger: Simplify CdbEngine construction
Moving the knowledge that this won't work well outside windows kind of decreases encapsulation, but that's not really worth the complication of the error handling here. Change-Id: Idcb6f6d64f33ee8c49a01e62e20aad16d3f01b86 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -194,22 +194,10 @@ public:
|
||||
CdbEngine::CommandHandler handler;
|
||||
};
|
||||
|
||||
static inline bool validMode(DebuggerStartMode sm)
|
||||
// Accessed by DebuggerRunTool
|
||||
DebuggerEngine *createCdbEngine()
|
||||
{
|
||||
return sm != NoStartMode;
|
||||
}
|
||||
|
||||
// Accessed by RunControlFactory
|
||||
DebuggerEngine *createCdbEngine(QStringList *errors, DebuggerStartMode sm)
|
||||
{
|
||||
if (HostOsInfo::isWindowsHost()) {
|
||||
if (validMode(sm))
|
||||
return new CdbEngine();
|
||||
errors->append(CdbEngine::tr("Internal error: Invalid start parameters passed for the CDB engine."));
|
||||
} else {
|
||||
errors->append(CdbEngine::tr("Unsupported CDB host system."));
|
||||
}
|
||||
return 0;
|
||||
return new CdbEngine;
|
||||
}
|
||||
|
||||
void addCdbOptionPages(QList<Core::IOptionsPage *> *opts)
|
||||
|
||||
Reference in New Issue
Block a user