From 6bd7a5a17d9e7546e61333e685e1bfaa12d26e05 Mon Sep 17 00:00:00 2001
From: con <qtc-committer@nokia.com>
Date: Tue, 23 Mar 2010 18:12:03 +0100
Subject: [PATCH] Fixes: Tooltips for hover help didn't show up anymore.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Reviewed-by: Thorbjørn
---
 src/plugins/cppeditor/cpphoverhandler.cpp     |   2 +-
 src/plugins/debugger/debuggerconstants.h      |   4 +-
 src/plugins/debugger/debuggerplugin.cpp       |  39 ++++++++----------
 src/plugins/debugger/debuggeruiswitcher.cpp   |   4 --
 .../images/debugger_stepinto_small.png        | Bin 407 -> 359 bytes
 src/plugins/qmljseditor/qmljshoverhandler.cpp |   2 +-
 6 files changed, 22 insertions(+), 29 deletions(-)

diff --git a/src/plugins/cppeditor/cpphoverhandler.cpp b/src/plugins/cppeditor/cpphoverhandler.cpp
index 84ed79a986e..1755e925a4f 100644
--- a/src/plugins/cppeditor/cpphoverhandler.cpp
+++ b/src/plugins/cppeditor/cpphoverhandler.cpp
@@ -116,7 +116,7 @@ void CppHoverHandler::showToolTip(TextEditor::ITextEditor *editor, const QPoint
         return;
 
     ICore *core = ICore::instance();
-    const int dbgcontext = core->uniqueIDManager()->uniqueIdentifier(Debugger::Constants::C_GDBDEBUGGER);
+    const int dbgcontext = core->uniqueIDManager()->uniqueIdentifier(Debugger::Constants::C_DEBUGMODE);
 
     if (core->hasContext(dbgcontext))
         return;
diff --git a/src/plugins/debugger/debuggerconstants.h b/src/plugins/debugger/debuggerconstants.h
index 6b2a09549e4..db6bb35c7b8 100644
--- a/src/plugins/debugger/debuggerconstants.h
+++ b/src/plugins/debugger/debuggerconstants.h
@@ -50,8 +50,8 @@ const char * const REVERSE              = "Debugger.ReverseDirection";
 const char * const M_DEBUG_LANGUAGES    = "Debugger.Menu.View.Languages";
 const char * const M_DEBUG_VIEWS        = "Debugger.Menu.View.Debug";
 
-const char * const C_BASEDEBUGGER       = "BaseDebugger";
-const char * const C_GDBDEBUGGER        = "Gdb Debugger";
+const char * const C_DEBUGMODE       = "Debugger.DebugMode";
+const char * const C_CPPDEBUGGER        = "Gdb Debugger";
 const char * const GDBRUNNING           = "Gdb.Running";
 
 const char * const DEBUGGER_COMMON_SETTINGS_ID = "A.Common";
diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp
index 6e221d12628..af233e1259d 100644
--- a/src/plugins/debugger/debuggerplugin.cpp
+++ b/src/plugins/debugger/debuggerplugin.cpp
@@ -699,11 +699,8 @@ bool DebuggerPlugin::initialize(const QStringList &arguments, QString *errorMess
     QList<int> cppcontext;
     cppcontext << uidm->uniqueIdentifier(PE::LANG_CXX);
 
-    QList<int> baseDebuggerContext;
-    baseDebuggerContext << uidm->uniqueIdentifier(C_BASEDEBUGGER);
-
-    QList<int> gdbDebuggercontext;
-    gdbDebuggercontext << uidm->uniqueIdentifier(C_GDBDEBUGGER);
+    QList<int> cppDebuggercontext;
+    cppDebuggercontext << uidm->uniqueIdentifier(C_CPPDEBUGGER);
 
     QList<int> cppeditorcontext;
     cppeditorcontext << uidm->uniqueIdentifier(CppEditor::Constants::C_CPPEDITOR);
@@ -713,7 +710,7 @@ bool DebuggerPlugin::initialize(const QStringList &arguments, QString *errorMess
 
     m_gdbRunningContext = uidm->uniqueIdentifier(Constants::GDBRUNNING);
 
-    m_uiSwitcher->addLanguage(LANG_CPP, gdbDebuggercontext);
+    m_uiSwitcher->addLanguage(LANG_CPP, cppDebuggercontext);
 
     DebuggerManager *manager = new DebuggerManager(this);
     ExtensionSystem::PluginManager::instance()->addObject(manager);
@@ -726,7 +723,7 @@ bool DebuggerPlugin::initialize(const QStringList &arguments, QString *errorMess
 
     QList<int> context;
     context.append(uidm->uniqueIdentifier(CC::C_EDITORMANAGER));
-    context.append(uidm->uniqueIdentifier(C_BASEDEBUGGER));
+    context.append(uidm->uniqueIdentifier(C_DEBUGMODE));
     context.append(uidm->uniqueIdentifier(CC::C_NAVIGATION_PANE));
     m_debugMode->setContext(context);
 
@@ -813,53 +810,53 @@ bool DebuggerPlugin::initialize(const QStringList &arguments, QString *errorMess
     m_uiSwitcher->addMenuAction(cmd, Constants::LANG_CPP);
 
     cmd = am->registerAction(actions.nextAction,
-        Constants::NEXT, gdbDebuggercontext);
+        Constants::NEXT, cppDebuggercontext);
     cmd->setDefaultKeySequence(QKeySequence(Constants::NEXT_KEY));
     cmd->setAttribute(Command::CA_Hide);
     m_uiSwitcher->addMenuAction(cmd, Constants::LANG_CPP);
 
     cmd = am->registerAction(actions.stepAction,
-        Constants::STEP, gdbDebuggercontext);
+        Constants::STEP, cppDebuggercontext);
     cmd->setDefaultKeySequence(QKeySequence(Constants::STEP_KEY));
     cmd->setAttribute(Command::CA_Hide);
     m_uiSwitcher->addMenuAction(cmd, Constants::LANG_CPP);
 
 
     cmd = am->registerAction(actions.stepOutAction,
-        Constants::STEPOUT, gdbDebuggercontext);
+        Constants::STEPOUT, cppDebuggercontext);
     cmd->setDefaultKeySequence(QKeySequence(Constants::STEPOUT_KEY));
     cmd->setAttribute(Command::CA_Hide);
     m_uiSwitcher->addMenuAction(cmd, Constants::LANG_CPP);
 
 
     cmd = am->registerAction(actions.runToLineAction1,
-        Constants::RUN_TO_LINE1, gdbDebuggercontext);
+        Constants::RUN_TO_LINE1, cppDebuggercontext);
     cmd->setDefaultKeySequence(QKeySequence(Constants::RUN_TO_LINE_KEY));
     cmd->setAttribute(Command::CA_Hide);
     m_uiSwitcher->addMenuAction(cmd, Constants::LANG_CPP);
 
 
     cmd = am->registerAction(actions.runToFunctionAction,
-        Constants::RUN_TO_FUNCTION, gdbDebuggercontext);
+        Constants::RUN_TO_FUNCTION, cppDebuggercontext);
     cmd->setDefaultKeySequence(QKeySequence(Constants::RUN_TO_FUNCTION_KEY));
     cmd->setAttribute(Command::CA_Hide);
     m_uiSwitcher->addMenuAction(cmd, Constants::LANG_CPP);
 
 
     cmd = am->registerAction(actions.jumpToLineAction1,
-        Constants::JUMP_TO_LINE1, gdbDebuggercontext);
+        Constants::JUMP_TO_LINE1, cppDebuggercontext);
     cmd->setAttribute(Command::CA_Hide);
     m_uiSwitcher->addMenuAction(cmd, Constants::LANG_CPP);
 
 
     cmd = am->registerAction(actions.returnFromFunctionAction,
-        Constants::RETURN_FROM_FUNCTION, gdbDebuggercontext);
+        Constants::RETURN_FROM_FUNCTION, cppDebuggercontext);
     cmd->setAttribute(Command::CA_Hide);
     m_uiSwitcher->addMenuAction(cmd, Constants::LANG_CPP);
 
 
     cmd = am->registerAction(actions.reverseDirectionAction,
-        Constants::REVERSE, gdbDebuggercontext);
+        Constants::REVERSE, cppDebuggercontext);
     cmd->setDefaultKeySequence(QKeySequence(Constants::REVERSE_KEY));
     cmd->setAttribute(Command::CA_Hide);
     m_uiSwitcher->addMenuAction(cmd, Constants::LANG_CPP);
