[Window Rules] Fix simple shortcut not being transfered to text field

The dialog only had a "Close" button but the text was only transfered in accepted()

Also fix the position of the QDialogButtonBox which is swapped and so the buttons appear at the top.

BUG: 360521
FIXED-IN: 5.6.1

Differential Revision: https://phabricator.kde.org/D1173
icc-effect-5.14.5
Kai Uwe Broulik 2016-03-21 10:28:21 +01:00
parent 4a05cc2f54
commit f9da3fb0eb
1 changed files with 2 additions and 2 deletions

View File

@ -878,8 +878,8 @@ EditShortcutDialog::EditShortcutDialog(QWidget* parent, const char* name)
connect(buttons, SIGNAL(accepted()), SLOT(accept()));
connect(buttons, SIGNAL(rejected()), SLOT(reject()));
layout()->addWidget(buttons);
layout()->addWidget(widget);
layout()->addWidget(buttons);
}
void EditShortcutDialog::setShortcut(const QString& cut)
@ -900,7 +900,7 @@ ShortcutDialog::ShortcutDialog(const QKeySequence& cut, QWidget* parent)
// It's a global shortcut so don't allow multikey shortcuts
widget->setMultiKeyShortcutsAllowed(false);
QDialogButtonBox* buttons = new QDialogButtonBox(QDialogButtonBox::Close, this);
QDialogButtonBox* buttons = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, this);
connect(buttons, SIGNAL(accepted()), SLOT(accept()));
connect(buttons, SIGNAL(rejected()), SLOT(reject()));