mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-25 04:28:49 +03:00
Use right linter
This commit is contained in:
parent
a6b2be112b
commit
90da39313f
28 changed files with 35 additions and 67 deletions
|
@ -20,8 +20,7 @@ public:
|
||||||
BlurhashRunnable(const QString &id, const QSize &requestedSize)
|
BlurhashRunnable(const QString &id, const QSize &requestedSize)
|
||||||
: m_id(id)
|
: m_id(id)
|
||||||
, m_requestedSize(requestedSize)
|
, m_requestedSize(requestedSize)
|
||||||
{
|
{}
|
||||||
}
|
|
||||||
|
|
||||||
void run() override;
|
void run() override;
|
||||||
signals:
|
signals:
|
||||||
|
|
|
@ -96,8 +96,7 @@ struct MegolmSessionIndex
|
||||||
MegolmSessionIndex(std::string room_id_, const mtx::events::msg::Encrypted &e)
|
MegolmSessionIndex(std::string room_id_, const mtx::events::msg::Encrypted &e)
|
||||||
: room_id(std::move(room_id_))
|
: room_id(std::move(room_id_))
|
||||||
, session_id(e.session_id)
|
, session_id(e.session_id)
|
||||||
{
|
{}
|
||||||
}
|
|
||||||
|
|
||||||
//! The room in which this session exists.
|
//! The room in which this session exists.
|
||||||
std::string room_id;
|
std::string room_id;
|
||||||
|
|
|
@ -10,8 +10,7 @@ class ColorImageProvider : public QQuickImageProvider
|
||||||
public:
|
public:
|
||||||
ColorImageProvider()
|
ColorImageProvider()
|
||||||
: QQuickImageProvider(QQuickImageProvider::Pixmap)
|
: QQuickImageProvider(QQuickImageProvider::Pixmap)
|
||||||
{
|
{}
|
||||||
}
|
|
||||||
|
|
||||||
QPixmap requestPixmap(const QString &id, QSize *size, const QSize &requestedSize) override;
|
QPixmap requestPixmap(const QString &id, QSize *size, const QSize &requestedSize) override;
|
||||||
};
|
};
|
||||||
|
|
|
@ -12,8 +12,7 @@
|
||||||
|
|
||||||
InviteesModel::InviteesModel(QObject *parent)
|
InviteesModel::InviteesModel(QObject *parent)
|
||||||
: QAbstractListModel{parent}
|
: QAbstractListModel{parent}
|
||||||
{
|
{}
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
InviteesModel::addUser(QString mxid)
|
InviteesModel::addUser(QString mxid)
|
||||||
|
|
|
@ -83,8 +83,7 @@ JdenticonRunnable::JdenticonRunnable(const QString &key,
|
||||||
, m_crop{crop}
|
, m_crop{crop}
|
||||||
, m_radius{radius}
|
, m_radius{radius}
|
||||||
, m_requestedSize(requestedSize.isValid() ? requestedSize : QSize(100, 100))
|
, m_requestedSize(requestedSize.isValid() ? requestedSize : QSize(100, 100))
|
||||||
{
|
{}
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
JdenticonRunnable::run()
|
JdenticonRunnable::run()
|
||||||
|
|
|
@ -56,10 +56,7 @@ public:
|
||||||
void showChatPage();
|
void showChatPage();
|
||||||
|
|
||||||
#ifdef NHEKO_DBUS_SYS
|
#ifdef NHEKO_DBUS_SYS
|
||||||
bool dbusAvailable() const
|
bool dbusAvailable() const { return dbusAvailable_; }
|
||||||
{
|
|
||||||
return dbusAvailable_;
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
Q_INVOKABLE void addPerRoomWindow(const QString &room, QWindow *window);
|
Q_INVOKABLE void addPerRoomWindow(const QString &room, QWindow *window);
|
||||||
|
|
|
@ -29,8 +29,7 @@ public:
|
||||||
, m_requestedSize(requestedSize)
|
, m_requestedSize(requestedSize)
|
||||||
, m_crop(crop)
|
, m_crop(crop)
|
||||||
, m_radius(radius)
|
, m_radius(radius)
|
||||||
{
|
{}
|
||||||
}
|
|
||||||
|
|
||||||
void run();
|
void run();
|
||||||
|
|
||||||
|
|
|
@ -44,8 +44,7 @@ RoomInfoItem::RoomInfoItem(const QString &roomId,
|
||||||
, roomName_{title}
|
, roomName_{title}
|
||||||
, image_{image}
|
, image_{image}
|
||||||
, unreadNotifications_{unreadNotifications}
|
, unreadNotifications_{unreadNotifications}
|
||||||
{
|
{}
|
||||||
}
|
|
||||||
|
|
||||||
RoomInfoItem::RoomInfoItem(const RoomInfoItem &other)
|
RoomInfoItem::RoomInfoItem(const RoomInfoItem &other)
|
||||||
: QObject{other.parent()}
|
: QObject{other.parent()}
|
||||||
|
@ -54,8 +53,7 @@ RoomInfoItem::RoomInfoItem(const RoomInfoItem &other)
|
||||||
, roomName_{other.roomName_}
|
, roomName_{other.roomName_}
|
||||||
, image_{other.image_}
|
, image_{other.image_}
|
||||||
, unreadNotifications_{other.unreadNotifications_}
|
, unreadNotifications_{other.unreadNotifications_}
|
||||||
{
|
{}
|
||||||
}
|
|
||||||
|
|
||||||
RoomInfoItem &
|
RoomInfoItem &
|
||||||
RoomInfoItem::operator=(const RoomInfoItem &other)
|
RoomInfoItem::operator=(const RoomInfoItem &other)
|
||||||
|
|
|
@ -16,8 +16,7 @@
|
||||||
NhekoDBusBackend::NhekoDBusBackend(RoomlistModel *parent)
|
NhekoDBusBackend::NhekoDBusBackend(RoomlistModel *parent)
|
||||||
: QObject{parent}
|
: QObject{parent}
|
||||||
, m_parent{parent}
|
, m_parent{parent}
|
||||||
{
|
{}
|
||||||
}
|
|
||||||
|
|
||||||
QVector<nheko::dbus::RoomInfoItem>
|
QVector<nheko::dbus::RoomInfoItem>
|
||||||
NhekoDBusBackend::rooms(const QDBusMessage &message)
|
NhekoDBusBackend::rooms(const QDBusMessage &message)
|
||||||
|
|
|
@ -15,8 +15,7 @@
|
||||||
VerificationManager::VerificationManager(TimelineViewManager *o)
|
VerificationManager::VerificationManager(TimelineViewManager *o)
|
||||||
: QObject(o)
|
: QObject(o)
|
||||||
, rooms_(o->rooms())
|
, rooms_(o->rooms())
|
||||||
{
|
{}
|
||||||
}
|
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
isValidTime(std::optional<uint64_t> t)
|
isValidTime(std::optional<uint64_t> t)
|
||||||
|
|
|
@ -102,8 +102,7 @@ registerSignalHandlers()
|
||||||
// No implementation for systems with no stacktrace support.
|
// No implementation for systems with no stacktrace support.
|
||||||
void
|
void
|
||||||
registerSignalHandlers()
|
registerSignalHandlers()
|
||||||
{
|
{}
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -44,8 +44,7 @@ init()
|
||||||
|
|
||||||
NotificationsManager::NotificationsManager(QObject *parent)
|
NotificationsManager::NotificationsManager(QObject *parent)
|
||||||
: QObject(parent)
|
: QObject(parent)
|
||||||
{
|
{}
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
NotificationsManager::postNotification(const mtx::responses::Notification ¬ification,
|
NotificationsManager::postNotification(const mtx::responses::Notification ¬ification,
|
||||||
|
|
|
@ -14,8 +14,7 @@
|
||||||
|
|
||||||
CommunitiesModel::CommunitiesModel(QObject *parent)
|
CommunitiesModel::CommunitiesModel(QObject *parent)
|
||||||
: QAbstractListModel(parent)
|
: QAbstractListModel(parent)
|
||||||
{
|
{}
|
||||||
}
|
|
||||||
|
|
||||||
QHash<int, QByteArray>
|
QHash<int, QByteArray>
|
||||||
CommunitiesModel::roleNames() const
|
CommunitiesModel::roleNames() const
|
||||||
|
|
|
@ -74,8 +74,7 @@ private:
|
||||||
DelegateIncubator(DelegateChooser &parent)
|
DelegateIncubator(DelegateChooser &parent)
|
||||||
: QQmlIncubator(QQmlIncubator::AsynchronousIfNested)
|
: QQmlIncubator(QQmlIncubator::AsynchronousIfNested)
|
||||||
, chooser(parent)
|
, chooser(parent)
|
||||||
{
|
{}
|
||||||
}
|
|
||||||
void statusChanged(QQmlIncubator::Status status) override;
|
void statusChanged(QQmlIncubator::Status status) override;
|
||||||
|
|
||||||
DelegateChooser &chooser;
|
DelegateChooser &chooser;
|
||||||
|
|
|
@ -39,8 +39,7 @@ class InputVideoSurface : public QAbstractVideoSurface
|
||||||
public:
|
public:
|
||||||
InputVideoSurface(QObject *parent)
|
InputVideoSurface(QObject *parent)
|
||||||
: QAbstractVideoSurface(parent)
|
: QAbstractVideoSurface(parent)
|
||||||
{
|
{}
|
||||||
}
|
|
||||||
|
|
||||||
bool present(const QVideoFrame &frame) override;
|
bool present(const QVideoFrame &frame) override;
|
||||||
|
|
||||||
|
|
|
@ -19,8 +19,7 @@ class PresenceEmitter : public QObject
|
||||||
public:
|
public:
|
||||||
PresenceEmitter(QObject *p = nullptr)
|
PresenceEmitter(QObject *p = nullptr)
|
||||||
: QObject(p)
|
: QObject(p)
|
||||||
{
|
{}
|
||||||
}
|
|
||||||
|
|
||||||
void sync(const std::vector<mtx::events::Event<mtx::events::presence::Presence>> &presences);
|
void sync(const std::vector<mtx::events::Event<mtx::events::presence::Presence>> &presences);
|
||||||
|
|
||||||
|
|
|
@ -1366,8 +1366,7 @@ struct SendMessageVisitor
|
||||||
{
|
{
|
||||||
explicit SendMessageVisitor(TimelineModel *model)
|
explicit SendMessageVisitor(TimelineModel *model)
|
||||||
: model_(model)
|
: model_(model)
|
||||||
{
|
{}
|
||||||
}
|
|
||||||
|
|
||||||
template<typename T, mtx::events::EventType Event>
|
template<typename T, mtx::events::EventType Event>
|
||||||
void sendRoomEvent(mtx::events::RoomEvent<T> msg)
|
void sendRoomEvent(mtx::events::RoomEvent<T> msg)
|
||||||
|
@ -1391,8 +1390,7 @@ struct SendMessageVisitor
|
||||||
// Do-nothing operator for all unhandled events
|
// Do-nothing operator for all unhandled events
|
||||||
template<typename T>
|
template<typename T>
|
||||||
void operator()(const mtx::events::Event<T> &)
|
void operator()(const mtx::events::Event<T> &)
|
||||||
{
|
{}
|
||||||
}
|
|
||||||
|
|
||||||
// Operator for m.room.message events that contain a msgtype in their content
|
// Operator for m.room.message events that contain a msgtype in their content
|
||||||
template<typename T,
|
template<typename T,
|
||||||
|
|
|
@ -147,8 +147,7 @@ class StateKeeper
|
||||||
public:
|
public:
|
||||||
StateKeeper(std::function<void()> &&fn)
|
StateKeeper(std::function<void()> &&fn)
|
||||||
: fn_(std::move(fn))
|
: fn_(std::move(fn))
|
||||||
{
|
{}
|
||||||
}
|
|
||||||
|
|
||||||
~StateKeeper() { fn_(); }
|
~StateKeeper() { fn_(); }
|
||||||
|
|
||||||
|
|
|
@ -18,8 +18,7 @@ class HiddenEvents : public QObject
|
||||||
public:
|
public:
|
||||||
explicit HiddenEvents(QObject *p = nullptr)
|
explicit HiddenEvents(QObject *p = nullptr)
|
||||||
: QObject(p)
|
: QObject(p)
|
||||||
{
|
{}
|
||||||
}
|
|
||||||
|
|
||||||
Q_INVOKABLE void toggle(int type);
|
Q_INVOKABLE void toggle(int type);
|
||||||
Q_INVOKABLE void save();
|
Q_INVOKABLE void save();
|
||||||
|
|
|
@ -10,8 +10,7 @@
|
||||||
NhekoCursorShape::NhekoCursorShape(QQuickItem *parent)
|
NhekoCursorShape::NhekoCursorShape(QQuickItem *parent)
|
||||||
: QQuickItem(parent)
|
: QQuickItem(parent)
|
||||||
, currentShape_(Qt::CursorShape::ArrowCursor)
|
, currentShape_(Qt::CursorShape::ArrowCursor)
|
||||||
{
|
{}
|
||||||
}
|
|
||||||
|
|
||||||
Qt::CursorShape
|
Qt::CursorShape
|
||||||
NhekoCursorShape::cursorShape() const
|
NhekoCursorShape::cursorShape() const
|
||||||
|
|
|
@ -20,8 +20,7 @@ public:
|
||||||
|
|
||||||
UIA(QObject *parent = nullptr)
|
UIA(QObject *parent = nullptr)
|
||||||
: QObject(parent)
|
: QObject(parent)
|
||||||
{
|
{}
|
||||||
}
|
|
||||||
|
|
||||||
mtx::http::UIAHandler genericHandler(QString context);
|
mtx::http::UIAHandler genericHandler(QString context);
|
||||||
|
|
||||||
|
|
|
@ -45,8 +45,7 @@ public:
|
||||||
, verification_status(verification_status_)
|
, verification_status(verification_status_)
|
||||||
, lastIp(lastIp_)
|
, lastIp(lastIp_)
|
||||||
, lastTs(lastTs_)
|
, lastTs(lastTs_)
|
||||||
{
|
{}
|
||||||
}
|
|
||||||
DeviceInfo(const QString deviceID,
|
DeviceInfo(const QString deviceID,
|
||||||
const QString displayName,
|
const QString displayName,
|
||||||
verification::Status verification_status_)
|
verification::Status verification_status_)
|
||||||
|
@ -54,12 +53,10 @@ public:
|
||||||
, display_name(displayName)
|
, display_name(displayName)
|
||||||
, verification_status(verification_status_)
|
, verification_status(verification_status_)
|
||||||
, lastTs(0)
|
, lastTs(0)
|
||||||
{
|
{}
|
||||||
}
|
|
||||||
DeviceInfo()
|
DeviceInfo()
|
||||||
: verification_status(verification::UNVERIFIED)
|
: verification_status(verification::UNVERIFIED)
|
||||||
{
|
{}
|
||||||
}
|
|
||||||
|
|
||||||
QString device_id;
|
QString device_id;
|
||||||
QString display_name;
|
QString display_name;
|
||||||
|
|
|
@ -20,8 +20,7 @@ extern "C"
|
||||||
|
|
||||||
CallDevices::CallDevices()
|
CallDevices::CallDevices()
|
||||||
: QObject()
|
: QObject()
|
||||||
{
|
{}
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef GSTREAMER_AVAILABLE
|
#ifdef GSTREAMER_AVAILABLE
|
||||||
namespace {
|
namespace {
|
||||||
|
|
|
@ -1152,8 +1152,7 @@ WebRTCSession::acceptAnswer(const std::string &)
|
||||||
|
|
||||||
void
|
void
|
||||||
WebRTCSession::acceptICECandidates(const std::vector<mtx::events::msg::CallCandidates::Candidate> &)
|
WebRTCSession::acceptICECandidates(const std::vector<mtx::events::msg::CallCandidates::Candidate> &)
|
||||||
{
|
{}
|
||||||
}
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
WebRTCSession::isMicMuted() const
|
WebRTCSession::isMicMuted() const
|
||||||
|
@ -1169,12 +1168,10 @@ WebRTCSession::toggleMicMute()
|
||||||
|
|
||||||
void
|
void
|
||||||
WebRTCSession::toggleLocalPiP()
|
WebRTCSession::toggleLocalPiP()
|
||||||
{
|
{}
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
WebRTCSession::end()
|
WebRTCSession::end()
|
||||||
{
|
{}
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue