Fixed deprecated method QComboBox::currentIndexChanged (#2511)

Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
This commit is contained in:
Paweł 2021-03-13 17:25:39 +01:00 committed by GitHub
parent d1a10d3c1f
commit cd1f4d0c78
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -172,13 +172,11 @@ public:
this->managedConnections_);
QObject::connect(
combo,
QOverload<const QString &>::of(&QComboBox::currentIndexChanged),
// &QComboBox::editTextChanged,
combo, QOverload<const int>::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();
});