diff options
author | Sami Merilä <sami.merila@nokia.com> | 2009-10-16 12:45:18 (GMT) |
---|---|---|
committer | Sami Merilä <sami.merila@nokia.com> | 2009-10-16 12:45:18 (GMT) |
commit | 25f4ccc3a9de2e4610974540f88c331238218c72 (patch) | |
tree | 24a7234243ebbf823d641c8cfd36a939bc8ecffb /src/gui/widgets | |
parent | 93c7ab5a2b10481e4f10a6477379d8157ae5f7b0 (diff) | |
download | Qt-25f4ccc3a9de2e4610974540f88c331238218c72.zip Qt-25f4ccc3a9de2e4610974540f88c331238218c72.tar.gz Qt-25f4ccc3a9de2e4610974540f88c331238218c72.tar.bz2 |
Softkeys remain disabled if action owning action widget is enabled
Softkeys have a QAction that is related to some action widget.
The initial state of the action was set according the state of action
widget (enabled/disabled). Now, if action widget's state changes,
the softkey's action remain in the initial state.
This was fixed by removing the enable/disable from the QAction and
instead use the real state of action widget when handling the
command of softkey.
Task-number: QTBUG-4619
Reviewed-by: Janne Anttila
Diffstat (limited to 'src/gui/widgets')
-rw-r--r-- | src/gui/widgets/qdialogbuttonbox.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/gui/widgets/qdialogbuttonbox.cpp b/src/gui/widgets/qdialogbuttonbox.cpp index 280ca63..10f8db8 100644 --- a/src/gui/widgets/qdialogbuttonbox.cpp +++ b/src/gui/widgets/qdialogbuttonbox.cpp @@ -560,7 +560,7 @@ QAction* QDialogButtonBoxPrivate::createSoftKey(QAbstractButton *button, QDialog Q_Q(QDialogButtonBox); QAction::SoftKeyRole softkeyRole; - QAction *action = new QAction(button->text(), q); + QAction *action = new QAction(button->text(), button); switch (role) { case ApplyRole: @@ -581,7 +581,6 @@ QAction* QDialogButtonBoxPrivate::createSoftKey(QAbstractButton *button, QDialog } QObject::connect(action, SIGNAL(triggered()), button, SIGNAL(clicked())); action->setSoftKeyRole(softkeyRole); - action->setEnabled(button->isEnabled()); return action; } #endif |