mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-25 12:38:48 +03:00
Fix linting
This commit is contained in:
parent
87bf761dc2
commit
4b12b53133
11 changed files with 144 additions and 153 deletions
|
@ -3566,12 +3566,12 @@ Cache::query_keys(const std::string &user_id,
|
|||
last_changed = cache_->last_changed;
|
||||
req.token = last_changed;
|
||||
|
||||
http::client()->query_keys(req,
|
||||
http::client()->query_keys(
|
||||
req,
|
||||
[cb, user_id, last_changed](const mtx::responses::QueryKeys &res,
|
||||
mtx::http::RequestErr err) {
|
||||
if (err) {
|
||||
nhlog::net()->warn(
|
||||
"failed to query device keys: {},{}",
|
||||
nhlog::net()->warn("failed to query device keys: {},{}",
|
||||
mtx::errors::to_string(err->matrix_error.errcode),
|
||||
static_cast<int>(err->status_code));
|
||||
cb({}, err);
|
||||
|
|
|
@ -249,7 +249,6 @@ tokenise(std::string_view str, char delim)
|
|||
ret.second = std::atoi(str.data() + pos + 1);
|
||||
return ret;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -599,7 +599,6 @@ newBusMessage(GstBus *bus G_GNUC_UNUSED, GstMessage *msg, gpointer G_GNUC_UNUSED
|
|||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -320,8 +320,7 @@ 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); },
|
||||
|
@ -390,8 +389,7 @@ 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); },
|
||||
|
|
|
@ -41,8 +41,7 @@ CompletionProxyModel::CompletionProxyModel(QAbstractItemModel *model, QObject *p
|
|||
}
|
||||
}
|
||||
|
||||
connect(
|
||||
this,
|
||||
connect(this,
|
||||
&CompletionProxyModel::newSearchString,
|
||||
this,
|
||||
[this](QString s) {
|
||||
|
|
|
@ -345,7 +345,8 @@ DeviceVerificationFlow::DeviceVerificationFlow(QObject *,
|
|||
if (err) {
|
||||
nhlog::net()->error(
|
||||
"failed to upload signatures: {},{}",
|
||||
mtx::errors::to_string(err->matrix_error.errcode),
|
||||
mtx::errors::to_string(
|
||||
err->matrix_error.errcode),
|
||||
static_cast<int>(err->status_code));
|
||||
}
|
||||
|
||||
|
|
|
@ -570,7 +570,6 @@ getMediaAttributes(const GstSDPMessage *sdp,
|
|||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
bool
|
||||
|
|
|
@ -35,7 +35,6 @@ enum class State
|
|||
|
||||
};
|
||||
Q_ENUM_NS(State)
|
||||
|
||||
}
|
||||
|
||||
class WebRTCSession : public QObject
|
||||
|
|
|
@ -35,8 +35,7 @@ EventStore::EventStore(std::string room_id, QObject *)
|
|||
this->last = range->last;
|
||||
}
|
||||
|
||||
connect(
|
||||
this,
|
||||
connect(this,
|
||||
&EventStore::eventFetched,
|
||||
this,
|
||||
[this](std::string id,
|
||||
|
@ -52,8 +51,7 @@ EventStore::EventStore(std::string room_id, QObject *)
|
|||
},
|
||||
Qt::QueuedConnection);
|
||||
|
||||
connect(
|
||||
this,
|
||||
connect(this,
|
||||
&EventStore::oldMessagesRetrieved,
|
||||
this,
|
||||
[this](const mtx::responses::Messages &res) {
|
||||
|
@ -77,7 +75,8 @@ 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();
|
||||
|
@ -153,8 +152,7 @@ EventStore::EventStore(std::string room_id, QObject *)
|
|||
event->data);
|
||||
});
|
||||
|
||||
connect(
|
||||
this,
|
||||
connect(this,
|
||||
&EventStore::messageFailed,
|
||||
this,
|
||||
[this](std::string txn_id) {
|
||||
|
@ -174,8 +172,7 @@ 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) {
|
||||
|
|
|
@ -205,8 +205,7 @@ 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); },
|
||||
|
@ -219,13 +218,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));
|
||||
},
|
||||
|
|
|
@ -173,7 +173,8 @@ UserProfile::fetchDeviceList(const QString &userID)
|
|||
std::string local_user_id = utils::localUser().toStdString();
|
||||
|
||||
if (err) {
|
||||
nhlog::net()->warn("failed to query device keys: {},{}",
|
||||
nhlog::net()->warn(
|
||||
"failed to query device keys: {},{}",
|
||||
mtx::errors::to_string(err->matrix_error.errcode),
|
||||
static_cast<int>(err->status_code));
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue