diff --git a/cockatrice/src/client/tabs/tab_deck_editor.cpp b/cockatrice/src/client/tabs/tab_deck_editor.cpp index 999f22580..38599f5ee 100644 --- a/cockatrice/src/client/tabs/tab_deck_editor.cpp +++ b/cockatrice/src/client/tabs/tab_deck_editor.cpp @@ -1535,6 +1535,6 @@ void TabDeckEditor::showSearchSyntaxHelp() browser->document()->setDefaultStyleSheet(sheet); browser->setHtml(text); - connect(browser, &QTextBrowser::anchorClicked, [=](const QUrl &link) { searchEdit->setText(link.fragment()); }); + connect(browser, &QTextBrowser::anchorClicked, [this](const QUrl &link) { searchEdit->setText(link.fragment()); }); browser->show(); } diff --git a/cockatrice/src/client/tabs/tab_game.cpp b/cockatrice/src/client/tabs/tab_game.cpp index 76dd82ff5..d858a9362 100644 --- a/cockatrice/src/client/tabs/tab_game.cpp +++ b/cockatrice/src/client/tabs/tab_game.cpp @@ -1742,22 +1742,22 @@ void TabGame::createReplayDock() aReplaySkipForward = new QAction(timelineWidget); timelineWidget->addAction(aReplaySkipForward); connect(aReplaySkipForward, &QAction::triggered, this, - [=]() { timelineWidget->skipByAmount(ReplayTimelineWidget::SMALL_SKIP_MS); }); + [this] { timelineWidget->skipByAmount(ReplayTimelineWidget::SMALL_SKIP_MS); }); aReplaySkipBackward = new QAction(timelineWidget); timelineWidget->addAction(aReplaySkipBackward); connect(aReplaySkipBackward, &QAction::triggered, this, - [=]() { timelineWidget->skipByAmount(-ReplayTimelineWidget::SMALL_SKIP_MS); }); + [this] { timelineWidget->skipByAmount(-ReplayTimelineWidget::SMALL_SKIP_MS); }); aReplaySkipForwardBig = new QAction(timelineWidget); timelineWidget->addAction(aReplaySkipForwardBig); connect(aReplaySkipForwardBig, &QAction::triggered, this, - [=]() { timelineWidget->skipByAmount(ReplayTimelineWidget::BIG_SKIP_MS); }); + [this] { timelineWidget->skipByAmount(ReplayTimelineWidget::BIG_SKIP_MS); }); aReplaySkipBackwardBig = new QAction(timelineWidget); timelineWidget->addAction(aReplaySkipBackwardBig); connect(aReplaySkipBackwardBig, &QAction::triggered, this, - [=]() { timelineWidget->skipByAmount(-ReplayTimelineWidget::BIG_SKIP_MS); }); + [this] { timelineWidget->skipByAmount(-ReplayTimelineWidget::BIG_SKIP_MS); }); // buttons replayPlayButton = new QToolButton; diff --git a/cockatrice/src/client/tearoff_menu.h b/cockatrice/src/client/tearoff_menu.h index 20ee30e10..1c1258f5f 100644 --- a/cockatrice/src/client/tearoff_menu.h +++ b/cockatrice/src/client/tearoff_menu.h @@ -7,23 +7,23 @@ class TearOffMenu : public QMenu { public: - TearOffMenu(const QString &title, QWidget *parent = nullptr) : QMenu(title, parent) + explicit TearOffMenu(const QString &title, QWidget *parent = nullptr) : QMenu(title, parent) { connect(&SettingsCache::instance(), &SettingsCache::useTearOffMenusChanged, this, - [=](bool state) { setTearOffEnabled(state); }); + [this](const bool state) { setTearOffEnabled(state); }); setTearOffEnabled(SettingsCache::instance().getUseTearOffMenus()); } - TearOffMenu(QWidget *parent = nullptr) : QMenu(parent) + explicit TearOffMenu(QWidget *parent = nullptr) : QMenu(parent) { connect(&SettingsCache::instance(), &SettingsCache::useTearOffMenusChanged, this, - [=](bool state) { setTearOffEnabled(state); }); + [this](const bool state) { setTearOffEnabled(state); }); setTearOffEnabled(SettingsCache::instance().getUseTearOffMenus()); } TearOffMenu *addTearOffMenu(const QString &title) { - TearOffMenu *menu = new TearOffMenu(title, this); + auto *menu = new TearOffMenu(title, this); addMenu(menu); return menu; } diff --git a/cockatrice/src/game/zones/view_zone_widget.cpp b/cockatrice/src/game/zones/view_zone_widget.cpp index 59c45bf58..1489ab723 100644 --- a/cockatrice/src/game/zones/view_zone_widget.cpp +++ b/cockatrice/src/game/zones/view_zone_widget.cpp @@ -138,7 +138,7 @@ ZoneViewWidget::ZoneViewWidget(Player *_player, // QLabel sizes aren't taken into account until the widget is rendered. // Force refresh after 1ms to fix glitchy rendering with long QLabels. auto *lastResizeBeforeVisibleTimer = new QTimer(this); - connect(lastResizeBeforeVisibleTimer, &QTimer::timeout, this, [=] { + connect(lastResizeBeforeVisibleTimer, &QTimer::timeout, this, [=, this] { resizeToZoneContents(); disconnect(lastResizeBeforeVisibleTimer); lastResizeBeforeVisibleTimer->deleteLater(); diff --git a/cockatrice/src/server/user/user_info_box.cpp b/cockatrice/src/server/user/user_info_box.cpp index 364f38afd..a7857b170 100644 --- a/cockatrice/src/server/user/user_info_box.cpp +++ b/cockatrice/src/server/user/user_info_box.cpp @@ -253,7 +253,7 @@ void UserInfoBox::actPassword() connect(pend, // we need qoverload here in order to select the right version of this function QOverload::of(&PendingCommand::finished), - this, [=](const Response &response, const CommandContainer &, const QVariant &) { + this, [=, this](const Response &response, const CommandContainer &, const QVariant &) { if (response.response_code() == Response::RespOk) { changePassword(oldPassword, newPassword); } else {