Make clang-format <13 and clang-format >=13 behave the same

I think old clang-format is just buggy in those cases, so we should
reenable those blocks, once everyone has 13 or up.
This commit is contained in:
Nicolas Werner 2021-11-22 00:32:49 +01:00
parent b1092c0f2f
commit a13f492e7d
No known key found for this signature in database
GPG Key ID: C8D75E610773F2D9
22 changed files with 116 additions and 114 deletions

View File

@ -4,7 +4,7 @@ Standard: c++17
AccessModifierOffset: -4 AccessModifierOffset: -4
AlignAfterOpenBracket: Align AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: true AlignConsecutiveAssignments: true
AllowShortFunctionsOnASingleLine: true AllowShortFunctionsOnASingleLine: InlineOnly
BasedOnStyle: Mozilla BasedOnStyle: Mozilla
ColumnLimit: 100 ColumnLimit: 100
IndentCaseLabels: false IndentCaseLabels: false
@ -12,3 +12,4 @@ IndentWidth: 4
KeepEmptyLinesAtTheStartOfBlocks: false KeepEmptyLinesAtTheStartOfBlocks: false
PointerAlignment: Right PointerAlignment: Right
Cpp11BracedListStyle: true Cpp11BracedListStyle: true
PenaltyReturnTypeOnItsOwnLine: 0

View File