@@ -872,14 +869,14 @@ bool DebuggerPlugin::initialize(const QStringList &arguments, QString *errorMess
 
 
     cmd = am->registerAction(actions.snapshotAction,
-        Constants::SNAPSHOT, gdbDebuggercontext);
+        Constants::SNAPSHOT, cppDebuggercontext);
     cmd->setDefaultKeySequence(QKeySequence(Constants::SNAPSHOT_KEY));
     cmd->setAttribute(Command::CA_Hide);
     m_uiSwitcher->addMenuAction(cmd, Constants::LANG_CPP);
 
 
     cmd = am->registerAction(theDebuggerAction(OperateByInstruction),
-        Constants::OPERATE_BY_INSTRUCTION, gdbDebuggercontext);
+        Constants::OPERATE_BY_INSTRUCTION, cppDebuggercontext);
     cmd->setAttribute(Command::CA_Hide);
     m_uiSwitcher->addMenuAction(cmd, Constants::LANG_CPP);
 
@@ -908,24 +905,24 @@ bool DebuggerPlugin::initialize(const QStringList &arguments, QString *errorMess
     ActionContainer *editorContextMenu =
         am->actionContainer(CppEditor::Constants::M_CONTEXT);
     cmd = am->registerAction(sep, _("Debugger.Sep.Views"),
-        gdbDebuggercontext);
+        cppDebuggercontext);
     editorContextMenu->addAction(cmd);
     cmd->setAttribute(Command::CA_Hide);
 
     cmd = am->registerAction(actions.watchAction2,
-        Constants::ADD_TO_WATCH2, gdbDebuggercontext);
+        Constants::ADD_TO_WATCH2, cppDebuggercontext);
     cmd->action()->setEnabled(true);
     editorContextMenu->addAction(cmd);
     cmd->setAttribute(Command::CA_Hide);
 
     cmd = am->registerAction(actions.runToLineAction2,
-        Constants::RUN_TO_LINE2, gdbDebuggercontext);
+        Constants::RUN_TO_LINE2, cppDebuggercontext);
     cmd->action()->setEnabled(true);
     editorContextMenu->addAction(cmd);
     cmd->setAttribute(Command::CA_Hide);
 
     cmd = am->registerAction(actions.jumpToLineAction2,
-        Constants::JUMP_TO_LINE2, gdbDebuggercontext);
+        Constants::JUMP_TO_LINE2, cppDebuggercontext);
     cmd->action()->setEnabled(true);
     editorContextMenu->addAction(cmd);
     cmd->setAttribute(Command::CA_Hide);
