qt/0067-Allow-qmljsdebugger-ar...

44 lines
1.8 KiB
Diff

From 9fbefb4503235b634f91b16018a6fe1a104a3f0d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Aur=C3=A9lien=20G=C3=A2teau?= <agateau@kde.org>
Date: Thu, 11 Oct 2012 11:15:03 +0200
Subject: [PATCH 067/246] Allow qmljsdebugger argument and value to be
separated by a space
This change makes it possible to use the QML JS debugger with KDE
applications.
Change-Id: I1c6615c604a4023062fe6e6ead66dfcea9f8d493
Reviewed-by: David Faure (KDE) <faure@kde.org>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
(cherry picked from qtbase/fea68274b89a9bcde55eabbf6eb7bf2e8376d930)
---
src/corelib/kernel/qcoreapplication.cpp | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp
index bb07d74..483c9fe 100644
--- a/src/corelib/kernel/qcoreapplication.cpp
+++ b/src/corelib/kernel/qcoreapplication.cpp
@@ -236,6 +236,9 @@ void QCoreApplicationPrivate::processCommandLineArguments()
QByteArray arg = argv[i];
if (arg.startsWith("-qmljsdebugger=")) {
*qmljs_debug_arguments() = QString::fromLocal8Bit(arg.right(arg.length() - 15));
+ } else if (arg == "-qmljsdebugger" && i < argc - 1) {
+ ++i;
+ *qmljs_debug_arguments() = QString::fromLocal8Bit(argv[i]);
} else {
argv[j++] = argv[i];
}
@@ -2319,6 +2322,7 @@ QStringList QCoreApplication::arguments()
l1arg.startsWith("-qmljsdebugger="))
;
else if (l1arg == "-style" ||
+ l1arg == "-qmljsdebugger" ||
l1arg == "-session" ||
l1arg == "-graphicssystem" ||
l1arg == "-testability")
--
1.8.1.4