From cd1f4d0c78202b8f0dae3d8d3d2779e7bfa3b570 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82?= Date: Sat, 13 Mar 2021 17:25:39 +0100 Subject: [PATCH] Fixed deprecated method QComboBox::currentIndexChanged (#2511) Co-authored-by: pajlada --- src/widgets/settingspages/GeneralPageView.hpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/widgets/settingspages/GeneralPageView.hpp b/src/widgets/settingspages/GeneralPageView.hpp index 5a295ff93..6ce83c5b7 100644 --- a/src/widgets/settingspages/GeneralPageView.hpp +++ b/src/widgets/settingspages/GeneralPageView.hpp @@ -172,13 +172,11 @@ public: this->managedConnections_); QObject::connect( - combo, - QOverload::of(&QComboBox::currentIndexChanged), - // &QComboBox::editTextChanged, + combo, QOverload::of(&QComboBox::currentIndexChanged), [combo, &setting, - setValue = std::move(setValue)](const QString &newValue) { - setting = setValue( - DropdownArgs{newValue, combo->currentIndex(), combo}); + setValue = std::move(setValue)](const int newIndex) { + setting = setValue(DropdownArgs{combo->itemText(newIndex), + combo->currentIndex(), combo}); getApp()->windows->forceLayoutChannelViews(); });