Commit f5f8227b authored by hjk's avatar hjk
Browse files

debugger: code cosmetics

parent a257596b
......@@ -237,7 +237,6 @@ enum DebuggerEngineType
ScriptEngineType = 0x02,
CdbEngineType = 0x04,
PdbEngineType = 0x08,
TcfEngineType = 0x10,
QmlEngineType = 0x20,
QmlCppEngineType = 0x40,
LldbEngineType = 0x80,
......@@ -245,7 +244,6 @@ enum DebuggerEngineType
| ScriptEngineType
| CdbEngineType
| PdbEngineType
| TcfEngineType
| QmlEngineType
| QmlCppEngineType
| LldbEngineType
......
......@@ -1235,10 +1235,6 @@ bool DebuggerPluginPrivate::parseArgument(QStringList::const_iterator &it,
*enabledEngines &= ~ScriptEngineType;
return true;
}
if (option == _("-disable-tcf")) {
*enabledEngines &= ~TcfEngineType;
return true;
}
if (option == _("-disable-lldb")) {
*enabledEngines &= ~LldbEngineType;
return true;
......@@ -1261,7 +1257,6 @@ bool DebuggerPluginPrivate::parseArguments(const QStringList &args,
return true;
}
bool DebuggerPluginPrivate::initialize(const QStringList &arguments,
QString *errorMessage)
{
......
......@@ -111,8 +111,6 @@ static const char *engineTypeName(DebuggerEngineType et)
return "Cdb engine";
case Debugger::PdbEngineType:
return "Pdb engine";
case Debugger::TcfEngineType:
return "Tcf engine";
case Debugger::QmlEngineType:
return "QML engine";
case Debugger::QmlCppEngineType:
......@@ -410,10 +408,10 @@ static QList<DebuggerEngineType> enginesForMode(DebuggerStartMode startMode,
{
QList<DebuggerEngineType> result;
switch (startMode) {
case Debugger::NoStartMode:
case NoStartMode:
break;
case Debugger::StartInternal:
case Debugger::StartExternal:
case StartInternal:
case StartExternal:
case AttachExternal:
if (!hardConstraintsOnly) {
#ifdef Q_OS_WIN
......@@ -422,11 +420,11 @@ static QList<DebuggerEngineType> enginesForMode(DebuggerStartMode startMode,
result.push_back(GdbEngineType);
}
break;
case Debugger::AttachCore:
case Debugger::StartRemoteGdb:
case AttachCore:
case StartRemoteGdb:
result.push_back(GdbEngineType);
break;
case Debugger::AttachToRemote:
case AttachToRemote:
if (!hardConstraintsOnly) {
#ifdef Q_OS_WIN
result.push_back(CdbEngineType);
......@@ -434,9 +432,6 @@ static QList<DebuggerEngineType> enginesForMode(DebuggerStartMode startMode,
result.push_back(GdbEngineType);
}
break;
case AttachTcf:
result.push_back(TcfEngineType);
break;
case AttachCrashedExternal:
result.push_back(CdbEngineType); // Only CDB can do this
break;
......@@ -493,7 +488,9 @@ ConfigurationCheck::ConfigurationCheck() :
ConfigurationCheck::operator bool() const
{
return errorMessage.isEmpty() && errorDetails.isEmpty() && masterSlaveEngineTypes.first != NoEngineType;
return errorMessage.isEmpty()
&& errorDetails.isEmpty()
&& masterSlaveEngineTypes.first != NoEngineType;
}
QString ConfigurationCheck::errorDetailsString() const
......@@ -516,9 +513,9 @@ static inline bool canUseEngine(DebuggerEngineType et,
}
// Configured.
switch (et) {
case Debugger::CdbEngineType:
case CdbEngineType:
return checkCdbConfiguration(sp, result);
case Debugger::GdbEngineType:
case GdbEngineType:
return checkGdbConfiguration(sp, result);
default:
break;
......@@ -758,11 +755,11 @@ DebuggerRunControl *DebuggerRunControlFactory::create
return new DebuggerRunControl(runConfiguration, sp, check.masterSlaveEngineTypes);
}
DebuggerEngine *
DebuggerRunControlFactory::createEngine(DebuggerEngineType et,
const DebuggerStartParameters &sp,
DebuggerEngine *masterEngine,
QString *errorMessage)
DebuggerEngine *DebuggerRunControlFactory::createEngine
(DebuggerEngineType et,
const DebuggerStartParameters &sp,
DebuggerEngine *masterEngine,
QString *errorMessage)
{
switch (et) {
case GdbEngineType:
......@@ -771,17 +768,12 @@ DebuggerEngine *
return createScriptEngine(sp);
case CdbEngineType:
return createCdbEngine(sp, masterEngine, errorMessage);
break;
case PdbEngineType:
return createPdbEngine(sp);
break;
case QmlEngineType:
return createQmlEngine(sp, masterEngine);
break;
case LldbEngineType:
return createLldbEngine(sp);
default:
break;
}
*errorMessage = DebuggerRunControl::tr("Unable to create a debugger engine of the type '%1'").
arg(_(engineTypeName(et)));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment