From 4dcfdc55e7524c0172339f62b9fba644f37f404f Mon Sep 17 00:00:00 2001 From: Mohammed Sameer Date: Sun, 18 Aug 2013 05:05:59 +0300 Subject: [PATCH] Fixes for qml/js debugging If we are compiled with qmljs debugging then we initialize it immediately before constructing QApplication Seems to fail otherwise. --- src/main.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 407095b..c16eb46 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -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); -- 2.25.1