summaryrefslogtreecommitdiffstats
path: root/src/scripttools/debugging/qscriptenginedebugger.cpp
diff options
context:
space:
mode:
authorKent Hansen <khansen@trolltech.com>2009-06-15 17:08:16 (GMT)
committerKent Hansen <khansen@trolltech.com>2009-06-15 17:08:16 (GMT)
commit2b529b77bc8caf0f4e56ea6dd1af4f0423fd74d6 (patch)
treeb33a95b8391ab95317c92d84bda8aed4b8981195 /src/scripttools/debugging/qscriptenginedebugger.cpp
parent9134604eb34b7757b071bae725d57a880a8b62d6 (diff)
downloadQt-2b529b77bc8caf0f4e56ea6dd1af4f0423fd74d6.zip
Qt-2b529b77bc8caf0f4e56ea6dd1af4f0423fd74d6.tar.gz
Qt-2b529b77bc8caf0f4e56ea6dd1af4f0423fd74d6.tar.bz2
small refactoring so remote debugger can use the same code
Diffstat (limited to 'src/scripttools/debugging/qscriptenginedebugger.cpp')
-rw-r--r--src/scripttools/debugging/qscriptenginedebugger.cpp39
1 files changed, 6 insertions, 33 deletions
diff --git a/src/scripttools/debugging/qscriptenginedebugger.cpp b/src/scripttools/debugging/qscriptenginedebugger.cpp
index a278e14..6ee6c98 100644
--- a/src/scripttools/debugging/qscriptenginedebugger.cpp
+++ b/src/scripttools/debugging/qscriptenginedebugger.cpp
@@ -49,9 +49,7 @@
#include <QtGui/qapplication.h>
#include <QtGui/qdockwidget.h>
#include <QtGui/qmainwindow.h>
-#include <QtGui/qmenu.h>
#include <QtGui/qmenubar.h>
-#include <QtGui/qtoolbar.h>
#include <QtGui/qboxlayout.h>
// this has to be outside the namespace
@@ -589,25 +587,9 @@ QMainWindow *QScriptEngineDebugger::standardWindow() const
*/
QMenu *QScriptEngineDebugger::createStandardMenu(QWidget *parent)
{
- QMenu *menu = new QMenu(parent);
- menu->setTitle(QObject::tr("Debug"));
- menu->addAction(action(ContinueAction));
- menu->addAction(action(InterruptAction));
- menu->addAction(action(StepIntoAction));
- menu->addAction(action(StepOverAction));
- menu->addAction(action(StepOutAction));
- menu->addAction(action(RunToCursorAction));
- menu->addAction(action(RunToNewScriptAction));
-
- menu->addSeparator();
- menu->addAction(action(ToggleBreakpointAction));
-
- menu->addSeparator();
- menu->addAction(action(ClearDebugOutputAction));
- menu->addAction(action(ClearErrorLogAction));
- menu->addAction(action(ClearConsoleAction));
-
- return menu;
+ Q_D(QScriptEngineDebugger);
+ d->createDebugger();
+ return d->debugger->createStandardMenu(parent, this);
}
/*!
@@ -618,18 +600,9 @@ QMenu *QScriptEngineDebugger::createStandardMenu(QWidget *parent)
*/
QToolBar *QScriptEngineDebugger::createStandardToolBar(QWidget *parent)
{
- QToolBar *tb = new QToolBar(parent);
- tb->setObjectName(QLatin1String("qtscriptdebugger_standardToolBar"));
- tb->addAction(action(ContinueAction));
- tb->addAction(action(InterruptAction));
- tb->addAction(action(StepIntoAction));
- tb->addAction(action(StepOverAction));
- tb->addAction(action(StepOutAction));
- tb->addAction(action(RunToCursorAction));
- tb->addAction(action(RunToNewScriptAction));
- tb->addSeparator();
- tb->addAction(action(FindInScriptAction));
- return tb;
+ Q_D(QScriptEngineDebugger);
+ d->createDebugger();
+ return d->debugger->createStandardToolBar(parent, this);
}
/*!