Commit 8a805c2e authored by hjk's avatar hjk

Debugger: Add "Reload Debugging Helpers" to Log Window context menu

Change-Id: I5059dbf73482236a677de8c004ab33aaef3d4cd6
Reviewed-by: default avatarhjk <qthjk@ovi.com>
parent 9035c802
......@@ -1469,6 +1469,10 @@ void DebuggerEngine::reloadFullStack()
{
}
void DebuggerEngine::reloadDebuggingHelpers()
{
}
void DebuggerEngine::addOptionPages(QList<Core::IOptionsPage*> *) const
{
}
......
......@@ -186,6 +186,7 @@ public:
virtual void reloadRegisters();
virtual void reloadSourceFiles();
virtual void reloadFullStack();
virtual void reloadDebuggingHelpers();
virtual void setRegisterValue(int regnr, const QString &value);
virtual void addOptionPages(QList<Core::IOptionsPage*> *) const;
......
......@@ -4922,6 +4922,15 @@ void GdbEngine::tryLoadPythonDumpers()
postCommand("bbsetup", ConsoleCommand);
}
void GdbEngine::reloadDebuggingHelpers()
{
// Only supported for python.
if (m_hasPython) {
m_pythonAttemptedToLoad = false;
tryLoadPythonDumpers();
}
}
void GdbEngine::handleGdbError(QProcess::ProcessError error)
{
const QString msg = errorMessage(error);
......
......@@ -652,6 +652,7 @@ protected:
bool checkDebuggingHelpersClassic();
void setDebuggingHelperStateClassic(DebuggingHelperState);
void tryLoadDebuggingHelpersClassic();
void reloadDebuggingHelpers();
DebuggingHelperState m_debuggingHelperState;
DumperHelper m_dumperHelper;
......
......@@ -31,6 +31,7 @@
#include "debuggeractions.h"
#include "debuggercore.h"
#include "debuggerengine.h"
#include <QDebug>
#include <QFile>
......@@ -161,7 +162,14 @@ public:
m_saveContentsAction = new QAction(this);
m_saveContentsAction->setText(tr("Save Contents"));
m_saveContentsAction->setEnabled(true);
connect(m_saveContentsAction, SIGNAL(triggered()), this, SLOT(saveContents()));
connect(m_saveContentsAction, SIGNAL(triggered()),
this, SLOT(saveContents()));
m_reloadDebuggingHelpersAction = new QAction(this);
m_reloadDebuggingHelpersAction->setText(tr("Reload Debugging Helpers"));
m_reloadDebuggingHelpersAction->setEnabled(true);
connect(m_reloadDebuggingHelpersAction, SIGNAL(triggered()),
this, SLOT(reloadDebuggingHelpers()));
}
void contextMenuEvent(QContextMenuEvent *ev)
......@@ -171,6 +179,7 @@ public:
menu->addAction(m_saveContentsAction); // X11 clipboard is unreliable for long texts
menu->addAction(debuggerCore()->action(LogTimeStamps));
menu->addAction(debuggerCore()->action(VerboseLog));
menu->addAction(m_reloadDebuggingHelpersAction);
menu->addSeparator();
menu->addAction(debuggerCore()->action(SettingsDialog));
menu->exec(ev->globalPos());
......@@ -192,10 +201,12 @@ public:
private slots:
void saveContents();
void reloadDebuggingHelpers();
private:
QAction *m_clearContentsAction;
QAction *m_saveContentsAction;
QAction *m_reloadDebuggingHelpersAction;
};
void DebuggerPane::saveContents()
......@@ -203,6 +214,11 @@ void DebuggerPane::saveContents()
LogWindow::writeLogContents(this, this);
}
void DebuggerPane::reloadDebuggingHelpers()
{
debuggerCore()->currentEngine()->reloadDebuggingHelpers();
}
/////////////////////////////////////////////////////////////////////
//
// InputPane
......
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