summaryrefslogtreecommitdiff
path: root/src/scripttools/debugging/qscriptenginedebugger.cpp
diff options
context:
space:
mode:
authorKent Hansen <kent.hansen@nokia.com>2012-06-01 15:52:21 +0200
committerQt by Nokia <qt-info@nokia.com>2012-06-01 16:06:58 +0200
commit48fca54118b65d6399ece5f258426144bdc2b03b (patch)
treeef6ea77e48e8fd24c75a8b4905c383ff027cbb8d /src/scripttools/debugging/qscriptenginedebugger.cpp
parent0a4e802f182e6e4b3c54cafa141c8d07ec7621f6 (diff)
downloadqtscript-48fca54118b65d6399ece5f258426144bdc2b03b.tar.gz
Fix scripttools compilation when some features are disabled
Task-number: QTBUG-20378 Change-Id: Ia1dc574824cb1d58c237d60675d1b8a5f8f44c43 Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
Diffstat (limited to 'src/scripttools/debugging/qscriptenginedebugger.cpp')
-rw-r--r--src/scripttools/debugging/qscriptenginedebugger.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/scripttools/debugging/qscriptenginedebugger.cpp b/src/scripttools/debugging/qscriptenginedebugger.cpp
index 37944c1..3a1333b 100644
--- a/src/scripttools/debugging/qscriptenginedebugger.cpp
+++ b/src/scripttools/debugging/qscriptenginedebugger.cpp
@@ -518,6 +518,7 @@ QMainWindow *QScriptEngineDebugger::standardWindow() const
QScriptEngineDebugger *that = const_cast<QScriptEngineDebugger*>(this);
QMainWindow *win = new QMainWindow();
+#ifndef QT_NO_DOCKWIDGET
QDockWidget *scriptsDock = new QDockWidget(win);
scriptsDock->setObjectName(QLatin1String("qtscriptdebugger_scriptsDockWidget"));
scriptsDock->setWindowTitle(tr("Loaded Scripts"));
@@ -562,8 +563,11 @@ QMainWindow *QScriptEngineDebugger::standardWindow() const
win->tabifyDockWidget(errorLogDock, debugOutputDock);
win->tabifyDockWidget(debugOutputDock, consoleDock);
+#endif
+#ifndef QT_NO_TOOLBAR
win->addToolBar(Qt::TopToolBarArea, that->createStandardToolBar());
+#endif
#ifndef QT_NO_MENUBAR
win->menuBar()->addMenu(that->createStandardMenu(win));
@@ -575,6 +579,7 @@ QMainWindow *QScriptEngineDebugger::standardWindow() const
editMenu->addSeparator();
editMenu->addAction(action(GoToLineAction));
+#ifndef QT_NO_DOCKWIDGET
QMenu *viewMenu = win->menuBar()->addMenu(tr("View"));
viewMenu->addAction(scriptsDock->toggleViewAction());
viewMenu->addAction(breakpointsDock->toggleViewAction());
@@ -584,6 +589,7 @@ QMainWindow *QScriptEngineDebugger::standardWindow() const
viewMenu->addAction(debugOutputDock->toggleViewAction());
viewMenu->addAction(errorLogDock->toggleViewAction());
#endif
+#endif
QWidget *central = new QWidget();
QVBoxLayout *vbox = new QVBoxLayout(central);
@@ -594,7 +600,9 @@ QMainWindow *QScriptEngineDebugger::standardWindow() const
win->setCentralWidget(central);
win->setWindowTitle(tr("Qt Script Debugger"));
+#ifndef QT_NO_TOOLBAR
win->setUnifiedTitleAndToolBarOnMac(true);
+#endif
QSettings settings(QSettings::UserScope, QLatin1String("Trolltech"));
QVariant geometry = settings.value(QLatin1String("Qt/scripttools/debugging/mainWindowGeometry"));