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);