diff options
| author | oldmud0 <oldmud0@users.noreply.github.com> | 2022-07-23 16:31:37 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-23 16:31:37 -0500 |
| commit | 0dac3cc2c017e8c785cb00c340ea37e050eb6366 (patch) | |
| tree | 68a3cdf38932dec0854d81a07eb40d9526b08977 | |
| parent | b0a958e7444193cd8e2b3e15027642b794ea5b8e (diff) | |
| parent | df7214fdb596ad4854c52d7f85e57643997a9d0e (diff) | |
Merge pull request #819 from AttorneyOnline/lambda-core
Make lambda captures of 'this' explicit
| -rw-r--r-- | src/aobutton.cpp | 2 | ||||
| -rw-r--r-- | src/aoimage.cpp | 2 | ||||
| -rw-r--r-- | src/aooptionsdialog.cpp | 10 | ||||
| -rw-r--r-- | src/courtroom.cpp | 2 |
4 files changed, 8 insertions, 8 deletions
diff --git a/src/aobutton.cpp b/src/aobutton.cpp index 242fe79a..6d25a05f 100644 --- a/src/aobutton.cpp +++ b/src/aobutton.cpp @@ -8,7 +8,7 @@ AOButton::AOButton(QWidget *parent, AOApplication *p_ao_app) { ao_app = p_ao_app; movie = new QMovie(this); - connect(movie, &QMovie::frameChanged, [=]{ + connect(movie, &QMovie::frameChanged, [this]{ this->setIcon(movie->currentPixmap().scaled(this->size(), Qt::IgnoreAspectRatio, Qt::SmoothTransformation)); this->setIconSize(QSize(this->width(), this->height())); }); diff --git a/src/aoimage.cpp b/src/aoimage.cpp index df69e46f..c488a093 100644 --- a/src/aoimage.cpp +++ b/src/aoimage.cpp @@ -12,7 +12,7 @@ AOImage::AOImage(QWidget *parent, AOApplication *p_ao_app, bool make_static) : Q if (!is_static) // Only create the QMovie if we're non-static { movie = new QMovie(this); - connect(movie, &QMovie::frameChanged, [=]{ + connect(movie, &QMovie::frameChanged, [this]{ QPixmap f_pixmap = movie->currentPixmap(); f_pixmap = f_pixmap.scaled(this->size(), Qt::IgnoreAspectRatio); diff --git a/src/aooptionsdialog.cpp b/src/aooptionsdialog.cpp index 0cd42cb3..18e2f716 100644 --- a/src/aooptionsdialog.cpp +++ b/src/aooptionsdialog.cpp @@ -869,7 +869,7 @@ AOOptionsDialog::AOOptionsDialog(QWidget *parent, AOApplication *p_ao_app) ui_mount_remove->setSizePolicy(stretch_btns); ui_mount_remove->setEnabled(false); ui_mount_buttons_layout->addWidget(ui_mount_remove, 0, 1, 1, 1); - connect(ui_mount_remove, &QPushButton::clicked, this, [=] { + connect(ui_mount_remove, &QPushButton::clicked, this, [this] { auto selected = ui_mount_list->selectedItems(); if (selected.isEmpty()) return; @@ -887,7 +887,7 @@ AOOptionsDialog::AOOptionsDialog(QWidget *parent, AOApplication *p_ao_app) ui_mount_up->setMaximumWidth(40); ui_mount_up->setEnabled(false); ui_mount_buttons_layout->addWidget(ui_mount_up, 0, 3, 1, 1); - connect(ui_mount_up, &QPushButton::clicked, this, [=] { + connect(ui_mount_up, &QPushButton::clicked, this, [this] { auto selected = ui_mount_list->selectedItems(); if (selected.isEmpty()) return; @@ -905,7 +905,7 @@ AOOptionsDialog::AOOptionsDialog(QWidget *parent, AOApplication *p_ao_app) ui_mount_down->setMaximumWidth(40); ui_mount_down->setEnabled(false); ui_mount_buttons_layout->addWidget(ui_mount_down, 0, 4, 1, 1); - connect(ui_mount_down, &QPushButton::clicked, this, [=] { + connect(ui_mount_down, &QPushButton::clicked, this, [this] { auto selected = ui_mount_list->selectedItems(); if (selected.isEmpty()) return; @@ -927,12 +927,12 @@ AOOptionsDialog::AOOptionsDialog(QWidget *parent, AOApplication *p_ao_app) "Use this when you have added an asset that takes precedence over another " "existing asset.")); ui_mount_buttons_layout->addWidget(ui_mount_clear_cache, 0, 6, 1, 1); - connect(ui_mount_clear_cache, &QPushButton::clicked, this, [=] { + connect(ui_mount_clear_cache, &QPushButton::clicked, this, [this] { asset_cache_dirty = true; ui_mount_clear_cache->setEnabled(false); }); - connect(ui_mount_list, &QListWidget::itemSelectionChanged, this, [=] { + connect(ui_mount_list, &QListWidget::itemSelectionChanged, this, [this] { auto selected_items = ui_mount_list->selectedItems(); bool row_selected = !ui_mount_list->selectedItems().isEmpty(); ui_mount_remove->setEnabled(row_selected); diff --git a/src/courtroom.cpp b/src/courtroom.cpp index 799e9fe2..1884c7c8 100644 --- a/src/courtroom.cpp +++ b/src/courtroom.cpp @@ -1829,7 +1829,7 @@ void Courtroom::on_chat_return_pressed() ui_ic_chat_message->blockSignals(true); QTimer::singleShot(ao_app->get_chat_ratelimit(), this, - [=] { ui_ic_chat_message->blockSignals(false); }); + [this] { ui_ic_chat_message->blockSignals(false); }); // MS# // deskmod# // pre-emote# |
