Fix linting

This commit is contained in:
Joseph Donofry 2021-03-04 19:11:08 -05:00
parent 87bf761dc2
commit 4b12b53133
No known key found for this signature in database
GPG Key ID: E8A1D78EF044B0CB
11 changed files with 144 additions and 153 deletions

View File

@ -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);

View File

@ -249,7 +249,6 @@ tokenise(std::string_view str, char delim)
ret.second = std::atoi(str.data() + pos + 1);
return ret;
}
}
void

View File

@ -599,7 +599,6 @@ newBusMessage(GstBus *bus G_GNUC_UNUSED, GstMessage *msg, gpointer G_GNUC_UNUSED
}
return TRUE;
}
}
#endif

View File

@ -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); },

View File

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

View File

@ -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));
}

View File

@ -570,7 +570,6 @@ getMediaAttributes(const GstSDPMessage *sdp,
}
return false;
}
}
bool

View File

@ -35,7 +35,6 @@ enum class State
};
Q_ENUM_NS(State)
}
class WebRTCSession : public QObject

View File

@ -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) {

View File

@ -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));
},

View File

@ -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;