summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qsoftkeymanager_common_p.h
diff options
context:
space:
mode:
authorJason Barron <jbarron@trolltech.com>2010-07-02 14:16:59 (GMT)
committerJason Barron <jbarron@trolltech.com>2010-07-07 07:32:39 (GMT)
commit28651cfc0ce2954c0b6c0e5d3587e4d8b001c1de (patch)
tree2641e96621eb66099e43b3ad6a57146fa5de0f3d /src/gui/kernel/qsoftkeymanager_common_p.h
parent19f55bfa5bf15b5593f3021071374dbe2f71f8c8 (diff)
downloadQt-28651cfc0ce2954c0b6c0e5d3587e4d8b001c1de.zip
Qt-28651cfc0ce2954c0b6c0e5d3587e4d8b001c1de.tar.gz
Qt-28651cfc0ce2954c0b6c0e5d3587e4d8b001c1de.tar.bz2
Fix crash when handleCommand() called before softkeys are updated
Softkeys are updated via a compressable event that is posted via the event loop. Since these events are not delivered immediately, there is a chance that a call to handleCommand() could happen before the softkeys have been updated which can lead to a crash if the previous QAction's have been deleted already since the data structure used by QSoftKeyManager is outdated. The likeliness of this is increased by the fact that S60 commands are normally sent from the WSERV active object which has a higher priority than the active object used by Qt's event loop which means commands will preempt the event loop. The fix is to introduce a flag that keeps track of pending update requests and if a command is received while there are outstanding requests, force the softkeys to be updated before handling the command. Task-number: QT-3571 Reviewed-by: axis
Diffstat (limited to 'src/gui/kernel/qsoftkeymanager_common_p.h')
-rw-r--r--src/gui/kernel/qsoftkeymanager_common_p.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/kernel/qsoftkeymanager_common_p.h b/src/gui/kernel/qsoftkeymanager_common_p.h
index 04ddf7d..1b364d4 100644
--- a/src/gui/kernel/qsoftkeymanager_common_p.h
+++ b/src/gui/kernel/qsoftkeymanager_common_p.h
@@ -71,7 +71,7 @@ protected:
QHash<QAction*, Qt::Key> keyedActions;
QMultiHash<int, QAction*> requestedSoftKeyActions;
QWidget *initialSoftKeySource;
-
+ bool pendingUpdate;
};
QT_END_NAMESPACE