Fix unused capture

This commit is contained in:
Nicolas Werner 2020-06-08 22:35:47 +02:00
parent 814868024c
commit 3baf11b5c4

View file

@ -125,24 +125,24 @@ UserInfoWidget::UserInfoWidget(QWidget *parent)
ChatPage::instance()->setStatus(text); ChatPage::instance()->setStatus(text);
}); });
auto setAutoPresence = menu->addAction(tr("Set presence automatically")); auto setAutoPresence = menu->addAction(tr("Set presence automatically"));
connect(setAutoPresence, &QAction::triggered, this, [this]() { connect(setAutoPresence, &QAction::triggered, this, []() {
ChatPage::instance()->userSettings()->setPresence( ChatPage::instance()->userSettings()->setPresence(
UserSettings::Presence::AutomaticPresence); UserSettings::Presence::AutomaticPresence);
ChatPage::instance()->setStatus(ChatPage::instance()->status()); ChatPage::instance()->setStatus(ChatPage::instance()->status());
}); });
auto setOnline = menu->addAction(tr("Online")); auto setOnline = menu->addAction(tr("Online"));
connect(setOnline, &QAction::triggered, this, [this]() { connect(setOnline, &QAction::triggered, this, []() {
ChatPage::instance()->userSettings()->setPresence(UserSettings::Presence::Online); ChatPage::instance()->userSettings()->setPresence(UserSettings::Presence::Online);
ChatPage::instance()->setStatus(ChatPage::instance()->status()); ChatPage::instance()->setStatus(ChatPage::instance()->status());
}); });
auto setUnavailable = menu->addAction(tr("Unavailable")); auto setUnavailable = menu->addAction(tr("Unavailable"));
connect(setUnavailable, &QAction::triggered, this, [this]() { connect(setUnavailable, &QAction::triggered, this, []() {
ChatPage::instance()->userSettings()->setPresence( ChatPage::instance()->userSettings()->setPresence(
UserSettings::Presence::Unavailable); UserSettings::Presence::Unavailable);
ChatPage::instance()->setStatus(ChatPage::instance()->status()); ChatPage::instance()->setStatus(ChatPage::instance()->status());
}); });
auto setOffline = menu->addAction(tr("Offline")); auto setOffline = menu->addAction(tr("Offline"));
connect(setOffline, &QAction::triggered, this, [this]() { connect(setOffline, &QAction::triggered, this, []() {
ChatPage::instance()->userSettings()->setPresence(UserSettings::Presence::Offline); ChatPage::instance()->userSettings()->setPresence(UserSettings::Presence::Offline);
ChatPage::instance()->setStatus(ChatPage::instance()->status()); ChatPage::instance()->setStatus(ChatPage::instance()->status());
}); });