Switch to clang-format14

pull/1022/merge
Nicolas Werner 2 years ago
parent 951d0f4d23
commit 851333a50d
No known key found for this signature in database
GPG Key ID: C8D75E610773F2D9
  1. 3
      .gitlab-ci.yml
  2. 3
      src/AliasEditModel.h
  3. 3
      src/BlurhashProvider.h
  4. 3
      src/CacheCryptoStructs.h
  5. 3
      src/ColorImageProvider.h
  6. 4
      src/EventAccessors.h
  7. 3
      src/InviteesModel.cpp
  8. 3
      src/JdenticonProvider.cpp
  9. 5
      src/MainWindow.h
  10. 3
      src/MxcImageProvider.h
  11. 6
      src/dbus/NhekoDBusApi.cpp
  12. 3
      src/dbus/NhekoDBusBackend.cpp
  13. 6
      src/dock/Dock.cpp
  14. 2
      src/encryption/DeviceVerificationFlow.cpp
  15. 3
      src/encryption/VerificationManager.cpp
  16. 3
      src/main.cpp
  17. 3
      src/notifications/ManagerWin.cpp
  18. 3
      src/timeline/CommunitiesModel.h
  19. 3
      src/timeline/DelegateChooser.h
  20. 3
      src/timeline/InputBar.h
  21. 3
      src/timeline/PresenceEmitter.h
  22. 6
      src/timeline/TimelineModel.cpp
  23. 3
      src/timeline/TimelineModel.h
  24. 3
      src/ui/HiddenEvents.h
  25. 3
      src/ui/NhekoCursorShape.cpp
  26. 3
      src/ui/UIA.h
  27. 12
      src/ui/UserProfile.h
  28. 3
      src/voip/CallDevices.cpp
  29. 2
      src/voip/CallDevices.h
  30. 9
      src/voip/WebRTCSession.cpp
  31. 2
      src/voip/WebRTCSession.h

@ -222,7 +222,8 @@ linting:
image: alpine:latest
tags: [docker]
before_script:
- apk update && apk add clang-extra-tools make git python3 py3-pip
- apk update && apk add make git python3 py3-pip
- apk add clang-extra-tools --repository=http://dl-cdn.alpinelinux.org/alpine/edge/main
- export PATH="$PATH:/root/.local/bin"
- pip3 install --user reuse
script:

@ -18,7 +18,8 @@ class FetchPublishedAliasesJob : public QObject
public:
explicit FetchPublishedAliasesJob(QObject *p = nullptr)
: QObject(p)
{}
{
}
signals:
void aliasFetched(std::string alias, std::string target);

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

@ -96,7 +96,8 @@ 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;

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

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

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

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

@ -57,7 +57,10 @@ 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);

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

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

@ -19,7 +19,8 @@
NhekoDBusBackend::NhekoDBusBackend(RoomlistModel *parent)
: QObject{parent}
, m_parent{parent}
{}
{
}
namespace {
struct RoomReplyState

@ -82,8 +82,10 @@ Dock::unitySetNotificationCount(const int count)
#else
Dock::Dock(QObject *parent)
: QObject(parent)
{}
{
}
void
Dock::setUnreadCount(const int)
{}
{
}
#endif

@ -661,7 +661,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;

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

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

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

@ -62,7 +62,8 @@ public:
, canonical(canonical_)
, canEditParent(canEditParent_)
, canEditChild(canEditChild_)
{}
{
}
QString roomid, name;
int treeIndex = 0;

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

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

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

@ -1467,7 +1467,8 @@ struct SendMessageVisitor
{
explicit SendMessageVisitor(TimelineModel *model)
: model_(model)
{}
{
}
template<typename T, mtx::events::EventType Event>
void sendRoomEvent(mtx::events::RoomEvent<T> msg)
@ -1491,7 +1492,8 @@ 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,

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

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

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

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

@ -39,7 +39,8 @@ class UserProfileFetchProxy : public QObject
public:
UserProfileFetchProxy(QObject *p = nullptr)
: QObject(p)
{}
{
}
signals:
void profileFetched(mtx::responses::Profile);
@ -58,7 +59,8 @@ public:
, verification_status(verification_status_)
, lastIp(lastIp_)
, lastTs(lastTs_)
{}
{
}
DeviceInfo(const QString deviceID,
const QString displayName,
verification::Status verification_status_)
@ -66,10 +68,12 @@ public:
, display_name(displayName)
, verification_status(verification_status_)
, lastTs(0)
{}
{
}
DeviceInfo()
: verification_status(verification::UNVERIFIED)
{}
{
}
QString device_id;
QString display_name;

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

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

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

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

Loading…
Cancel
Save