Fixes for qml/js debugging
authorMohammed Sameer <msameer@foolab.org>
Sun, 18 Aug 2013 02:05:59 +0000 (05:05 +0300)
committerMohammed Sameer <msameer@foolab.org>
Sun, 18 Aug 2013 02:05:59 +0000 (05:05 +0300)
If we are compiled with qmljs debugging then we
initialize it immediately before constructing QApplication

Seems to fail otherwise.

src/main.cpp

index 407095b..c16eb46 100644 (file)
@@ -79,6 +79,10 @@ class QmlFileEngineHandler : public QAbstractFileEngineHandler {
 #endif
 
 Q_DECL_EXPORT int main(int argc, char *argv[]) {
+#ifdef QMLJSDEBUGGER
+  QDeclarativeDebugHelper::enableDebugging();
+#endif /* QMLJSDEBUGGER */
+
 #if defined(QT4)
   QApplication::setAttribute(Qt::AA_X11InitThreads, true);
   QApplication *app = new QApplication(argc, argv);
@@ -95,10 +99,6 @@ Q_DECL_EXPORT int main(int argc, char *argv[]) {
   QQuickView *view = MDeclarativeCache::qQuickView();
 #endif
 
-#ifdef QMLJSDEBUGGER
-  QDeclarativeDebugHelper::enableDebugging();
-#endif /* QMLJSDEBUGGER */
-
 #if defined(QT4)
   view->setAttribute(Qt::WA_NoSystemBackground);
   view->setViewport(new QGLWidget);