Skip to content

Commit 8af10d7

Browse files
committed
fix: warning with C++20 and gcc compiler
1 parent 70ed6b4 commit 8af10d7

File tree

4 files changed

+15
-15
lines changed

4 files changed

+15
-15
lines changed

src/qt/appearancewidget.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@ AppearanceWidget::AppearanceWidget(QWidget* parent) :
4646
connect(ui->fontWeightNormalSlider, &QSlider::valueChanged, [this](auto nValue) { updateFontWeightNormal(nValue); });
4747
connect(ui->fontWeightBoldSlider, &QSlider::valueChanged, [this](auto nValue) { updateFontWeightBold(nValue); });
4848

49-
connect(ui->theme, &QComboBox::currentTextChanged, [=]() { Q_EMIT appearanceChanged(); });
50-
connect(ui->fontFamily, &QComboBox::currentTextChanged, [=]() { Q_EMIT appearanceChanged(); });
51-
connect(ui->fontScaleSlider, &QSlider::sliderReleased, [=]() { Q_EMIT appearanceChanged(); });
52-
connect(ui->fontWeightNormalSlider, &QSlider::sliderReleased, [=]() { Q_EMIT appearanceChanged(); });
53-
connect(ui->fontWeightBoldSlider, &QSlider::sliderReleased, [=]() { Q_EMIT appearanceChanged(); });
49+
connect(ui->theme, &QComboBox::currentTextChanged, [this]() { Q_EMIT appearanceChanged(); });
50+
connect(ui->fontFamily, &QComboBox::currentTextChanged, [this]() { Q_EMIT appearanceChanged(); });
51+
connect(ui->fontScaleSlider, &QSlider::sliderReleased, [this]() { Q_EMIT appearanceChanged(); });
52+
connect(ui->fontWeightNormalSlider, &QSlider::sliderReleased, [this]() { Q_EMIT appearanceChanged(); });
53+
connect(ui->fontWeightBoldSlider, &QSlider::sliderReleased, [this]() { Q_EMIT appearanceChanged(); });
5454
}
5555

5656
AppearanceWidget::~AppearanceWidget()

src/qt/bitcoingui.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ BitcoinGUI::BitcoinGUI(interfaces::Node& node, const NetworkStyle* networkStyle,
240240
bool fDebugCustomStyleSheets = gArgs.GetBoolArg("-debug-ui", false) && GUIUtil::isStyleSheetDirectoryCustom();
241241
if (fDebugCustomStyleSheets) {
242242
timerCustomCss = new QTimer(this);
243-
QObject::connect(timerCustomCss, &QTimer::timeout, [=]() {
243+
QObject::connect(timerCustomCss, &QTimer::timeout, [this]() {
244244
if (!m_node.shutdownRequested()) {
245245
GUIUtil::loadStyleSheet();
246246
}
@@ -291,7 +291,7 @@ void BitcoinGUI::startSpinner()
291291
};
292292

293293
timerSpinner = new QTimer(this);
294-
QObject::connect(timerSpinner, &QTimer::timeout, [=]() {
294+
QObject::connect(timerSpinner, &QTimer::timeout, [this, getNextFrame]() {
295295
if (timerSpinner == nullptr) {
296296
return;
297297
}
@@ -319,7 +319,7 @@ void BitcoinGUI::startConnectingAnimation()
319319
}
320320

321321
timerConnecting = new QTimer(this);
322-
QObject::connect(timerConnecting, &QTimer::timeout, [=]() {
322+
QObject::connect(timerConnecting, &QTimer::timeout, [this]() {
323323

324324
if (timerConnecting == nullptr) {
325325
return;
@@ -1353,7 +1353,7 @@ void BitcoinGUI::openOptionsDialogWithTab(OptionsDialog::Tab tab)
13531353
connect(dlg, &OptionsDialog::quitOnReset, this, &BitcoinGUI::quitRequested);
13541354
dlg->setCurrentTab(tab);
13551355
dlg->setModel(clientModel->getOptionsModel());
1356-
connect(dlg, &OptionsDialog::appearanceChanged, [=]() {
1356+
connect(dlg, &OptionsDialog::appearanceChanged, [this]() {
13571357
updateWidth();
13581358
});
13591359
GUIUtil::ShowModalDialogAndDeleteOnClose(dlg);

src/qt/optionsdialog.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ OptionsDialog::OptionsDialog(QWidget *parent, bool enableWallet) :
194194
appearanceLayout->addWidget(appearance);
195195
ui->widgetAppearance->setLayout(appearanceLayout);
196196

197-
connect(appearance, &AppearanceWidget::appearanceChanged, [=](){
197+
connect(appearance, &AppearanceWidget::appearanceChanged, [this](){
198198
updateWidth();
199199
Q_EMIT appearanceChanged();
200200
});
@@ -277,13 +277,13 @@ void OptionsDialog::setModel(OptionsModel *_model)
277277
connect(ui->lang, qOverload<>(&QValueComboBox::valueChanged), [this]{ showRestartWarning(); });
278278
connect(ui->thirdPartyTxUrls, &QLineEdit::textChanged, [this]{ showRestartWarning(); });
279279

280-
connect(ui->coinJoinEnabled, &QCheckBox::clicked, [=](bool fChecked) {
280+
connect(ui->coinJoinEnabled, &QCheckBox::clicked, [this](bool fChecked) {
281281
#ifdef ENABLE_WALLET
282282
model->node().coinJoinOptions().setEnabled(fChecked);
283283
#endif
284284
updateCoinJoinVisibility();
285-
if (_model != nullptr) {
286-
_model->emitCoinJoinEnabledChanged();
285+
if (this->model != nullptr) {
286+
this->model->emitCoinJoinEnabledChanged();
287287
}
288288
updateWidth();
289289
});
@@ -293,7 +293,7 @@ void OptionsDialog::setModel(OptionsModel *_model)
293293
// Store the current CoinJoin enabled state to recover it if it gets changed but the dialog gets not accepted but declined.
294294
#ifdef ENABLE_WALLET
295295
fCoinJoinEnabledPrev = model->node().coinJoinOptions().isEnabled();
296-
connect(this, &OptionsDialog::rejected, [=]() {
296+
connect(this, &OptionsDialog::rejected, [this]() {
297297
if (fCoinJoinEnabledPrev != model->node().coinJoinOptions().isEnabled()) {
298298
ui->coinJoinEnabled->click();
299299
}

src/qt/overviewpage.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ void OverviewPage::setWalletModel(WalletModel *model)
328328
connect(model->getOptionsModel(), &OptionsModel::coinJoinRoundsChanged, this, &OverviewPage::updateCoinJoinProgress);
329329
connect(model->getOptionsModel(), &OptionsModel::coinJoinAmountChanged, this, &OverviewPage::updateCoinJoinProgress);
330330
connect(model->getOptionsModel(), &OptionsModel::AdvancedCJUIChanged, this, &OverviewPage::updateAdvancedCJUI);
331-
connect(model->getOptionsModel(), &OptionsModel::coinJoinEnabledChanged, [=]() {
331+
connect(model->getOptionsModel(), &OptionsModel::coinJoinEnabledChanged, [this]() {
332332
coinJoinStatus(true);
333333
});
334334

0 commit comments

Comments
 (0)