summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@digia.com>2009-10-20 11:47:42 (GMT)
committerMiikka Heikkinen <miikka.heikkinen@digia.com>2009-10-20 11:52:18 (GMT)
commitc238f7b7e299e742e71fdb043a7bc81bbfd6c419 (patch)
treea7e3cba440d16805d4aaf5161f76f39e562b12cb /src
parentf7d826f1a42c912f1db15da0a1cefe13bdd54906 (diff)
downloadQt-c238f7b7e299e742e71fdb043a7bc81bbfd6c419.zip
Qt-c238f7b7e299e742e71fdb043a7bc81bbfd6c419.tar.gz
Qt-c238f7b7e299e742e71fdb043a7bc81bbfd6c419.tar.bz2
Fixed QFileDialog crash on Symbian
softKeyActions QHash in QDialogButtonBoxPrivate was not kept properly in sync with standardButtonHash, causing QFileDialog to crash upon startup. Reviewed-by: Sami Merila
Diffstat (limited to 'src')
-rw-r--r--src/gui/widgets/qdialogbuttonbox.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gui/widgets/qdialogbuttonbox.cpp b/src/gui/widgets/qdialogbuttonbox.cpp
index 10f8db8..2231b98 100644
--- a/src/gui/widgets/qdialogbuttonbox.cpp
+++ b/src/gui/widgets/qdialogbuttonbox.cpp
@@ -873,6 +873,11 @@ void QDialogButtonBox::setOrientation(Qt::Orientation orientation)
void QDialogButtonBox::clear()
{
Q_D(QDialogButtonBox);
+#ifdef QT_SOFTKEYS_ENABLED
+ // Delete softkey actions as they have the buttons as parents
+ qDeleteAll(d->softKeyActions.values());
+ d->softKeyActions.clear();
+#endif
// Remove the created standard buttons, they should be in the other lists, which will
// do the deletion
d->standardButtonHash.clear();
@@ -1025,6 +1030,11 @@ QPushButton *QDialogButtonBox::addButton(StandardButton button)
void QDialogButtonBox::setStandardButtons(StandardButtons buttons)
{
Q_D(QDialogButtonBox);
+#ifdef QT_SOFTKEYS_ENABLED
+ // Delete softkey actions since they have the buttons as parents
+ qDeleteAll(d->softKeyActions.values());
+ d->softKeyActions.clear();
+#endif
// Clear out all the old standard buttons, then recreate them.
qDeleteAll(d->standardButtonHash.keys());
d->standardButtonHash.clear();