Use right linter

This commit is contained in:
Nicolas Werner 2022-05-10 03:53:35 +02:00
parent a6b2be112b
commit 90da39313f
No known key found for this signature in database
GPG key ID: C8D75E610773F2D9
28 changed files with 35 additions and 67 deletions

View file

@ -20,8 +20,7 @@ public:
BlurhashRunnable(const QString &id, const QSize &requestedSize)
: m_id(id)
, m_requestedSize(requestedSize)
{
}
{}
void run() override;
signals:

View file

@ -96,8 +96,7 @@ struct MegolmSessionIndex
MegolmSessionIndex(std::string room_id_, const mtx::events::msg::Encrypted &e)
: room_id(std::move(room_id_))
, session_id(e.session_id)
{
}
{}
//! The room in which this session exists.
std::string room_id;

View file

@ -10,8 +10,7 @@ class ColorImageProvider : public QQuickImageProvider
public:
ColorImageProvider()
: QQuickImageProvider(QQuickImageProvider::Pixmap)
{
}
{}
QPixmap requestPixmap(const QString &id, QSize *size, const QSize &requestedSize) override;
};

View file

@ -15,8 +15,8 @@
namespace nheko {
struct nonesuch
{
~nonesuch() = delete;
nonesuch(nonesuch const &) = delete;
~nonesuch() = delete;
nonesuch(nonesuch const &) = delete;
void operator=(nonesuch const &) = delete;
};

View file

@ -12,8 +12,7 @@
InviteesModel::InviteesModel(QObject *parent)
: QAbstractListModel{parent}
{
}
{}
void
InviteesModel::addUser(QString mxid)

View file

@ -83,8 +83,7 @@ JdenticonRunnable::JdenticonRunnable(const QString &key,
, m_crop{crop}
, m_radius{radius}
, m_requestedSize(requestedSize.isValid() ? requestedSize : QSize(100, 100))
{
}
{}
void
JdenticonRunnable::run()

View file

@ -56,10 +56,7 @@ public:
void showChatPage();
#ifdef NHEKO_DBUS_SYS
bool dbusAvailable() const
{
return dbusAvailable_;
}
bool dbusAvailable() const { return dbusAvailable_; }
#endif
Q_INVOKABLE void addPerRoomWindow(const QString &room, QWindow *window);

View file

@ -29,8 +29,7 @@ public:
, m_requestedSize(requestedSize)
, m_crop(crop)
, m_radius(radius)
{
}
{}
void run();

View file

@ -44,8 +44,7 @@ RoomInfoItem::RoomInfoItem(const QString &roomId,
, roomName_{title}
, image_{image}
, unreadNotifications_{unreadNotifications}
{
}
{}
RoomInfoItem::RoomInfoItem(const RoomInfoItem &other)
: QObject{other.parent()}
@ -54,8 +53,7 @@ RoomInfoItem::RoomInfoItem(const RoomInfoItem &other)
, roomName_{other.roomName_}
, image_{other.image_}
, unreadNotifications_{other.unreadNotifications_}
{
}
{}
RoomInfoItem &
RoomInfoItem::operator=(const RoomInfoItem &other)

View file

@ -16,8 +16,7 @@
NhekoDBusBackend::NhekoDBusBackend(RoomlistModel *parent)
: QObject{parent}
, m_parent{parent}
{
}
{}
QVector<nheko::dbus::RoomInfoItem>
NhekoDBusBackend::rooms(const QDBusMessage &message)

View file

@ -631,7 +631,7 @@ DeviceVerificationFlow::startVerificationRequest()
req.hashes = {"sha256"};
req.message_authentication_codes = {"hkdf-hmac-sha256"};
req.short_authentication_string = {mtx::events::msg::SASMethods::Decimal,
mtx::events::msg::SASMethods::Emoji};
mtx::events::msg::SASMethods::Emoji};
if (this->type == DeviceVerificationFlow::Type::ToDevice) {
mtx::requests::ToDeviceMessages<mtx::events::msg::KeyVerificationStart> body;

View file

@ -15,8 +15,7 @@
VerificationManager::VerificationManager(TimelineViewManager *o)
: QObject(o)
, rooms_(o->rooms())
{
}
{}
static bool
isValidTime(std::optional<uint64_t> t)

View file

@ -102,8 +102,7 @@ registerSignalHandlers()
// No implementation for systems with no stacktrace support.
void
registerSignalHandlers()
{
}
{}
#endif

View file

@ -44,8 +44,7 @@ init()
NotificationsManager::NotificationsManager(QObject *parent)
: QObject(parent)
{
}
{}
void
NotificationsManager::postNotification(const mtx::responses::Notification &notification,

View file

@ -14,8 +14,7 @@
CommunitiesModel::CommunitiesModel(QObject *parent)
: QAbstractListModel(parent)
{
}
{}
QHash<int, QByteArray>
CommunitiesModel::roleNames() const

View file

@ -74,8 +74,7 @@ private:
DelegateIncubator(DelegateChooser &parent)
: QQmlIncubator(QQmlIncubator::AsynchronousIfNested)
, chooser(parent)
{
}
{}
void statusChanged(QQmlIncubator::Status status) override;
DelegateChooser &chooser;

View file

@ -39,8 +39,7 @@ class InputVideoSurface : public QAbstractVideoSurface
public:
InputVideoSurface(QObject *parent)
: QAbstractVideoSurface(parent)
{
}
{}
bool present(const QVideoFrame &frame) override;

View file

@ -19,8 +19,7 @@ class PresenceEmitter : public QObject
public:
PresenceEmitter(QObject *p = nullptr)
: QObject(p)
{
}
{}
void sync(const std::vector<mtx::events::Event<mtx::events::presence::Presence>> &presences);

View file

@ -1366,8 +1366,7 @@ struct SendMessageVisitor
{
explicit SendMessageVisitor(TimelineModel *model)
: model_(model)
{
}
{}
template<typename T, mtx::events::EventType Event>
void sendRoomEvent(mtx::events::RoomEvent<T> msg)
@ -1391,8 +1390,7 @@ struct SendMessageVisitor
// Do-nothing operator for all unhandled events
template<typename T>
void operator()(const mtx::events::Event<T> &)
{
}
{}
// Operator for m.room.message events that contain a msgtype in their content
template<typename T,

View file

@ -147,8 +147,7 @@ class StateKeeper
public:
StateKeeper(std::function<void()> &&fn)
: fn_(std::move(fn))
{
}
{}
~StateKeeper() { fn_(); }

View file

@ -18,8 +18,7 @@ class HiddenEvents : public QObject
public:
explicit HiddenEvents(QObject *p = nullptr)
: QObject(p)
{
}
{}
Q_INVOKABLE void toggle(int type);
Q_INVOKABLE void save();

View file

@ -10,8 +10,7 @@
NhekoCursorShape::NhekoCursorShape(QQuickItem *parent)
: QQuickItem(parent)
, currentShape_(Qt::CursorShape::ArrowCursor)
{
}
{}
Qt::CursorShape
NhekoCursorShape::cursorShape() const

View file

@ -20,8 +20,7 @@ public:
UIA(QObject *parent = nullptr)
: QObject(parent)
{
}
{}
mtx::http::UIAHandler genericHandler(QString context);

View file

@ -45,8 +45,7 @@ public:
, verification_status(verification_status_)
, lastIp(lastIp_)
, lastTs(lastTs_)
{
}
{}
DeviceInfo(const QString deviceID,
const QString displayName,
verification::Status verification_status_)
@ -54,12 +53,10 @@ public:
, display_name(displayName)
, verification_status(verification_status_)
, lastTs(0)
{
}
{}
DeviceInfo()
: verification_status(verification::UNVERIFIED)
{
}
{}
QString device_id;
QString display_name;

View file

@ -20,8 +20,7 @@ extern "C"
CallDevices::CallDevices()
: QObject()
{
}
{}
#ifdef GSTREAMER_AVAILABLE
namespace {

View file

@ -43,6 +43,6 @@ private:
GstDevice *videoDevice(std::pair<int, int> &resolution, std::pair<int, int> &frameRate) const;
public:
CallDevices(CallDevices const &) = delete;
CallDevices(CallDevices const &) = delete;
void operator=(CallDevices const &) = delete;
};

View file

@ -1152,8 +1152,7 @@ WebRTCSession::acceptAnswer(const std::string &)
void
WebRTCSession::acceptICECandidates(const std::vector<mtx::events::msg::CallCandidates::Candidate> &)
{
}
{}
bool
WebRTCSession::isMicMuted() const
@ -1169,12 +1168,10 @@ WebRTCSession::toggleMicMute()
void
WebRTCSession::toggleLocalPiP()
{
}
{}
void
WebRTCSession::end()
{
}
{}
#endif

View file

@ -113,6 +113,6 @@ private:
void clear();
public:
WebRTCSession(WebRTCSession const &) = delete;
WebRTCSession(WebRTCSession const &) = delete;
void operator=(WebRTCSession const &) = delete;
};