knotify: change the combo box index on KCM load

changing the combo box index changes the notification config widget

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2023-08-25 21:49:48 +03:00
parent a011628b2a
commit c516068d74

View file

@ -91,7 +91,12 @@ KCMNotification::~KCMNotification()
void KCMNotification::load()
{
m_notificationswidget->setNotification(s_kdenotification);
const int kdeindex = m_notificationsbox->findData(s_kdenotification);
if (kdeindex >= 0) {
m_notificationsbox->setCurrentIndex(kdeindex);
} else {
kWarning() << "could not find the index of" << s_kdenotification;
}
emit changed(false);
}