diff options
author | Paul Olav Tvete <paul.tvete@nokia.com> | 2009-09-08 15:24:37 (GMT) |
---|---|---|
committer | Paul Olav Tvete <paul.tvete@nokia.com> | 2009-09-08 15:29:37 (GMT) |
commit | 5a3d0e73121e191fe2f1337ac8f6761c35868b66 (patch) | |
tree | 413ab998fcd90049ec3e5e083c65edb4e7223489 /src | |
parent | 10563ce08c79c88c762d463ec7b008524d1c1a67 (diff) | |
download | Qt-5a3d0e73121e191fe2f1337ac8f6761c35868b66.zip Qt-5a3d0e73121e191fe2f1337ac8f6761c35868b66.tar.gz Qt-5a3d0e73121e191fe2f1337ac8f6761c35868b66.tar.bz2 |
Fix crash when instantiating multiple QApplications on QWS
Copy variable initialization/cleanup code from X11
Reviewed-by: Tom
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/kernel/qapplication_qws.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gui/kernel/qapplication_qws.cpp b/src/gui/kernel/qapplication_qws.cpp index e3bd786..ba2e6a6 100644 --- a/src/gui/kernel/qapplication_qws.cpp +++ b/src/gui/kernel/qapplication_qws.cpp @@ -2202,6 +2202,8 @@ void qt_init(QApplicationPrivate *priv, int type) mouse_double_click_distance = read_int_env_var("QWS_DBLCLICK_DISTANCE", 5); + priv->inputContext = 0; + int flags = 0; char *p; int argc = priv->argc; @@ -2361,6 +2363,11 @@ void qt_cleanup() delete mouseInWidget; mouseInWidget = 0; + +#if !defined(QT_NO_IM) + delete QApplicationPrivate::inputContext; + QApplicationPrivate::inputContext = 0; +#endif } |