fix usage of QComboBox::currentIndexChanged

This commit is contained in:
tobtoht 2023-02-27 13:28:04 +01:00
parent 5bceb67de0
commit 48d0394a66
No known key found for this signature in database
GPG key ID: E45B10DD027D2472
2 changed files with 3 additions and 3 deletions

View file

@ -221,7 +221,7 @@ void Settings::setupStorageTab() {
// [Log level]
ui->comboBox_logLevel->setCurrentIndex(config()->get(Config::logLevel).toInt());
connect(ui->comboBox_logLevel, &QComboBox::currentIndexChanged, [](int index){
connect(ui->comboBox_logLevel, QOverload<int>::of(&QComboBox::currentIndexChanged), [](int index){
config()->set(Config::logLevel, index);
if (!config()->get(Config::disableLogging).toBool()) {
WalletManager::instance()->setLogLevel(index);

View file

@ -19,7 +19,7 @@ NetworkProxyWidget::NetworkProxyWidget(QWidget *parent)
ui->setupUi(this);
ui->comboBox_proxy->setCurrentIndex(config()->get(Config::proxy).toInt());
connect(ui->comboBox_proxy, &QComboBox::currentIndexChanged, [this](int index){
connect(ui->comboBox_proxy, QOverload<int>::of(&QComboBox::currentIndexChanged), [this](int index){
this->onProxySettingsChanged();
ui->frame_proxy->setVisible(index != Config::Proxy::None);
ui->groupBox_proxySettings->setTitle(QString("%1 settings").arg(ui->comboBox_proxy->currentText()));
@ -64,7 +64,7 @@ NetworkProxyWidget::NetworkProxyWidget(QWidget *parent)
// [Node traffic]
ui->comboBox_torNodeTraffic->setCurrentIndex(config()->get(Config::torPrivacyLevel).toInt());
connect(ui->comboBox_torNodeTraffic, &QComboBox::currentIndexChanged, this, &NetworkProxyWidget::onProxySettingsChanged);
connect(ui->comboBox_torNodeTraffic, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &NetworkProxyWidget::onProxySettingsChanged);
// [Show Tor logs]
ui->frame_torShowLogs->setVisible(!config()->get(Config::useLocalTor).toBool());