summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
diff options
context:
space:
mode:
authorJason McDonald <jason.mcdonald@nokia.com>2010-10-29 00:43:20 (GMT)
committerJason McDonald <jason.mcdonald@nokia.com>2010-10-29 00:43:20 (GMT)
commit8250d455d8d85c5fe0c819f997ba0902315bfce4 (patch)
treea645591db67cdb235a160e49ff154e3670c6f5a8 /src/gui/kernel
parent95b0b37704c97c5b4b48cd53c6592fc714c99828 (diff)
downloadQt-8250d455d8d85c5fe0c819f997ba0902315bfce4.zip
Qt-8250d455d8d85c5fe0c819f997ba0902315bfce4.tar.gz
Qt-8250d455d8d85c5fe0c819f997ba0902315bfce4.tar.bz2
Do not crash on Symbian
The qml debugging enabler in QtDeclarative made any Qt app crash which used QDeclarative. Reason was that QtDeclarative.dll tried to directly access (private) writable static data from QtGui.dll. This patch adds an accessor function for the data to QtGui, and the crash is gone. Done-by: Kai Koehne Reviewed-by: Kai Koehne (cherry picked from commit 2362d8b1e9fa86da1d3cc5dbb7d4467ec12311e1) Conflicts: src/declarative/debugger/qdeclarativedebugservice.cpp
Diffstat (limited to 'src/gui/kernel')
-rw-r--r--src/gui/kernel/qapplication.cpp9
-rw-r--r--src/gui/kernel/qapplication_p.h3
2 files changed, 9 insertions, 3 deletions
diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp
index 745cd2e..64237ab 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::qmljsDebugArgumentsString()
+{
+ 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..b98f562 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 qmljsDebugArgumentsString(); // access string from other libraries
#ifdef Q_WS_MAC
static bool native_modal_dialog_active;