forked from qt-creator/qt-creator
Debugger: Add "Reload Debugging Helpers" to Log Window context menu
Change-Id: I5059dbf73482236a677de8c004ab33aaef3d4cd6 Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user