From 48d0394a66a4750ef049b976a4afb97e83634348 Mon Sep 17 00:00:00 2001 From: tobtoht Date: Mon, 27 Feb 2023 13:28:04 +0100 Subject: [PATCH] fix usage of QComboBox::currentIndexChanged --- src/SettingsDialog.cpp | 2 +- src/widgets/NetworkProxyWidget.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/SettingsDialog.cpp b/src/SettingsDialog.cpp index e15a142..e5fe82e 100644 --- a/src/SettingsDialog.cpp +++ b/src/SettingsDialog.cpp @@ -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::of(&QComboBox::currentIndexChanged), [](int index){ config()->set(Config::logLevel, index); if (!config()->get(Config::disableLogging).toBool()) { WalletManager::instance()->setLogLevel(index); diff --git a/src/widgets/NetworkProxyWidget.cpp b/src/widgets/NetworkProxyWidget.cpp index 9a354e8..36e8595 100644 --- a/src/widgets/NetworkProxyWidget.cpp +++ b/src/widgets/NetworkProxyWidget.cpp @@ -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::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::of(&QComboBox::currentIndexChanged), this, &NetworkProxyWidget::onProxySettingsChanged); // [Show Tor logs] ui->frame_torShowLogs->setVisible(!config()->get(Config::useLocalTor).toBool());