diff --git a/src/plugins/debugger/debuggeruiswitcher.cpp b/src/plugins/debugger/debuggeruiswitcher.cpp
index 68fe2f7a531..dfa9936fb5f 100644
--- a/src/plugins/debugger/debuggeruiswitcher.cpp
+++ b/src/plugins/debugger/debuggeruiswitcher.cpp
@@ -87,9 +87,6 @@ struct DebuggerUISwitcherPrivate {
     QStackedWidget *m_toolbarStack;
     Internal::DebuggerMainWindow *m_mainWindow;
 
-    // main debugger context
-    QList<int> m_debuggercontext;
-
     // global context
     QList<int> m_globalContext;
 
@@ -147,7 +144,6 @@ DebuggerUISwitcher::DebuggerUISwitcher(Core::BaseMode *mode, QObject* parent) :
 
     d->m_languageActionGroup->setExclusive(true);
 
-    d->m_debuggercontext << core->uniqueIDManager()->uniqueIdentifier(Debugger::Constants::C_BASEDEBUGGER);
     d->m_globalContext << Core::Constants::C_GLOBAL_ID;
 
     DebuggerUISwitcherPrivate::m_instance = this;
diff --git a/src/plugins/debugger/images/debugger_stepinto_small.png b/src/plugins/debugger/images/debugger_stepinto_small.png
index 0c6f51818f09bde86a7a4877b06e7dc2ec587ad2..729cb25e11a1095d0558a9a58b42f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index c76ad66d346..91559570941 100644
--- a/src/plugins/qmljseditor/qmljshoverhandler.cpp
+++ b/src/plugins/qmljseditor/qmljshoverhandler.cpp
@@ -102,7 +102,7 @@ void HoverHandler::showToolTip(TextEditor::ITextEditor *editor, const QPoint &po
         return;
 
     ICore *core = ICore::instance();
-    const int dbgcontext = core->uniqueIDManager()->uniqueIdentifier(Debugger::Constants::C_GDBDEBUGGER);
+    const int dbgcontext = core->uniqueIDManager()->uniqueIdentifier(Debugger::Constants::C_DEBUGMODE);
 
     if (core->hasContext(dbgcontext))
         return;
-- 
GitLab