diff options
author | Konstantinos Sideris <sideris.konstantin@gmail.com> | 2018-02-20 17:09:11 +0200 |
---|---|---|
committer | Konstantinos Sideris <sideris.konstantin@gmail.com> | 2018-02-20 17:09:11 +0200 |
commit | f95998a64bebcb12ffe07fcb6f23cdabff434641 (patch) | |
tree | 3a2388ebd9a271f59e3c8a8d36bb906c40fe3386 /src/timeline | |
parent | Scale down the preview image to fit in the application window (diff) | |
download | nheko-f95998a64bebcb12ffe07fcb6f23cdabff434641.tar.xz |
Be explicit about the captured parameters in lambdas
Diffstat (limited to 'src/timeline')
-rw-r--r-- | src/timeline/TimelineItem.cc | 10 | ||||
-rw-r--r-- | src/timeline/TimelineView.cc | 2 | ||||
-rw-r--r-- | src/timeline/widgets/AudioItem.cc | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/src/timeline/TimelineItem.cc b/src/timeline/TimelineItem.cc index 7756ba4a..02f22472 100644 --- a/src/timeline/TimelineItem.cc +++ b/src/timeline/TimelineItem.cc @@ -47,7 +47,7 @@ TimelineItem::init() receiptsMenu_ = new QMenu(this); showReadReceipts_ = new QAction("Read receipts", this); receiptsMenu_->addAction(showReadReceipts_); - connect(showReadReceipts_, &QAction::triggered, this, [=]() { + connect(showReadReceipts_, &QAction::triggered, this, [this]() { if (!event_id_.isEmpty()) ChatPage::instance()->showReadReceipts(event_id_); }); @@ -111,7 +111,7 @@ TimelineItem::TimelineItem(mtx::events::MessageType ty, messageLayout_->addLayout(headerLayout_, 1); - AvatarProvider::resolve(userid, [=](const QImage &img) { setUserAvatar(img); }); + AvatarProvider::resolve(userid, [this](const QImage &img) { setUserAvatar(img); }); } else { generateBody(body); setupSimpleLayout(); @@ -243,7 +243,7 @@ TimelineItem::TimelineItem(const mtx::events::RoomEvent<mtx::events::msg::Notice messageLayout_->addLayout(headerLayout_, 1); - AvatarProvider::resolve(sender, [=](const QImage &img) { setUserAvatar(img); }); + AvatarProvider::resolve(sender, [this](const QImage &img) { setUserAvatar(img); }); } else { generateBody(body); setupSimpleLayout(); @@ -290,7 +290,7 @@ TimelineItem::TimelineItem(const mtx::events::RoomEvent<mtx::events::msg::Emote> messageLayout_->addLayout(headerLayout_, 1); - AvatarProvider::resolve(sender, [=](const QImage &img) { setUserAvatar(img); }); + AvatarProvider::resolve(sender, [this](const QImage &img) { setUserAvatar(img); }); } else { generateBody(emoteMsg); setupSimpleLayout(); @@ -342,7 +342,7 @@ TimelineItem::TimelineItem(const mtx::events::RoomEvent<mtx::events::msg::Text> messageLayout_->addLayout(headerLayout_, 1); - AvatarProvider::resolve(sender, [=](const QImage &img) { setUserAvatar(img); }); + AvatarProvider::resolve(sender, [this](const QImage &img) { setUserAvatar(img); }); } else { generateBody(body); setupSimpleLayout(); diff --git a/src/timeline/TimelineView.cc b/src/timeline/TimelineView.cc index 82f22d1f..999d608c 100644 --- a/src/timeline/TimelineView.cc +++ b/src/timeline/TimelineView.cc @@ -369,7 +369,7 @@ TimelineView::init() scrollDownBtn_->setForegroundColor(QColor("black")); scrollDownBtn_->hide(); - connect(scrollDownBtn_, &QPushButton::clicked, this, [=]() { + connect(scrollDownBtn_, &QPushButton::clicked, this, [this]() { const int max = scroll_area_->verticalScrollBar()->maximum(); scroll_area_->verticalScrollBar()->setValue(max); }); diff --git a/src/timeline/widgets/AudioItem.cc b/src/timeline/widgets/AudioItem.cc index 6054d70b..f171e78b 100644 --- a/src/timeline/widgets/AudioItem.cc +++ b/src/timeline/widgets/AudioItem.cc @@ -65,7 +65,7 @@ AudioItem::init() player_->setNotifyInterval(1000); connect(client_.data(), &MatrixClient::fileDownloaded, this, &AudioItem::fileDownloaded); - connect(player_, &QMediaPlayer::stateChanged, this, [=](QMediaPlayer::State state) { + connect(player_, &QMediaPlayer::stateChanged, this, [this](QMediaPlayer::State state) { if (state == QMediaPlayer::StoppedState) { state_ = AudioState::Play; player_->setMedia(QUrl(url_)); |