fix linting

This commit is contained in:
Nicolas Werner 2021-03-05 15:26:07 +01:00
parent a305c2689c
commit 1be42045ee
No known key found for this signature in database
GPG key ID: C8D75E610773F2D9
5 changed files with 131 additions and 126 deletions

View file

@ -308,7 +308,8 @@ ChatPage::ChatPage(QSharedPointer<UserSettings> userSettings, QWidget *parent)
&ChatPage::setGroupViewState);
connect(this, &ChatPage::initializeRoomList, room_list_, &RoomList::initialize);
connect(this,
connect(
this,
&ChatPage::initializeViews,
view_manager_,
[this](const mtx::responses::Rooms &rooms) { view_manager_->sync(rooms); },
@ -377,7 +378,8 @@ ChatPage::ChatPage(QSharedPointer<UserSettings> userSettings, QWidget *parent)
connect(
this, &ChatPage::tryInitialSyncCb, this, &ChatPage::tryInitialSync, Qt::QueuedConnection);
connect(this, &ChatPage::trySyncCb, this, &ChatPage::trySync, Qt::QueuedConnection);
connect(this,
connect(
this,
&ChatPage::tryDelayedSyncCb,
this,
[this]() { QTimer::singleShot(RETRY_TIMEOUT, this, &ChatPage::trySync); },

View file

@ -45,7 +45,8 @@ CompletionProxyModel::CompletionProxyModel(QAbstractItemModel *model, QObject *p
}
}
connect(this,
connect(
this,
&CompletionProxyModel::newSearchString,
this,
[this](QString s) {

View file

@ -39,7 +39,8 @@ EventStore::EventStore(std::string room_id, QObject *)
this->last = range->last;
}
connect(this,
connect(
this,
&EventStore::eventFetched,
this,
[this](std::string id,
@ -55,7 +56,8 @@ EventStore::EventStore(std::string room_id, QObject *)
},
Qt::QueuedConnection);
connect(this,
connect(
this,
&EventStore::oldMessagesRetrieved,
this,
[this](const mtx::responses::Messages &res) {
@ -79,8 +81,7 @@ EventStore::EventStore(std::string room_id, QObject *)
auto range = cache::client()->getTimelineRange(room_id_);
if (range && range->last - range->first != 0) {
emit beginInsertRows(
0, int(range->last - range->first));
emit beginInsertRows(0, int(range->last - range->first));
this->first = range->first;
this->last = range->last;
emit endInsertRows();
@ -156,7 +157,8 @@ EventStore::EventStore(std::string room_id, QObject *)
event->data);
});
connect(this,
connect(
this,
&EventStore::messageFailed,
this,
[this](std::string txn_id) {
@ -176,7 +178,8 @@ EventStore::EventStore(std::string room_id, QObject *)
},
Qt::QueuedConnection);
connect(this,
connect(
this,
&EventStore::messageSent,
this,
[this](std::string txn_id, std::string event_id) {
@ -361,7 +364,7 @@ struct overloaded : Ts...
using Ts::operator()...;
};
template<class... Ts>
overloaded(Ts...)->overloaded<Ts...>;
overloaded(Ts...) -> overloaded<Ts...>;
}
void

View file

@ -209,7 +209,8 @@ TimelineModel::TimelineModel(TimelineViewManager *manager, QString room_id, QObj
, room_id_(room_id)
, manager_(manager)
{
connect(this,
connect(
this,
&TimelineModel::redactionFailed,
this,
[](const QString &msg) { emit ChatPage::instance()->showNotification(msg); },
@ -222,13 +223,13 @@ TimelineModel::TimelineModel(TimelineViewManager *manager, QString room_id, QObj
Qt::QueuedConnection);
connect(this, &TimelineModel::addPendingMessageToStore, &events, &EventStore::addPending);
connect(&events,
connect(
&events,
&EventStore::dataChanged,
this,
[this](int from, int to) {
nhlog::ui()->debug("data changed {} to {}",
events.size() - to - 1,
events.size() - from - 1);
nhlog::ui()->debug(
"data changed {} to {}", events.size() - to - 1, events.size() - from - 1);
emit dataChanged(index(events.size() - to - 1, 0),
index(events.size() - from - 1, 0));
},

View file

@ -32,9 +32,7 @@ SnackBar::SnackBar(QWidget *parent)
offset_anim.setDuration(100);
offset_anim.setEasingCurve(QEasingCurve::OutCubic);
connect(this, &SnackBar::offsetChanged, this, [this]() mutable {
repaint();
});
connect(this, &SnackBar::offsetChanged, this, [this]() mutable { repaint(); });
connect(
&offset_anim, &QPropertyAnimation::finished, this, [this]() { hideTimer_.start(10000); });