aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorin1tiate <woodward.randall02+github@gmail.com>2022-07-19 08:10:07 -0500
committerin1tiate <woodward.randall02+github@gmail.com>2022-07-19 08:10:07 -0500
commitdf7214fdb596ad4854c52d7f85e57643997a9d0e (patch)
tree946384fcc089dd603b84acf8db94494febb75a0f
parent972ce47fc2c9c9ddcb69488f53a0e85f3c78db83 (diff)
Make lambda captures of 'this' explicit
-rw-r--r--src/aobutton.cpp2
-rw-r--r--src/aoimage.cpp2
-rw-r--r--src/aooptionsdialog.cpp10
-rw-r--r--src/courtroom.cpp2
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 759d49d4..1d1a5ebb 100644
--- a/src/aooptionsdialog.cpp
+++ b/src/aooptionsdialog.cpp
@@ -854,7 +854,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;
@@ -872,7 +872,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;
@@ -890,7 +890,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;
@@ -912,12 +912,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 30d226e1..4581c2a2 100644
--- a/src/courtroom.cpp
+++ b/src/courtroom.cpp
@@ -1807,7 +1807,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#