diff options
author | Lasse Holmstedt <lasse.holmstedt@nokia.com> | 2010-09-17 08:13:51 (GMT) |
---|---|---|
committer | Jason McDonald <jason.mcdonald@nokia.com> | 2010-09-23 01:57:42 (GMT) |
commit | c2b8b2f7a46dc25ec1a464f72fa301b1176cec8d (patch) | |
tree | 6c02fc5b7cea26bd7be0712adbf32c7a0fc71ada /src/gui/kernel | |
parent | c573a69b3ff4ec2f7126a86c30c8f110a974937a (diff) | |
download | Qt-c2b8b2f7a46dc25ec1a464f72fa301b1176cec8d.zip Qt-c2b8b2f7a46dc25ec1a464f72fa301b1176cec8d.tar.gz Qt-c2b8b2f7a46dc25ec1a464f72fa301b1176cec8d.tar.bz2 |
Make qml debugging work with command line arguments
The environment variables do not work for Symbian devices, so
without this change, QML debugging cannot be done on them.
In addition, configure now contains an option to disable qml
debugging entirely, due to it being a major security risk.
Reviewed-by: kkoehne
(cherry picked from commit a9e5329168cd9113bf41293c05193d8b099494c6)
Diffstat (limited to 'src/gui/kernel')
-rw-r--r-- | src/gui/kernel/qapplication.cpp | 6 | ||||
-rw-r--r-- | src/gui/kernel/qapplication_p.h | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp index 2fd2f46..43d5772 100644 --- a/src/gui/kernel/qapplication.cpp +++ b/src/gui/kernel/qapplication.cpp @@ -494,6 +494,7 @@ bool QApplicationPrivate::fade_tooltip = false; bool QApplicationPrivate::animate_toolbox = false; bool QApplicationPrivate::widgetCount = false; bool QApplicationPrivate::load_testability = false; +QString QApplicationPrivate::qmljsDebugArguments; #ifdef QT_KEYPAD_NAVIGATION # ifdef Q_OS_SYMBIAN Qt::NavigationMode QApplicationPrivate::navigationMode = Qt::NavigationModeKeypadDirectional; @@ -565,6 +566,8 @@ void QApplicationPrivate::process_cmdline() QString s; if (arg == "-qdevel" || arg == "-qdebug") { // obsolete argument + } else if (arg.indexOf("-qmljsdebugger=", 0) != -1) { + qmljsDebugArguments = QString::fromLocal8Bit(arg.right(arg.length() - 15)); } else if (arg.indexOf("-style=", 0) != -1) { s = QString::fromLocal8Bit(arg.right(arg.length() - 7).toLower()); } else if (arg == "-style" && i < argc-1) { @@ -670,6 +673,9 @@ void QApplicationPrivate::process_cmdline() Qt::RightToLeft \o -graphicssystem, sets the backend to be used for on-screen widgets and QPixmaps. Available options are \c{raster} and \c{opengl}. + \o -qmljsdebugger=, activates the QML/JS debugger with a specified port. + The value must be of format port:1234[,block], where block is optional + and will make the application wait until a debugger connects to it. \endlist The X11 version of Qt supports some traditional X11 command line options: diff --git a/src/gui/kernel/qapplication_p.h b/src/gui/kernel/qapplication_p.h index 8dc16e0..aa3a6d5 100644 --- a/src/gui/kernel/qapplication_p.h +++ b/src/gui/kernel/qapplication_p.h @@ -446,6 +446,8 @@ public: static bool animate_toolbox; static bool widgetCount; // Coupled with -widgetcount switch static bool load_testability; // Coupled with -testability switch + static QString qmljsDebugArguments; // a string containing arguments for js/qml debugging. + #ifdef Q_WS_MAC static bool native_modal_dialog_active; #endif |