@ -42,8 +42,8 @@ class BlurhashProvider
{ {
Q_OBJECT Q_OBJECT
public slots: public slots:
QQuickImageResponse *requestImageResponse(const QString &id, QQuickImageResponse *
const QSize &requestedSize) override requestImageResponse(const QString &id, const QSize &requestedSize) override
{ {
BlurhashResponse *response = new BlurhashResponse(id, requestedSize); BlurhashResponse *response = new BlurhashResponse(id, requestedSize);
pool.start(response); pool.start(response);

View File

@ -47,9 +47,8 @@ public:
std::string statusMessage(const std::string &user_id); std::string statusMessage(const std::string &user_id);
// user cache stores user keys // user cache stores user keys
std::map<std::string, std::optional<UserKeyCache>> getMembersWithKeys( std::map<std::string, std::optional<UserKeyCache>>
const std::string &room_id, getMembersWithKeys(const std::string &room_id, bool verified_only);
bool verified_only);
void updateUserKeys(const std::string &sync_token, const mtx::responses::QueryKeys &keyQuery); void updateUserKeys(const std::string &sync_token, const mtx::responses::QueryKeys &keyQuery);
void markUserKeysOutOfDate(const std::vector<std::string> &user_ids); void markUserKeysOutOfDate(const std::vector<std::string> &user_ids);
void markUserKeysOutOfDate(lmdb::txn &txn, void markUserKeysOutOfDate(lmdb::txn &txn,
@ -90,8 +89,8 @@ public:
//! Get a specific state event //! Get a specific state event
template<typename T> template<typename T>
std::optional<mtx::events::StateEvent<T>> getStateEvent(const std::string &room_id, std::optional<mtx::events::StateEvent<T>>
std::string_view state_key = "") getStateEvent(const std::string &room_id, std::string_view state_key = "")
{ {
auto txn = lmdb::txn::begin(env_, nullptr, MDB_RDONLY); auto txn = lmdb::txn::begin(env_, nullptr, MDB_RDONLY);
return getStateEvent<T>(txn, room_id, state_key); return getStateEvent<T>(txn, room_id, state_key);
@ -99,14 +98,12 @@ public:
//! retrieve a specific event from account data //! retrieve a specific event from account data
//! pass empty room_id for global account data //! pass empty room_id for global account data
std::optional<mtx::events::collections::RoomAccountDataEvents> getAccountData( std::optional<mtx::events::collections::RoomAccountDataEvents>
mtx::events::EventType type, getAccountData(mtx::events::EventType type, const std::string &room_id = "");
const std::string &room_id = "");
//! Retrieve member info from a room. //! Retrieve member info from a room.
std::vector<RoomMember> getMembers(const std::string &room_id, std::vector<RoomMember>
std::size_t startIndex = 0, getMembers(const std::string &room_id, std::size_t startIndex = 0, std::size_t len = 30);
std::size_t len = 30);
std::vector<RoomMember> getMembersFromInvite(const std::string &room_id, std::vector<RoomMember> getMembersFromInvite(const std::string &room_id,
std::size_t startIndex = 0, std::size_t startIndex = 0,
@ -186,8 +183,8 @@ public:
uint64_t index = std::numeric_limits<uint64_t>::max(), uint64_t index = std::numeric_limits<uint64_t>::max(),
bool forward = false); bool forward = false);
std::optional<mtx::events::collections::TimelineEvent> getEvent(const std::string &room_id, std::optional<mtx::events::collections::TimelineEvent>
const std::string &event_id); getEvent(const std::string &room_id, const std::string &event_id);
void storeEvent(const std::string &room_id, void storeEvent(const std::string &room_id,
const std::string &event_id, const std::string &event_id,
const mtx::events::collections::TimelineEvent &event); const mtx::events::collections::TimelineEvent &event);
@ -203,9 +200,8 @@ public:
std::optional<TimelineRange> getTimelineRange(const std::string &room_id); std::optional<TimelineRange> getTimelineRange(const std::string &room_id);
std::optional<uint64_t> getTimelineIndex(const std::string &room_id, std::string_view event_id); std::optional<uint64_t> getTimelineIndex(const std::string &room_id, std::string_view event_id);
std::optional<uint64_t> getEventIndex(const std::string &room_id, std::string_view event_id); std::optional<uint64_t> getEventIndex(const std::string &room_id, std::string_view event_id);
std::optional<std::pair<uint64_t, std::string>> lastInvisibleEventAfter( std::optional<std::pair<uint64_t, std::string>>
const std::string &room_id, lastInvisibleEventAfter(const std::string &room_id, std::string_view event_id);
std::string_view event_id);
std::optional<std::string> getTimelineEventId(const std::string &room_id, uint64_t index); std::optional<std::string> getTimelineEventId(const std::string &room_id, uint64_t index);
std::optional<uint64_t> getArrivalIndex(const std::string &room_id, std::string_view event_id); std::optional<uint64_t> getArrivalIndex(const std::string &room_id, std::string_view event_id);
@ -213,8 +209,8 @@ public:
uint64_t saveOldMessages(const std::string &room_id, const mtx::responses::Messages &res); uint64_t saveOldMessages(const std::string &room_id, const mtx::responses::Messages &res);
void savePendingMessage(const std::string &room_id, void savePendingMessage(const std::string &room_id,
const mtx::events::collections::TimelineEvent &message); const mtx::events::collections::TimelineEvent &message);
std::optional<mtx::events::collections::TimelineEvent> firstPendingMessage( std::optional<mtx::events::collections::TimelineEvent>
const std::string &room_id); firstPendingMessage(const std::string &room_id);
void removePendingStatus(const std::string &room_id, const std::string &txn_id); void removePendingStatus(const std::string &room_id, const std::string &txn_id);
//! clear timeline keeping only the latest batch //! clear timeline keeping only the latest batch
@ -228,14 +224,14 @@ public:
std::vector<std::string> getParentRoomIds(const std::string &room_id); std::vector<std::string> getParentRoomIds(const std::string &room_id);
std::vector<std::string> getChildRoomIds(const std::string &room_id); std::vector<std::string> getChildRoomIds(const std::string &room_id);
std::vector<ImagePackInfo> getImagePacks(const std::string &room_id, std::vector<ImagePackInfo>
std::optional<bool> stickers); getImagePacks(const std::string &room_id, std::optional<bool> stickers);
//! Mark a room that uses e2e encryption. //! Mark a room that uses e2e encryption.
void setEncryptedRoom(lmdb::txn &txn, const std::string &room_id); void setEncryptedRoom(lmdb::txn &txn, const std::string &room_id);
bool isRoomEncrypted(const std::string &room_id); bool isRoomEncrypted(const std::string &room_id);
std::optional<mtx::events::state::Encryption> roomEncryptionSettings( std::optional<mtx::events::state::Encryption>
const std::string &room_id); roomEncryptionSettings(const std::string &room_id);
//! Check if a user is a member of the room. //! Check if a user is a member of the room.
bool isRoomMember(const std::string &user_id, const std::string &room_id); bool isRoomMember(const std::string &user_id, const std::string &room_id);
@ -273,8 +269,8 @@ public:
mtx::crypto::OlmSessionPtr session, mtx::crypto::OlmSessionPtr session,
uint64_t timestamp); uint64_t timestamp);
std::vector<std::string> getOlmSessions(const std::string &curve25519); std::vector<std::string> getOlmSessions(const std::string &curve25519);
std::optional<mtx::crypto::OlmSessionPtr> getOlmSession(const std::string &curve25519, std::optional<mtx::crypto::OlmSessionPtr>
const std::string &session_id); getOlmSession(const std::string &curve25519, const std::string &session_id);
std::optional<mtx::crypto::OlmSessionPtr> getLatestOlmSession(const std::string &curve25519); std::optional<mtx::crypto::OlmSessionPtr> getLatestOlmSession(const std::string &curve25519);
void saveOlmAccount(const std::string &pickled); void saveOlmAccount(const std::string &pickled);
@ -331,8 +327,8 @@ private:
const QList<mtx::responses::Notification> &res); const QList<mtx::responses::Notification> &res);
//! Get timeline items that a user was mentions in for a given room //! Get timeline items that a user was mentions in for a given room
mtx::responses::Notifications getTimelineMentionsForRoom(lmdb::txn &txn, mtx::responses::Notifications
const std::string &room_id); getTimelineMentionsForRoom(lmdb::txn &txn, const std::string &room_id);
QString getInviteRoomName(lmdb::txn &txn, lmdb::dbi &statesdb, lmdb::dbi &membersdb); QString getInviteRoomName(lmdb::txn &txn, lmdb::dbi &statesdb, lmdb::dbi &membersdb);
QString getInviteRoomTopic(lmdb::txn &txn, lmdb::dbi &statesdb); QString getInviteRoomTopic(lmdb::txn &txn, lmdb::dbi &statesdb);
@ -447,9 +443,8 @@ private:
} }
template<typename T> template<typename T>
std::optional<mtx::events::StateEvent<T>> getStateEvent(lmdb::txn &txn, std::optional<mtx::events::StateEvent<T>>
const std::string &room_id, getStateEvent(lmdb::txn &txn, const std::string &room_id, std::string_view state_key = "")
std::string_view state_key = "")
{ {
try { try {
constexpr auto type = mtx::events::state_content_to_type<T>; constexpr auto type = mtx::events::state_content_to_type<T>;
@ -492,8 +487,8 @@ private:
} }
template<typename T> template<typename T>
std::vector<mtx::events::StateEvent<T>> getStateEventsWithType(lmdb::txn &txn, std::vector<mtx::events::StateEvent<T>>
const std::string &room_id) getStateEventsWithType(lmdb::txn &txn, const std::string &room_id)
{ {
constexpr auto type = mtx::events::state_content_to_type<T>; constexpr auto type = mtx::events::state_content_to_type<T>;
@ -531,16 +526,16 @@ private:
return events; return events;
} }
void saveInvites(lmdb::txn &txn, void
const std::map<std::string, mtx::responses::InvitedRoom> &rooms); saveInvites(lmdb::txn &txn, const std::map<std::string, mtx::responses::InvitedRoom> &rooms);
void savePresence( void savePresence(
lmdb::txn &txn, lmdb::txn &txn,
const std::vector<mtx::events::Event<mtx::events::presence::Presence>> &presenceUpdates); const std::vector<mtx::events::Event<mtx::events::presence::Presence>> &presenceUpdates);
//! Sends signals for the rooms that are removed. //! Sends signals for the rooms that are removed.
void removeLeftRooms(lmdb::txn &txn, void
const std::map<std::string, mtx::responses::LeftRoom> &rooms) removeLeftRooms(lmdb::txn &txn, const std::map<std::string, mtx::responses::LeftRoom> &rooms)
{ {
for (const auto &room : rooms) { for (const auto &room : rooms) {
removeRoom(txn, room.first); removeRoom(txn, room.first);

View File

@ -163,9 +163,8 @@ public:
QModelIndex mapFromSource(const QModelIndex &sourceIndex) const override; QModelIndex mapFromSource(const QModelIndex &sourceIndex) const override;
QModelIndex mapToSource(const QModelIndex &proxyIndex) const override; QModelIndex mapToSource(const QModelIndex &proxyIndex) const override;
QModelIndex index(int row, QModelIndex
int column, index(int row, int column, const QModelIndex &parent = QModelIndex()) const override;
const QModelIndex &parent = QModelIndex()) const override;
QModelIndex parent(const QModelIndex &) const override; QModelIndex parent(const QModelIndex &) const override;
public slots: public slots:

View File

@ -61,8 +61,8 @@ const QRegularExpression url_regex(
// vvvv atomic match url -> fail if there is a " before or after vvv // vvvv atomic match url -> fail if there is a " before or after vvv
R"((?<!["'])(?>((www\.(?!\.)|[a-z][a-z0-9+.-]*://)[^\s<>'"]+[^!,\.\s<>'"\]\)\:]))(?!["']))"); R"((?<!["'])(?>((www\.(?!\.)|[a-z][a-z0-9+.-]*://)[^\s<>'"]+[^!,\.\s<>'"\]\)\:]))(?!["']))");
// match any markdown matrix.to link. Capture group 1 is the link name, group 2 is the target. // match any markdown matrix.to link. Capture group 1 is the link name, group 2 is the target.
static const QRegularExpression matrixToMarkdownLink( static const QRegularExpression
R"(\[(.*?)(?<!\\)\]\((https://matrix.to/#/.*?\)))"); matrixToMarkdownLink(R"(\[(.*?)(?<!\\)\]\((https://matrix.to/#/.*?\)))");
static const QRegularExpression matrixToLink(R"(<a href=\"(https://matrix.to/#/.*?)\">(.*?)</a>)"); static const QRegularExpression matrixToLink(R"(<a href=\"(https://matrix.to/#/.*?)\">(.*?)</a>)");
} }

