From b6669f7d6cd7a001fff5d873ee216204dd3dc13e Mon Sep 17 00:00:00 2001 From: David Edmundson Date: Fri, 16 Aug 2013 21:54:01 +0100 Subject: [PATCH] Enable QML Debugger REVIEW: 112127 --- main.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/main.cpp b/main.cpp index 18d381a0d..7a399384e 100644 --- a/main.cpp +++ b/main.cpp @@ -25,6 +25,7 @@ #include "desktopcorona.h" #include "shellpluginloader.h" +#include static const char description[] = "Plasma Shell"; static const char version[] = "2.0"; @@ -43,6 +44,12 @@ int main(int argc, char** argv) ki18n("Plasma Shell"), version); + //enable the QML debugger only if -qmljsdebugger is passed as a command line arg + //this must be called before the QApplication constructor + if (KCmdLineArgs::parsedArgs("qt")->isSet("qmljsdebugger")) { + QQmlDebuggingEnabler enabler; + } + QApplication app(argc, argv); Plasma::PluginLoader::setPluginLoader(new ShellPluginLoader);