forked from qt-creator/qt-creator
Debugger: Register "Reload Debugging Helper" action
This allows assigning shortcuts via Tools->Options, Environment, Keyboard Shortcuts Fixes: QTCREATORBUG-25900 Change-Id: I6dfa6b0f3ff12ad971444b2d3adb427c8acf783c Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -642,6 +642,7 @@ public:
|
||||
void attachToQmlPort();
|
||||
void runScheduled();
|
||||
void attachCore();
|
||||
void reloadDebuggingHelpers();
|
||||
|
||||
void remoteCommand(const QStringList &options);
|
||||
|
||||
@@ -683,6 +684,7 @@ public:
|
||||
QAction m_watchAction{tr("Add Expression Evaluator")};
|
||||
Command *m_watchCommand = nullptr;
|
||||
QAction m_breakAction{tr("Toggle Breakpoint")};
|
||||
QAction m_reloadDebuggingHelpersAction{tr("Reload Debugging Helpers")};
|
||||
|
||||
BreakpointManager m_breakpointManager;
|
||||
QString m_lastPermanentStatusMessage;
|
||||
@@ -1115,6 +1117,10 @@ DebuggerPluginPrivate::DebuggerPluginPrivate(const QStringList &arguments)
|
||||
|
||||
debugMenu->addSeparator();
|
||||
|
||||
ActionManager::registerAction(&m_reloadDebuggingHelpersAction, Constants::RELOAD_DEBUGGING_HELPERS);
|
||||
connect(&m_reloadDebuggingHelpersAction, &QAction::triggered,
|
||||
this, &DebuggerPluginPrivate::reloadDebuggingHelpers);
|
||||
|
||||
cmd = m_watchCommand = ActionManager::registerAction(&m_watchAction, Constants::WATCH);
|
||||
debugMenu->addAction(cmd);
|
||||
|
||||
@@ -1548,6 +1554,15 @@ void DebuggerPluginPrivate::attachCore()
|
||||
debugger->startRunControl();
|
||||
}
|
||||
|
||||
void DebuggerPluginPrivate::reloadDebuggingHelpers()
|
||||
{
|
||||
if (DebuggerEngine *engine = EngineManager::currentEngine())
|
||||
engine->reloadDebuggingHelpers();
|
||||
else
|
||||
DebuggerMainWindow::showStatusMessage(
|
||||
tr("Reload debugging helpers skipped as no engine is running."), 5000);
|
||||
}
|
||||
|
||||
void DebuggerPluginPrivate::startRemoteCdbSession()
|
||||
{
|
||||
const QString connectionKey = "CdbRemoteConnection";
|
||||
|
||||
Reference in New Issue
Block a user