commit a3704d9aaf52844739496a3a5eb1de28e1ab2afe
Author: Kai Koehne <kai.koehne@nokia.com>
Date:   Thu Oct 28 07:13:41 2010 +0200

    qlmdebugging: Fix crash on some Symbian phones
    
    Access the static qmljsdebugarguments QString in QApplicationPrivate
    through an accessor.
    
    Task-number: QTBUG-14670

diff --git a/src/declarative/debugger/qdeclarativedebugservice.cpp b/src/declarative/debugger/qdeclarativedebugservice.cpp
index bdbc8bf..b65e35b 100644
--- a/src/declarative/debugger/qdeclarativedebugservice.cpp
+++ b/src/declarative/debugger/qdeclarativedebugservice.cpp
@@ -204,13 +204,13 @@ QDeclarativeDebugServer *QDeclarativeDebugServer::instance()
         bool ok = false;
 
         // format: qmljsdebugger=port:3768[,block]
-        if (!appD->qmljsDebugArguments.isEmpty()) {
+        if (!appD->qmljsDebugArguments().isEmpty()) {
 
-            if (appD->qmljsDebugArguments.indexOf(QLatin1String("port:")) == 0) {
-                int separatorIndex = appD->qmljsDebugArguments.indexOf(QLatin1Char(','));
-                port = appD->qmljsDebugArguments.mid(5, separatorIndex - 5).toInt(&ok);
+            if (appD->qmljsDebugArguments().indexOf(QLatin1String("port:")) == 0) {
+                int separatorIndex = appD->qmljsDebugArguments().indexOf(QLatin1Char(','));
+                port = appD->qmljsDebugArguments().mid(5, separatorIndex - 5).toInt(&ok);
             }
-            block = appD->qmljsDebugArguments.contains(QLatin1String("block"));
+            block = appD->qmljsDebugArguments().contains(QLatin1String("block"));
 
             if (ok) {
                 server = new QDeclarativeDebugServer(port);
@@ -221,7 +221,7 @@ QDeclarativeDebugServer *QDeclarativeDebugServer::instance()
             } else {
                 qWarning(QString("QDeclarativeDebugServer: Ignoring \"-qmljsdebugger=%1\". "
                                  "Format is -qmljsdebugger=port:<port>[,block]").arg(
-                             appD->qmljsDebugArguments).toAscii().constData());
+                             appD->qmljsDebugArguments()).toAscii().constData());
             }
         }
 #endif
diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp
index 745cd2e..f38e9a9 100644
--- a/src/gui/kernel/qapplication.cpp
+++ b/src/gui/kernel/qapplication.cpp
@@ -494,7 +494,7 @@ bool QApplicationPrivate::fade_tooltip = false;
 bool QApplicationPrivate::animate_toolbox = false;
 bool QApplicationPrivate::widgetCount = false;
 bool QApplicationPrivate::load_testability = false;
-QString QApplicationPrivate::qmljsDebugArguments;
+QString QApplicationPrivate::qmljs_debug_arguments;
 #ifdef QT_KEYPAD_NAVIGATION
 #  ifdef Q_OS_SYMBIAN
 Qt::NavigationMode QApplicationPrivate::navigationMode = Qt::NavigationModeKeypadDirectional;
@@ -567,7 +567,7 @@ void QApplicationPrivate::process_cmdline()
         if (arg == "-qdevel" || arg == "-qdebug") {
             // obsolete argument
         } else if (arg.indexOf("-qmljsdebugger=", 0) != -1) {
-            qmljsDebugArguments = QString::fromLocal8Bit(arg.right(arg.length() - 15));
+            qmljs_debug_arguments = 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) {
@@ -6077,6 +6077,11 @@ QPixmap QApplicationPrivate::getPixmapCursor(Qt::CursorShape cshape)
     return QPixmap();
 }
 
+QString QApplicationPrivate::qmljsDebugArguments()
+{
+    return qmljs_debug_arguments;
+}
+
 QT_END_NAMESPACE
 
 #include "moc_qapplication.cpp"
diff --git a/src/gui/kernel/qapplication_p.h b/src/gui/kernel/qapplication_p.h
index e0ef8b3..7e93acd 100644
--- a/src/gui/kernel/qapplication_p.h
+++ b/src/gui/kernel/qapplication_p.h
@@ -446,7 +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.
+    static QString qmljs_debug_arguments; // a string containing arguments for js/qml debugging.
+    static QString qmljsDebugArguments(); // access string from other libraries
 
 #ifdef Q_WS_MAC
     static bool native_modal_dialog_active;
