forked from qt-creator/qt-creator
Fixes: Tooltips for hover help didn't show up anymore.
Reviewed-by: Thorbjørn
This commit is contained in:
@@ -116,7 +116,7 @@ void CppHoverHandler::showToolTip(TextEditor::ITextEditor *editor, const QPoint
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
ICore *core = ICore::instance();
|
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))
|
if (core->hasContext(dbgcontext))
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -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_LANGUAGES = "Debugger.Menu.View.Languages";
|
||||||
const char * const M_DEBUG_VIEWS = "Debugger.Menu.View.Debug";
|
const char * const M_DEBUG_VIEWS = "Debugger.Menu.View.Debug";
|
||||||
|
|
||||||
const char * const C_BASEDEBUGGER = "BaseDebugger";
|
const char * const C_DEBUGMODE = "Debugger.DebugMode";
|
||||||
const char * const C_GDBDEBUGGER = "Gdb Debugger";
|
const char * const C_CPPDEBUGGER = "Gdb Debugger";
|
||||||
const char * const GDBRUNNING = "Gdb.Running";
|
const char * const GDBRUNNING = "Gdb.Running";
|
||||||
|
|
||||||
const char * const DEBUGGER_COMMON_SETTINGS_ID = "A.Common";
|
const char * const DEBUGGER_COMMON_SETTINGS_ID = "A.Common";
|
||||||
|
|||||||
@@ -699,11 +699,8 @@ bool DebuggerPlugin::initialize(const QStringList &arguments, QString *errorMess
|
|||||||
QList<int> cppcontext;
|
QList<int> cppcontext;
|
||||||
cppcontext << uidm->uniqueIdentifier(PE::LANG_CXX);
|
cppcontext << uidm->uniqueIdentifier(PE::LANG_CXX);
|
||||||
|
|
||||||
QList<int> baseDebuggerContext;
|
QList<int> cppDebuggercontext;
|
||||||
baseDebuggerContext << uidm->uniqueIdentifier(C_BASEDEBUGGER);
|
cppDebuggercontext << uidm->uniqueIdentifier(C_CPPDEBUGGER);
|
||||||
|
|
||||||
QList<int> gdbDebuggercontext;
|
|
||||||
gdbDebuggercontext << uidm->uniqueIdentifier(C_GDBDEBUGGER);
|
|
||||||
|
|
||||||
QList<int> cppeditorcontext;
|
QList<int> cppeditorcontext;
|
||||||
cppeditorcontext << uidm->uniqueIdentifier(CppEditor::Constants::C_CPPEDITOR);
|
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_gdbRunningContext = uidm->uniqueIdentifier(Constants::GDBRUNNING);
|
||||||
|
|
||||||
m_uiSwitcher->addLanguage(LANG_CPP, gdbDebuggercontext);
|
m_uiSwitcher->addLanguage(LANG_CPP, cppDebuggercontext);
|
||||||
|
|
||||||
DebuggerManager *manager = new DebuggerManager(this);
|
DebuggerManager *manager = new DebuggerManager(this);
|
||||||
ExtensionSystem::PluginManager::instance()->addObject(manager);
|
ExtensionSystem::PluginManager::instance()->addObject(manager);
|
||||||
@@ -726,7 +723,7 @@ bool DebuggerPlugin::initialize(const QStringList &arguments, QString *errorMess
|
|||||||
|
|
||||||
QList<int> context;
|
QList<int> context;
|
||||||
context.append(uidm->uniqueIdentifier(CC::C_EDITORMANAGER));
|
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));
|
context.append(uidm->uniqueIdentifier(CC::C_NAVIGATION_PANE));
|
||||||
m_debugMode->setContext(context);
|
m_debugMode->setContext(context);
|
||||||
|
|
||||||
@@ -813,53 +810,53 @@ bool DebuggerPlugin::initialize(const QStringList &arguments, QString *errorMess
|
|||||||
m_uiSwitcher->addMenuAction(cmd, Constants::LANG_CPP);
|
m_uiSwitcher->addMenuAction(cmd, Constants::LANG_CPP);
|
||||||
|
|
||||||
cmd = am->registerAction(actions.nextAction,
|
cmd = am->registerAction(actions.nextAction,
|
||||||
Constants::NEXT, gdbDebuggercontext);
|
Constants::NEXT, cppDebuggercontext);
|
||||||
cmd->setDefaultKeySequence(QKeySequence(Constants::NEXT_KEY));
|
cmd->setDefaultKeySequence(QKeySequence(Constants::NEXT_KEY));
|
||||||
cmd->setAttribute(Command::CA_Hide);
|
cmd->setAttribute(Command::CA_Hide);
|
||||||
m_uiSwitcher->addMenuAction(cmd, Constants::LANG_CPP);
|
m_uiSwitcher->addMenuAction(cmd, Constants::LANG_CPP);
|
||||||
|
|
||||||
cmd = am->registerAction(actions.stepAction,
|
cmd = am->registerAction(actions.stepAction,
|
||||||
Constants::STEP, gdbDebuggercontext);
|
Constants::STEP, cppDebuggercontext);
|
||||||
cmd->setDefaultKeySequence(QKeySequence(Constants::STEP_KEY));
|
cmd->setDefaultKeySequence(QKeySequence(Constants::STEP_KEY));
|
||||||
cmd->setAttribute(Command::CA_Hide);
|
cmd->setAttribute(Command::CA_Hide);
|
||||||
m_uiSwitcher->addMenuAction(cmd, Constants::LANG_CPP);
|
m_uiSwitcher->addMenuAction(cmd, Constants::LANG_CPP);
|
||||||
|
|
||||||
|
|
||||||
cmd = am->registerAction(actions.stepOutAction,
|
cmd = am->registerAction(actions.stepOutAction,
|
||||||
Constants::STEPOUT, gdbDebuggercontext);
|
Constants::STEPOUT, cppDebuggercontext);
|
||||||
cmd->setDefaultKeySequence(QKeySequence(Constants::STEPOUT_KEY));
|
cmd->setDefaultKeySequence(QKeySequence(Constants::STEPOUT_KEY));
|
||||||
cmd->setAttribute(Command::CA_Hide);
|
cmd->setAttribute(Command::CA_Hide);
|
||||||
m_uiSwitcher->addMenuAction(cmd, Constants::LANG_CPP);
|
m_uiSwitcher->addMenuAction(cmd, Constants::LANG_CPP);
|
||||||
|
|
||||||
|
|
||||||
cmd = am->registerAction(actions.runToLineAction1,
|
cmd = am->registerAction(actions.runToLineAction1,
|
||||||
Constants::RUN_TO_LINE1, gdbDebuggercontext);
|
Constants::RUN_TO_LINE1, cppDebuggercontext);
|
||||||
cmd->setDefaultKeySequence(QKeySequence(Constants::RUN_TO_LINE_KEY));
|
cmd->setDefaultKeySequence(QKeySequence(Constants::RUN_TO_LINE_KEY));
|
||||||
cmd->setAttribute(Command::CA_Hide);
|
cmd->setAttribute(Command::CA_Hide);
|
||||||
m_uiSwitcher->addMenuAction(cmd, Constants::LANG_CPP);
|
m_uiSwitcher->addMenuAction(cmd, Constants::LANG_CPP);
|
||||||
|
|
||||||
|
|
||||||
cmd = am->registerAction(actions.runToFunctionAction,
|
cmd = am->registerAction(actions.runToFunctionAction,
|
||||||
Constants::RUN_TO_FUNCTION, gdbDebuggercontext);
|
Constants::RUN_TO_FUNCTION, cppDebuggercontext);
|
||||||
cmd->setDefaultKeySequence(QKeySequence(Constants::RUN_TO_FUNCTION_KEY));
|
cmd->setDefaultKeySequence(QKeySequence(Constants::RUN_TO_FUNCTION_KEY));
|
||||||
cmd->setAttribute(Command::CA_Hide);
|
cmd->setAttribute(Command::CA_Hide);
|
||||||
m_uiSwitcher->addMenuAction(cmd, Constants::LANG_CPP);
|
m_uiSwitcher->addMenuAction(cmd, Constants::LANG_CPP);
|
||||||
|
|
||||||
|
|
||||||
cmd = am->registerAction(actions.jumpToLineAction1,
|
cmd = am->registerAction(actions.jumpToLineAction1,
|
||||||
Constants::JUMP_TO_LINE1, gdbDebuggercontext);
|
Constants::JUMP_TO_LINE1, cppDebuggercontext);
|
||||||
cmd->setAttribute(Command::CA_Hide);
|
cmd->setAttribute(Command::CA_Hide);
|
||||||
m_uiSwitcher->addMenuAction(cmd, Constants::LANG_CPP);
|
m_uiSwitcher->addMenuAction(cmd, Constants::LANG_CPP);
|
||||||
|
|
||||||
|
|
||||||
cmd = am->registerAction(actions.returnFromFunctionAction,
|
cmd = am->registerAction(actions.returnFromFunctionAction,
|
||||||
Constants::RETURN_FROM_FUNCTION, gdbDebuggercontext);
|
Constants::RETURN_FROM_FUNCTION, cppDebuggercontext);
|
||||||
cmd->setAttribute(Command::CA_Hide);
|
cmd->setAttribute(Command::CA_Hide);
|
||||||
m_uiSwitcher->addMenuAction(cmd, Constants::LANG_CPP);
|
m_uiSwitcher->addMenuAction(cmd, Constants::LANG_CPP);
|
||||||
|
|
||||||
|
|
||||||
cmd = am->registerAction(actions.reverseDirectionAction,
|
cmd = am->registerAction(actions.reverseDirectionAction,
|
||||||
Constants::REVERSE, gdbDebuggercontext);
|
Constants::REVERSE, cppDebuggercontext);
|
||||||
cmd->setDefaultKeySequence(QKeySequence(Constants::REVERSE_KEY));
|
cmd->setDefaultKeySequence(QKeySequence(Constants::REVERSE_KEY));
|
||||||
cmd->setAttribute(Command::CA_Hide);
|
cmd->setAttribute(Command::CA_Hide);
|
||||||
m_uiSwitcher->addMenuAction(cmd, Constants::LANG_CPP);
|
m_uiSwitcher->addMenuAction(cmd, Constants::LANG_CPP);
|
||||||
@@ -872,14 +869,14 @@ bool DebuggerPlugin::initialize(const QStringList &arguments, QString *errorMess
|
|||||||
|
|
||||||
|
|
||||||
cmd = am->registerAction(actions.snapshotAction,
|
cmd = am->registerAction(actions.snapshotAction,
|
||||||
Constants::SNAPSHOT, gdbDebuggercontext);
|
Constants::SNAPSHOT, cppDebuggercontext);
|
||||||
cmd->setDefaultKeySequence(QKeySequence(Constants::SNAPSHOT_KEY));
|
cmd->setDefaultKeySequence(QKeySequence(Constants::SNAPSHOT_KEY));
|
||||||
cmd->setAttribute(Command::CA_Hide);
|
cmd->setAttribute(Command::CA_Hide);
|
||||||
m_uiSwitcher->addMenuAction(cmd, Constants::LANG_CPP);
|
m_uiSwitcher->addMenuAction(cmd, Constants::LANG_CPP);
|
||||||
|
|
||||||
|
|
||||||
cmd = am->registerAction(theDebuggerAction(OperateByInstruction),
|
cmd = am->registerAction(theDebuggerAction(OperateByInstruction),
|
||||||
Constants::OPERATE_BY_INSTRUCTION, gdbDebuggercontext);
|
Constants::OPERATE_BY_INSTRUCTION, cppDebuggercontext);
|
||||||
cmd->setAttribute(Command::CA_Hide);
|
cmd->setAttribute(Command::CA_Hide);
|
||||||
m_uiSwitcher->addMenuAction(cmd, Constants::LANG_CPP);
|
m_uiSwitcher->addMenuAction(cmd, Constants::LANG_CPP);
|
||||||
|
|
||||||
@@ -908,24 +905,24 @@ bool DebuggerPlugin::initialize(const QStringList &arguments, QString *errorMess
|
|||||||
ActionContainer *editorContextMenu =
|
ActionContainer *editorContextMenu =
|
||||||
am->actionContainer(CppEditor::Constants::M_CONTEXT);
|
am->actionContainer(CppEditor::Constants::M_CONTEXT);
|
||||||
cmd = am->registerAction(sep, _("Debugger.Sep.Views"),
|
cmd = am->registerAction(sep, _("Debugger.Sep.Views"),
|
||||||
gdbDebuggercontext);
|
cppDebuggercontext);
|
||||||
editorContextMenu->addAction(cmd);
|
editorContextMenu->addAction(cmd);
|
||||||
cmd->setAttribute(Command::CA_Hide);
|
cmd->setAttribute(Command::CA_Hide);
|
||||||
|
|
||||||
cmd = am->registerAction(actions.watchAction2,
|
cmd = am->registerAction(actions.watchAction2,
|
||||||
Constants::ADD_TO_WATCH2, gdbDebuggercontext);
|
Constants::ADD_TO_WATCH2, cppDebuggercontext);
|
||||||
cmd->action()->setEnabled(true);
|
cmd->action()->setEnabled(true);
|
||||||
editorContextMenu->addAction(cmd);
|
editorContextMenu->addAction(cmd);
|
||||||
cmd->setAttribute(Command::CA_Hide);
|
cmd->setAttribute(Command::CA_Hide);
|
||||||
|
|
||||||
cmd = am->registerAction(actions.runToLineAction2,
|
cmd = am->registerAction(actions.runToLineAction2,
|
||||||
Constants::RUN_TO_LINE2, gdbDebuggercontext);
|
Constants::RUN_TO_LINE2, cppDebuggercontext);
|
||||||
cmd->action()->setEnabled(true);
|
cmd->action()->setEnabled(true);
|
||||||
editorContextMenu->addAction(cmd);
|
editorContextMenu->addAction(cmd);
|
||||||
cmd->setAttribute(Command::CA_Hide);
|
cmd->setAttribute(Command::CA_Hide);
|
||||||
|
|
||||||
cmd = am->registerAction(actions.jumpToLineAction2,
|
cmd = am->registerAction(actions.jumpToLineAction2,
|
||||||
Constants::JUMP_TO_LINE2, gdbDebuggercontext);
|
Constants::JUMP_TO_LINE2, cppDebuggercontext);
|
||||||
cmd->action()->setEnabled(true);
|
cmd->action()->setEnabled(true);
|
||||||
editorContextMenu->addAction(cmd);
|
editorContextMenu->addAction(cmd);
|
||||||
cmd->setAttribute(Command::CA_Hide);
|
cmd->setAttribute(Command::CA_Hide);
|
||||||
|
|||||||
@@ -87,9 +87,6 @@ struct DebuggerUISwitcherPrivate {
|
|||||||
QStackedWidget *m_toolbarStack;
|
QStackedWidget *m_toolbarStack;
|
||||||
Internal::DebuggerMainWindow *m_mainWindow;
|
Internal::DebuggerMainWindow *m_mainWindow;
|
||||||
|
|
||||||
// main debugger context
|
|
||||||
QList<int> m_debuggercontext;
|
|
||||||
|
|
||||||
// global context
|
// global context
|
||||||
QList<int> m_globalContext;
|
QList<int> m_globalContext;
|
||||||
|
|
||||||
@@ -147,7 +144,6 @@ DebuggerUISwitcher::DebuggerUISwitcher(Core::BaseMode *mode, QObject* parent) :
|
|||||||
|
|
||||||
d->m_languageActionGroup->setExclusive(true);
|
d->m_languageActionGroup->setExclusive(true);
|
||||||
|
|
||||||
d->m_debuggercontext << core->uniqueIDManager()->uniqueIdentifier(Debugger::Constants::C_BASEDEBUGGER);
|
|
||||||
d->m_globalContext << Core::Constants::C_GLOBAL_ID;
|
d->m_globalContext << Core::Constants::C_GLOBAL_ID;
|
||||||
|
|
||||||
DebuggerUISwitcherPrivate::m_instance = this;
|
DebuggerUISwitcherPrivate::m_instance = this;
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 407 B After Width: | Height: | Size: 359 B |
@@ -102,7 +102,7 @@ void HoverHandler::showToolTip(TextEditor::ITextEditor *editor, const QPoint &po
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
ICore *core = ICore::instance();
|
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))
|
if (core->hasContext(dbgcontext))
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user