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_); this->managedConnections_);
QObject::connect( QObject::connect(
combo, combo, QOverload<const int>::of(&QComboBox::currentIndexChanged),
QOverload<const QString &>::of(&QComboBox::currentIndexChanged),
// &QComboBox::editTextChanged,
[combo, &setting, [combo, &setting,
setValue = std::move(setValue)](const QString &newValue) { setValue = std::move(setValue)](const int newIndex) {
setting = setValue( setting = setValue(DropdownArgs{combo->itemText(newIndex),
DropdownArgs{newValue, combo->currentIndex(), combo}); combo->currentIndex(), combo});
getApp()->windows->forceLayoutChannelViews(); getApp()->windows->forceLayoutChannelViews();
}); });