summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gui/widgets/qdialogbuttonbox.cpp18
1 files changed, 4 insertions, 14 deletions
diff --git a/src/gui/widgets/qdialogbuttonbox.cpp b/src/gui/widgets/qdialogbuttonbox.cpp
index 6cc720d..280ca63 100644
--- a/src/gui/widgets/qdialogbuttonbox.cpp
+++ b/src/gui/widgets/qdialogbuttonbox.cpp
@@ -468,18 +468,6 @@ void QDialogButtonBoxPrivate::layoutButtons()
if (center)
buttonLayout->addStretch();
-
-#ifdef QT_SOFTKEYS_ENABLED
- QWidget *dialog = 0;
- QWidget *p = q;
- while (p && !p->isWindow()) {
- p = p->parentWidget();
- if (dialog = qobject_cast<QDialog *>(p))
- break;
- }
- if (dialog)
- q->setFixedSize(0, 0);
-#endif
}
QPushButton *QDialogButtonBoxPrivate::createButton(QDialogButtonBox::StandardButton sbutton,
@@ -1196,10 +1184,12 @@ bool QDialogButtonBox::event(QEvent *event)
if (!hasDefault && firstAcceptButton)
firstAcceptButton->setDefault(true);
#ifdef QT_SOFTKEYS_ENABLED
- if (dialog)
+ if (dialog) {
+ setFixedSize(0,0);
dialog->addActions(d->softKeyActions.values());
- else
+ } else {
addActions(d->softKeyActions.values());
+ }
#endif
}else if (event->type() == QEvent::LanguageChange) {
d->retranslateStrings();