From 9bb43992cd22da2d7ad1cfb5d5e62782ff81e9a6 Mon Sep 17 00:00:00 2001
From: hjk <qtc-committer@nokia.com>
Date: Mon, 16 Feb 2009 13:58:43 +0100
Subject: [PATCH]     Fixes:    debugger: enum naming cosmetics

---
 src/plugins/debugger/debuggermanager.cpp | 12 ++++++------
 src/plugins/debugger/debuggermanager.h   |  2 +-
 src/plugins/debugger/debuggerrunner.cpp  |  2 +-
 src/plugins/debugger/gdbengine.cpp       |  5 +++--
 4 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/src/plugins/debugger/debuggermanager.cpp b/src/plugins/debugger/debuggermanager.cpp
index 2f665f3da53..81c21e359bb 100644
--- a/src/plugins/debugger/debuggermanager.cpp
+++ b/src/plugins/debugger/debuggermanager.cpp
@@ -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()) {
diff --git a/src/plugins/debugger/debuggermanager.h b/src/plugins/debugger/debuggermanager.h
index a3407a0aa59..8af4a683378 100644
--- a/src/plugins/debugger/debuggermanager.h
+++ b/src/plugins/debugger/debuggermanager.h
@@ -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:
diff --git a/src/plugins/debugger/debuggerrunner.cpp b/src/plugins/debugger/debuggerrunner.cpp
index 5034a0d9a4a..149b137727e 100644
--- a/src/plugins/debugger/debuggerrunner.cpp
+++ b/src/plugins/debugger/debuggerrunner.cpp
@@ -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();
diff --git a/src/plugins/debugger/gdbengine.cpp b/src/plugins/debugger/gdbengine.cpp
index 6e68184913d..4e5c8bf82b2 100644
--- a/src/plugins/debugger/gdbengine.cpp
+++ b/src/plugins/debugger/gdbengine.cpp
@@ -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();
-- 
GitLab