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; last_changed = cache_->last_changed;
req.token = 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, [cb, user_id, last_changed](const mtx::responses::QueryKeys &res,
mtx::http::RequestErr err) { mtx::http::RequestErr err) {
if (err) { if (err) {
nhlog::net()->warn( nhlog::net()->warn("failed to query device keys: {},{}",
"failed to query device keys: {},{}",
mtx::errors::to_string(err->matrix_error.errcode), mtx::errors::to_string(err->matrix_error.errcode),
static_cast<int>(err->status_code)); static_cast<int>(err->status_code));
cb({}, err); cb({}, err);

View file

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

View file

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

View file

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

View file

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

View file

@ -345,7 +345,8 @@ DeviceVerificationFlow::DeviceVerificationFlow(QObject *,
if (err) { if (err) {
nhlog::net()->error( nhlog::net()->error(
"failed to upload signatures: {},{}", "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)); static_cast<int>(err->status_code));
} }

View file

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

View file

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

View file

@ -35,8 +35,7 @@ EventStore::EventStore(std::string room_id, QObject *)
this->last = range->last; this->last = range->last;
} }
connect( connect(this,
this,
&EventStore::eventFetched, &EventStore::eventFetched,
this, this,
[this](std::string id, [this](std::string id,
@ -52,8 +51,7 @@ EventStore::EventStore(std::string room_id, QObject *)
}, },
Qt::QueuedConnection); Qt::QueuedConnection);
connect( connect(this,
this,
&EventStore::oldMessagesRetrieved, &EventStore::oldMessagesRetrieved,
this, this,
[this](const mtx::responses::Messages &res) { [this](const mtx::responses::Messages &res) {
@ -77,7 +75,8 @@ EventStore::EventStore(std::string room_id, QObject *)
auto range = cache::client()->getTimelineRange(room_id_); auto range = cache::client()->getTimelineRange(room_id_);
if (range && range->last - range->first != 0) { 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->first = range->first;
this->last = range->last; this->last = range->last;
emit endInsertRows(); emit endInsertRows();
@ -153,8 +152,7 @@ EventStore::EventStore(std::string room_id, QObject *)
event->data); event->data);
}); });
connect( connect(this,
this,
&EventStore::messageFailed, &EventStore::messageFailed,
this, this,
[this](std::string txn_id) { [this](std::string txn_id) {
@ -174,8 +172,7 @@ EventStore::EventStore(std::string room_id, QObject *)
}, },
Qt::QueuedConnection); Qt::QueuedConnection);
connect( connect(this,
this,
&EventStore::messageSent, &EventStore::messageSent,
this, this,
[this](std::string txn_id, std::string event_id) { [this](std::string txn_id, std::string event_id) {
@ -360,7 +357,7 @@ struct overloaded : Ts...
using Ts::operator()...; using Ts::operator()...;
}; };
template<class... Ts> template<class... Ts>
overloaded(Ts...) -> overloaded<Ts...>; overloaded(Ts...)->overloaded<Ts...>;
} }
void void

View file

@ -205,8 +205,7 @@ TimelineModel::TimelineModel(TimelineViewManager *manager, QString room_id, QObj
, room_id_(room_id) , room_id_(room_id)
, manager_(manager) , manager_(manager)
{ {
connect( connect(this,
this,
&TimelineModel::redactionFailed, &TimelineModel::redactionFailed,
this, this,
[](const QString &msg) { emit ChatPage::instance()->showNotification(msg); }, [](const QString &msg) { emit ChatPage::instance()->showNotification(msg); },
@ -219,13 +218,13 @@ TimelineModel::TimelineModel(TimelineViewManager *manager, QString room_id, QObj
Qt::QueuedConnection); Qt::QueuedConnection);
connect(this, &TimelineModel::addPendingMessageToStore, &events, &EventStore::addPending); connect(this, &TimelineModel::addPendingMessageToStore, &events, &EventStore::addPending);
connect( connect(&events,
&events,
&EventStore::dataChanged, &EventStore::dataChanged,
this, this,
[this](int from, int to) { [this](int from, int to) {
nhlog::ui()->debug( nhlog::ui()->debug("data changed {} to {}",
"data changed {} to {}", events.size() - to - 1, events.size() - from - 1); events.size() - to - 1,
events.size() - from - 1);
emit dataChanged(index(events.size() - to - 1, 0), emit dataChanged(index(events.size() - to - 1, 0),
index(events.size() - from - 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(); std::string local_user_id = utils::localUser().toStdString();
if (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), mtx::errors::to_string(err->matrix_error.errcode),
static_cast<int>(err->status_code)); static_cast<int>(err->status_code));
return; return;