summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets
diff options
context:
space:
mode:
authorSami Merilä <sami.merila@nokia.com>2009-09-28 13:24:48 (GMT)
committerSami Merilä <sami.merila@nokia.com>2009-09-28 13:24:48 (GMT)
commit3a52aeb622da3f7d4171ea64df7896fa5d2d7d4a (patch)
treeb506f888fb69c3ca83ebdbba64a9ac9df83a9480 /src/gui/widgets
parent726ce1dcba37d85bc743559e1b882a72413d1d82 (diff)
downloadQt-3a52aeb622da3f7d4171ea64df7896fa5d2d7d4a.zip
Qt-3a52aeb622da3f7d4171ea64df7896fa5d2d7d4a.tar.gz
Qt-3a52aeb622da3f7d4171ea64df7896fa5d2d7d4a.tar.bz2
Triggering softkey action for disbled widget causes a crash.
Softkey actions need to copy enable state from action widget to prevent crash when action is triggered and action widget is disabled. OPEN: dynamically setting enable state for softkey actions. Task-number: QT-2117 Reviewed-by: Jason Barron
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/qdialogbuttonbox.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gui/widgets/qdialogbuttonbox.cpp b/src/gui/widgets/qdialogbuttonbox.cpp
index 39566ef..6cc720d 100644
--- a/src/gui/widgets/qdialogbuttonbox.cpp
+++ b/src/gui/widgets/qdialogbuttonbox.cpp
@@ -593,6 +593,7 @@ QAction* QDialogButtonBoxPrivate::createSoftKey(QAbstractButton *button, QDialog
}
QObject::connect(action, SIGNAL(triggered()), button, SIGNAL(clicked()));
action->setSoftKeyRole(softkeyRole);
+ action->setEnabled(button->isEnabled());
return action;
}
#endif