diff --git a/kcm/src/widget.cpp b/kcm/src/widget.cpp --- a/kcm/src/widget.cpp +++ b/kcm/src/widget.cpp @@ -87,7 +87,7 @@ mPrimaryCombo = new QComboBox(this); mPrimaryCombo->setSizeAdjustPolicy(QComboBox::AdjustToContents); mPrimaryCombo->addItem(i18n("No primary screen")); - connect(mPrimaryCombo, static_cast(&QComboBox::currentIndexChanged), + connect(mPrimaryCombo, static_cast(&QComboBox::activated), this, &Widget::slotPrimaryChanged); hbox->addWidget(new QLabel(i18n("Primary display:"))); @@ -231,7 +231,6 @@ void Widget::initPrimaryCombo() { - mPrimaryCombo->blockSignals(true); mPrimaryCombo->clear(); mPrimaryCombo->addItem(i18n("No primary output")); @@ -245,7 +244,6 @@ mPrimaryCombo->setCurrentIndex(mPrimaryCombo->count() - 1); } } - mPrimaryCombo->blockSignals(false); } @@ -262,18 +260,14 @@ mPrimaryCombo->setCurrentIndex(0); return; } - mPrimaryCombo->blockSignals(true); mPrimaryCombo->setCurrentIndex(index); - mPrimaryCombo->blockSignals(false); } void Widget::slotPrimaryChanged(int index) { const int id = mPrimaryCombo->itemData(index).toInt(); for (KScreen::OutputPtr &output : mConfig->outputs()) { - output->blockSignals(true); output->setPrimary(output->id() == id); - output->blockSignals(false); } Q_EMIT changed();