Commit 9bb43992 authored by hjk's avatar hjk
Browse files

Fixes: debugger: enum naming cosmetics

parent f6e3b90e
......@@ -152,7 +152,7 @@ void DebuggerManager::init()
m_busy = false;
m_attachedPID = 0;
m_startMode = startInternal;
m_startMode = StartInternal;
m_disassemblerHandler = 0;
m_modulesHandler = 0;
......@@ -737,13 +737,13 @@ void DebuggerManager::setConfigValue(const QString &name, const QVariant &value)
void DebuggerManager::startExternalApplication()
{
if (!startNewDebugger(startExternal))
if (!startNewDebugger(StartExternal))
emit debuggingFinished();
}
void DebuggerManager::attachExternalApplication()
{
if (!startNewDebugger(attachExternal))
if (!startNewDebugger(AttachExternal))
emit debuggingFinished();
}
......@@ -752,7 +752,7 @@ bool DebuggerManager::startNewDebugger(StartMode mode)
m_startMode = mode;
// FIXME: Clean up
if (startMode() == startExternal) {
if (startMode() == StartExternal) {
StartExternalDialog dlg(mainWindow());
dlg.setExecutableFile(
configValue(QLatin1String("LastExternalExecutableFile")).toString());
......@@ -768,7 +768,7 @@ bool DebuggerManager::startNewDebugger(StartMode mode)
m_processArgs = dlg.executableArguments().split(' ');
m_workingDir = QString();
m_attachedPID = -1;
} else if (startMode() == attachExternal) {
} else if (startMode() == AttachExternal) {
AttachExternalDialog dlg(mainWindow());
if (dlg.exec() != QDialog::Accepted)
return false;
......@@ -781,7 +781,7 @@ bool DebuggerManager::startNewDebugger(StartMode mode)
tr("Cannot attach to PID 0"));
return false;
}
} else if (startMode() == startInternal) {
} else if (startMode() == StartInternal) {
if (m_executable.isEmpty()) {
QString startDirectory = m_executable;
if (m_executable.isEmpty()) {
......
......@@ -229,7 +229,7 @@ public:
QLabel *statusLabel() const { return m_statusLabel; }
DebuggerSettings *settings() { return &m_settings; }
enum StartMode { startInternal, startExternal, attachExternal };
enum StartMode { StartInternal, StartExternal, AttachExternal };
enum DebuggerType { GdbDebugger, ScriptDebugger, WinDebugger };
public slots:
......
......@@ -137,7 +137,7 @@ void DebuggerRunControl::start()
//<daniel> andre: + "\qtc-gdbmacros\"
//emit addToOutputWindow(this, tr("Debugging %1").arg(m_executable));
if (m_manager->startNewDebugger(DebuggerManager::startInternal))
if (m_manager->startNewDebugger(DebuggerManager::StartInternal))
emit started();
else
debuggingFinished();
......
......@@ -1588,9 +1588,10 @@ bool GdbEngine::startDebugger()
}
}
if (q->startMode() == q->attachExternal) {
if (q->startMode() == DebuggerManager::AttachExternal) {
sendCommand("attach " + QString::number(q->m_attachedPID));
} else {
// StartInternal or StartExternal
emit gdbInputAvailable(QString(), QString());
sendCommand("-file-exec-and-symbols " + fileName, GdbFileExecAndSymbols);
//sendCommand("file " + fileName, GdbFileExecAndSymbols);
......@@ -1607,7 +1608,7 @@ bool GdbEngine::startDebugger()
sendCommand("-data-list-register-names", RegisterListNames);
// set all to "pending"
if (q->startMode() == q->attachExternal)
if (q->startMode() == DebuggerManager::AttachExternal)
qq->breakHandler()->removeAllBreakpoints();
else
qq->breakHandler()->setAllPending();
......
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