[kwin/kcmrules] Call setupUi before accessing the ui widgets

This caused a crash with Qt 5.3 dev branch as the widgets are null
before setupUi is called. Might be a bug in Qt but still it makes
sense to first call setupUi and then do further changes to the Ui.
This commit is contained in:
Martin Gräßlin 2014-01-30 10:39:40 +01:00
parent 823222567e
commit 981e7afa96

View file

@ -57,12 +57,12 @@ RulesWidget::RulesWidget(QWidget* parent)
: detect_dlg(nullptr)
{
Q_UNUSED(parent);
setupUi(this);
QRegularExpressionValidator* validator = new QRegularExpressionValidator(QRegularExpression("[0-9\-+,xX:]*"), this);
maxsize->setValidator(validator);
minsize->setValidator(validator);
position->setValidator(validator);
Ui::RulesWidgetBase::size->setValidator(validator);
setupUi(this);
QString enableDesc =
i18n("Enable this checkbox to alter this window property for the specified window(s).");