From a592a3e88204b791154e5d79b8257afad0eff02b Mon Sep 17 00:00:00 2001 From: TranRed Date: Sun, 28 Apr 2019 13:15:48 +0200 Subject: [PATCH] Connected ComboBox to currentIndexChanged implemented proper connection to combobox (currentIndexChanged instead of currentTextChanged) Thanks, pajlada! FeelsGoodMan --- src/widgets/settingspages/NotificationPage.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/widgets/settingspages/NotificationPage.cpp b/src/widgets/settingspages/NotificationPage.cpp index dfbc5574e..de7995885 100644 --- a/src/widgets/settingspages/NotificationPage.cpp +++ b/src/widgets/settingspages/NotificationPage.cpp @@ -153,10 +153,10 @@ QComboBox *NotificationPage::createToastReactionComboBox( }, managedConnections); - QObject::connect(toastReactionOptions, &QComboBox::currentTextChanged, - [setting](const QString &newValue) { - getSettings()->openFromToast.setValue(static_cast( - Toasts::findReactionFromString(newValue))); + QObject::connect(toastReactionOptions, + QOverload::of(&QComboBox::currentIndexChanged), + [](const int &newValue) { + getSettings()->openFromToast.setValue(newValue); }); return toastReactionOptions;