Connected ComboBox to currentIndexChanged

implemented proper connection to combobox (currentIndexChanged instead of currentTextChanged)

Thanks, pajlada! FeelsGoodMan
This commit is contained in:
TranRed 2019-04-28 13:15:48 +02:00 committed by pajlada
parent 2a590adba7
commit a592a3e882

View file

@ -153,10 +153,10 @@ QComboBox *NotificationPage::createToastReactionComboBox(
}, },
managedConnections); managedConnections);
QObject::connect(toastReactionOptions, &QComboBox::currentTextChanged, QObject::connect(toastReactionOptions,
[setting](const QString &newValue) { QOverload<int>::of(&QComboBox::currentIndexChanged),
getSettings()->openFromToast.setValue(static_cast<int>( [](const int &newValue) {
Toasts::findReactionFromString(newValue))); getSettings()->openFromToast.setValue(newValue);
}); });
return toastReactionOptions; return toastReactionOptions;