View File

@ -50,8 +50,8 @@ public:
static bool isAvailable() { return Jdenticon::getJdenticonInterface() != nullptr; } static bool isAvailable() { return Jdenticon::getJdenticonInterface() != nullptr; }
public slots: public slots:
QQuickImageResponse *requestImageResponse(const QString &id, QQuickImageResponse *
const QSize &requestedSize) override requestImageResponse(const QString &id, const QSize &requestedSize) override
{ {
auto id_ = id; auto id_ = id;
bool crop = true; bool crop = true;

View File

@ -57,16 +57,16 @@ public:
static MainWindow *instance() { return instance_; } static MainWindow *instance() { return instance_; }
void saveCurrentWindowSize(); void saveCurrentWindowSize();
void openCreateRoomDialog( void
std::function<void(const mtx::requests::CreateRoom &request)> callback); openCreateRoomDialog(std::function<void(const mtx::requests::CreateRoom &request)> callback);
void openJoinRoomDialog(std::function<void(const QString &room_id)> callback); void openJoinRoomDialog(std::function<void(const QString &room_id)> callback);
void openLogoutDialog(); void openLogoutDialog();
void hideOverlay(); void hideOverlay();
void showSolidOverlayModal(QWidget *content, QFlags<Qt::AlignmentFlag> flags = Qt::AlignCenter); void showSolidOverlayModal(QWidget *content, QFlags<Qt::AlignmentFlag> flags = Qt::AlignCenter);
void showTransparentOverlayModal(QWidget *content, void
QFlags<Qt::AlignmentFlag> flags = Qt::AlignTop | showTransparentOverlayModal(QWidget *content,
Qt::AlignHCenter); QFlags<Qt::AlignmentFlag> flags = Qt::AlignTop | Qt::AlignHCenter);
protected: protected:
void closeEvent(QCloseEvent *event) override; void closeEvent(QCloseEvent *event) override;

View File

@ -49,8 +49,8 @@ class MxcImageProvider
{ {
Q_OBJECT Q_OBJECT
public slots: public slots:
QQuickImageResponse *requestImageResponse(const QString &id, QQuickImageResponse *
const QSize &requestedSize) override; requestImageResponse(const QString &id, const QSize &requestedSize) override;
static void addEncryptionInfo(mtx::crypto::EncryptedFile info); static void addEncryptionInfo(mtx::crypto::EncryptedFile info);
static void download(const QString &id, static void download(const QString &id,

View File

@ -662,9 +662,12 @@ DeviceVerificationFlow::sendVerificationRequest()
} else if (this->type == DeviceVerificationFlow::Type::RoomMsg && model_) { } else if (this->type == DeviceVerificationFlow::Type::RoomMsg && model_) {
req.to = this->toClient.to_string(); req.to = this->toClient.to_string();
req.msgtype = "m.key.verification.request"; req.msgtype = "m.key.verification.request";
// clang-format off
// clang-format < 12 is buggy on this
req.body = "User is requesting to verify keys with you. However, your client does " req.body = "User is requesting to verify keys with you. However, your client does "
"not support this method, so you will need to use the legacy method of " "not support this method, so you will need to use the legacy method of "
"key verification."; "key verification.";
// clang-format on
} }
send(req); send(req);

View File

@ -103,22 +103,22 @@ public:
}; };
Q_ENUM(Error) Q_ENUM(Error)
static QSharedPointer<DeviceVerificationFlow> NewInRoomVerification( static QSharedPointer<DeviceVerificationFlow>
QObject *parent_, NewInRoomVerification(QObject *parent_,
TimelineModel *timelineModel_, TimelineModel *timelineModel_,
const mtx::events::msg::KeyVerificationRequest &msg, const mtx::events::msg::KeyVerificationRequest &msg,
QString other_user_, QString other_user_,
QString event_id_); QString event_id_);
static QSharedPointer<DeviceVerificationFlow> NewToDeviceVerification( static QSharedPointer<DeviceVerificationFlow>
QObject *parent_, NewToDeviceVerification(QObject *parent_,
const mtx::events::msg::KeyVerificationRequest &msg, const mtx::events::msg::KeyVerificationRequest &msg,
QString other_user_, QString other_user_,
QString txn_id_); QString txn_id_);
static QSharedPointer<DeviceVerificationFlow> NewToDeviceVerification( static QSharedPointer<DeviceVerificationFlow>
QObject *parent_, NewToDeviceVerification(QObject *parent_,
const mtx::events::msg::KeyVerificationStart &msg, const mtx::events::msg::KeyVerificationStart &msg,
QString other_user_, QString other_user_,
QString txn_id_); QString txn_id_);
static QSharedPointer<DeviceVerificationFlow> static QSharedPointer<DeviceVerificationFlow>
InitiateUserVerification(QObject *parent_, TimelineModel *timelineModel_, QString userid); InitiateUserVerification(QObject *parent_, TimelineModel *timelineModel_, QString userid);
static QSharedPointer<DeviceVerificationFlow> static QSharedPointer<DeviceVerificationFlow>

View File

@ -87,9 +87,8 @@ private:
#if defined(Q_OS_WINDOWS) #if defined(Q_OS_WINDOWS)
private: private:
void systemPostNotification(const QString &line1, void
const QString &line2, systemPostNotification(const QString &line1, const QString &line2, const QString &iconPath);
const QString &iconPath);
#endif #endif
// these slots are platform specific (D-Bus only) // these slots are platform specific (D-Bus only)

View File

@ -100,10 +100,19 @@ NotificationsManager::systemPostNotification(const QString &line1,
WinToast::instance()->showToast(templ, new CustomHandler()); WinToast::instance()->showToast(templ, new CustomHandler());
} }
void NotificationsManager::actionInvoked(uint, QString) {} // clang-format off
void NotificationsManager::notificationReplied(uint, QString) {} // clang-format < 12 is buggy on this
void
NotificationsManager::actionInvoked(uint, QString)
{}
void NotificationsManager::notificationClosed(uint, uint) {} void
NotificationsManager::notificationReplied(uint, QString)
{}
void
NotificationsManager::notificationClosed(uint, uint)
{}
void void
NotificationsManager::removeNotification(const QString &, const QString &) NotificationsManager::removeNotification(const QString &, const QString &)

View File

@ -79,8 +79,8 @@ public:
QVariantList reactions(const std::string &event_id); QVariantList reactions(const std::string &event_id);
std::vector<mtx::events::collections::TimelineEvents> edits(const std::string &event_id); std::vector<mtx::events::collections::TimelineEvents> edits(const std::string &event_id);
olm::DecryptionErrorCode decryptionError(std::string id); olm::DecryptionErrorCode decryptionError(std::string id);
void requestSession(const mtx::events::EncryptedEvent<mtx::events::msg::Encrypted> &ev, void
bool manual); requestSession(const mtx::events::EncryptedEvent<mtx::events::msg::Encrypted> &ev, bool manual);
int size() const int size() const
{ {
@ -121,9 +121,9 @@ public slots:
void enableKeyRequests(bool suppressKeyRequests_); void enableKeyRequests(bool suppressKeyRequests_);
private: private:
olm::DecryptionResult *decryptEvent( olm::DecryptionResult *
const IdIndex &idx, decryptEvent(const IdIndex &idx,
const mtx::events::EncryptedEvent<mtx::events::msg::Encrypted> &e); const mtx::events::EncryptedEvent<mtx::events::msg::Encrypted> &e);
void handle_room_verification(mtx::events::collections::TimelineEvents event); void handle_room_verification(mtx::events::collections::TimelineEvents event);
std::string room_id_; std::string room_id_;

View File

@ -126,43 +126,43 @@ struct RoomEventType
{ {
return qml_mtx_events::EventType::VideoMessage; return qml_mtx_events::EventType::VideoMessage;
} }
qml_mtx_events::EventType operator()( qml_mtx_events::EventType
const mtx::events::Event<mtx::events::msg::KeyVerificationRequest> &) operator()(const mtx::events::Event<mtx::events::msg::KeyVerificationRequest> &)
{ {
return qml_mtx_events::EventType::KeyVerificationRequest; return qml_mtx_events::EventType::KeyVerificationRequest;
} }
qml_mtx_events::EventType operator()( qml_mtx_events::EventType
const mtx::events::Event<mtx::events::msg::KeyVerificationStart> &) operator()(const mtx::events::Event<mtx::events::msg::KeyVerificationStart> &)
{ {
return qml_mtx_events::EventType::KeyVerificationStart; return qml_mtx_events::EventType::KeyVerificationStart;
} }
qml_mtx_events::EventType operator()( qml_mtx_events::EventType
const mtx::events::Event<mtx::events::msg::KeyVerificationMac> &) operator()(const mtx::events::Event<mtx::events::msg::KeyVerificationMac> &)
{ {
return qml_mtx_events::EventType::KeyVerificationMac; return qml_mtx_events::EventType::KeyVerificationMac;
} }
qml_mtx_events::EventType operator()( qml_mtx_events::EventType
const mtx::events::Event<mtx::events::msg::KeyVerificationAccept> &) operator()(const mtx::events::Event<mtx::events::msg::KeyVerificationAccept> &)
{ {
return qml_mtx_events::EventType::KeyVerificationAccept; return qml_mtx_events::EventType::KeyVerificationAccept;
} }
qml_mtx_events::EventType operator()( qml_mtx_events::EventType
const mtx::events::Event<mtx::events::msg::KeyVerificationReady> &) operator()(const mtx::events::Event<mtx::events::msg::KeyVerificationReady> &)
{ {
return qml_mtx_events::EventType::KeyVerificationReady; return qml_mtx_events::EventType::KeyVerificationReady;
} }
qml_mtx_events::EventType operator()( qml_mtx_events::EventType
const mtx::events::Event<mtx::events::msg::KeyVerificationCancel> &) operator()(const mtx::events::Event<mtx::events::msg::KeyVerificationCancel> &)
{ {
return qml_mtx_events::EventType::KeyVerificationCancel; return qml_mtx_events::EventType::KeyVerificationCancel;
} }
qml_mtx_events::EventType operator()( qml_mtx_events::EventType
const mtx::events::Event<mtx::events::msg::KeyVerificationKey> &) operator()(const mtx::events::Event<mtx::events::msg::KeyVerificationKey> &)
{ {
return qml_mtx_events::EventType::KeyVerificationKey; return qml_mtx_events::EventType::KeyVerificationKey;
} }
qml_mtx_events::EventType operator()( qml_mtx_events::EventType
const mtx::events::Event<mtx::events::msg::KeyVerificationDone> &) operator()(const mtx::events::Event<mtx::events::msg::KeyVerificationDone> &)
{ {
return qml_mtx_events::EventType::KeyVerificationDone; return qml_mtx_events::EventType::KeyVerificationDone;
} }
@ -182,8 +182,8 @@ struct RoomEventType
{ {
return qml_mtx_events::EventType::CallHangUp; return qml_mtx_events::EventType::CallHangUp;
} }
qml_mtx_events::EventType operator()( qml_mtx_events::EventType
const mtx::events::Event<mtx::events::msg::CallCandidates> &) operator()(const mtx::events::Event<mtx::events::msg::CallCandidates> &)
{ {
return qml_mtx_events::EventType::CallCandidates; return qml_mtx_events::EventType::CallCandidates;
} }

View File

@ -86,8 +86,6 @@ FlatButton::FlatButton(const QString &text, ui::Role role, QWidget *parent, ui::
setRole(role); setRole(role);
} }
FlatButton::~FlatButton() {}
void void
FlatButton::applyPreset(ui::ButtonPreset preset) FlatButton::applyPreset(ui::ButtonPreset preset)
{ {
@ -615,8 +613,6 @@ FlatButtonStateMachine::FlatButtonStateMachine(FlatButton *parent)
addTransition(button_, QEvent::FocusOut, pressed_state_, hovered_state_); addTransition(button_, QEvent::FocusOut, pressed_state_, hovered_state_);
} }
FlatButtonStateMachine::~FlatButtonStateMachine() {}
void void
FlatButtonStateMachine::setOverlayOpacity(qreal opacity) FlatButtonStateMachine::setOverlayOpacity(qreal opacity)
{ {

View File

@ -22,7 +22,6 @@ class FlatButtonStateMachine : public QStateMachine
public: public:
explicit FlatButtonStateMachine(FlatButton *parent); explicit FlatButtonStateMachine(FlatButton *parent);
~FlatButtonStateMachine() override;
void setOverlayOpacity(qreal opacity); void setOverlayOpacity(qreal opacity);
void setCheckedOverlayProgress(qreal opacity); void setCheckedOverlayProgress(qreal opacity);
@ -101,7 +100,6 @@ public:
ui::Role role, ui::Role role,
QWidget *parent = nullptr, QWidget *parent = nullptr,
ui::ButtonPreset preset = ui::ButtonPreset::FlatPreset); ui::ButtonPreset preset = ui::ButtonPreset::FlatPreset);
~FlatButton() override;
void applyPreset(ui::ButtonPreset preset); void applyPreset(ui::ButtonPreset preset);

View File

@ -74,8 +74,6 @@ RaisedButton::RaisedButton(const QString &text, QWidget *parent)
setText(text); setText(text);
} }
RaisedButton::~RaisedButton() {}
bool bool
RaisedButton::event(QEvent *event) RaisedButton::event(QEvent *event)
{ {

View File

@ -17,7 +17,6 @@ class RaisedButton : public FlatButton
public: public:
explicit RaisedButton(QWidget *parent = nullptr); explicit RaisedButton(QWidget *parent = nullptr);
explicit RaisedButton(const QString &text, QWidget *parent = nullptr); explicit RaisedButton(const QString &text, QWidget *parent = nullptr);
~RaisedButton() override;
protected: protected:
bool event(QEvent *event) override; bool event(QEvent *event) override;

View File

@ -6,8 +6,6 @@
#include "ThemeManager.h" #include "ThemeManager.h"
ThemeManager::ThemeManager() {}
QColor QColor
ThemeManager::themeColor(const QString &key) const ThemeManager::themeColor(const QString &key) const
{ {

View File

@ -16,7 +16,7 @@ public:
QColor themeColor(const QString &key) const; QColor themeColor(const QString &key) const;
private: private:
ThemeManager(); ThemeManager() {}
ThemeManager(ThemeManager const &); ThemeManager(ThemeManager const &);
void operator=(ThemeManager const &); void operator=(ThemeManager const &);

View File

@ -27,8 +27,8 @@ public:
bool haveCamera() const; bool haveCamera() const;
std::vector<std::string> names(bool isVideo, const std::string &defaultDevice) const; std::vector<std::string> names(bool isVideo, const std::string &defaultDevice) const;
std::vector<std::string> resolutions(const std::string &cameraName) const; std::vector<std::string> resolutions(const std::string &cameraName) const;
std::vector<std::string> frameRates(const std::string &cameraName, std::vector<std::string>
const std::string &resolution) const; frameRates(const std::string &cameraName, const std::string &resolution) const;
signals: signals:
void devicesChanged(); void devicesChanged();

View File

@ -1115,7 +1115,14 @@ WebRTCSession::haveLocalPiP() const
return false; return false;
} }
bool WebRTCSession::createOffer(webrtc::CallType, uint32_t) { return false; } // clang-format off
// clang-format < 12 is buggy on this
bool
WebRTCSession::createOffer(webrtc::CallType, uint32_t)
{
return false;
}
// clang-format on
bool bool
WebRTCSession::acceptOffer(const std::string &) WebRTCSession::acceptOffer(const std::string &)