diff --git a/src/colorschemer.h b/src/colorschemer.h index b3848b993..9d6ca338c 100644 --- a/src/colorschemer.h +++ b/src/colorschemer.h @@ -28,7 +28,7 @@ class ColorSchemer : public QObject Q_PROPERTY(QAbstractItemModel *model READ model CONSTANT) public: - ColorSchemer(QObject *parent = nullptr); + explicit ColorSchemer(QObject *parent = nullptr); ~ColorSchemer(); QAbstractItemModel *model() const; diff --git a/src/delegatesizehelper.h b/src/delegatesizehelper.h index 1fcbddca1..08bd42f2b 100644 --- a/src/delegatesizehelper.h +++ b/src/delegatesizehelper.h @@ -77,7 +77,7 @@ class DelegateSizeHelper : public QObject Q_PROPERTY(qreal currentWidth READ currentWidth NOTIFY currentWidthChanged) public: - DelegateSizeHelper(QObject *parent = nullptr); + explicit DelegateSizeHelper(QObject *parent = nullptr); qreal parentWidth() const; void setParentWidth(qreal parentWidth); diff --git a/src/models/roomlistmodel.h b/src/models/roomlistmodel.h index fe249cd14..335cd017e 100644 --- a/src/models/roomlistmodel.h +++ b/src/models/roomlistmodel.h @@ -78,7 +78,7 @@ public: }; Q_ENUM(EventRoles) - RoomListModel(QObject *parent = nullptr); + explicit RoomListModel(QObject *parent = nullptr); ~RoomListModel() override; [[nodiscard]] Quotient::Connection *connection() const; diff --git a/src/models/searchmodel.h b/src/models/searchmodel.h index 629621fa5..f3da43d35 100644 --- a/src/models/searchmodel.h +++ b/src/models/searchmodel.h @@ -86,7 +86,7 @@ public: SourceRole, }; Q_ENUM(Roles); - SearchModel(QObject *parent = nullptr); + explicit SearchModel(QObject *parent = nullptr); QString searchText() const; void setSearchText(const QString &searchText); diff --git a/src/models/serverlistmodel.h b/src/models/serverlistmodel.h index cc6b2a126..f094df69d 100644 --- a/src/models/serverlistmodel.h +++ b/src/models/serverlistmodel.h @@ -46,7 +46,7 @@ public: IsDeletableRole, /**< Whether the item can be deleted from the model. */ }; - ServerListModel(QObject *parent = nullptr); + explicit ServerListModel(QObject *parent = nullptr); /** * @brief Get the given role value at the given index. diff --git a/src/models/sortfilterroomlistmodel.h b/src/models/sortfilterroomlistmodel.h index 897d1db93..565789309 100644 --- a/src/models/sortfilterroomlistmodel.h +++ b/src/models/sortfilterroomlistmodel.h @@ -53,7 +53,7 @@ public: }; Q_ENUM(RoomSortOrder) - SortFilterRoomListModel(QObject *parent = nullptr); + explicit SortFilterRoomListModel(QObject *parent = nullptr); void setRoomSortOrder(RoomSortOrder sortOrder); [[nodiscard]] RoomSortOrder roomSortOrder() const; diff --git a/src/models/statemodel.h b/src/models/statemodel.h index ef0ebac63..bb9cf426c 100644 --- a/src/models/statemodel.h +++ b/src/models/statemodel.h @@ -31,7 +31,7 @@ public: }; Q_ENUM(Roles); - StateModel(QObject *parent = nullptr); + explicit StateModel(QObject *parent = nullptr); NeoChatRoom *room() const; void setRoom(NeoChatRoom *room); diff --git a/src/models/userdirectorylistmodel.h b/src/models/userdirectorylistmodel.h index 05d28c03c..b0ef2cd8f 100644 --- a/src/models/userdirectorylistmodel.h +++ b/src/models/userdirectorylistmodel.h @@ -53,7 +53,7 @@ public: DirectChatsRole, /**< A list of direct chat matrix IDs with the user. */ }; - UserDirectoryListModel(QObject *parent = nullptr); + explicit UserDirectoryListModel(QObject *parent = nullptr); [[nodiscard]] Quotient::Connection *connection() const; void setConnection(Quotient::Connection *conn); diff --git a/src/models/userlistmodel.h b/src/models/userlistmodel.h index 7f83f89c3..e55e258a5 100644 --- a/src/models/userlistmodel.h +++ b/src/models/userlistmodel.h @@ -47,7 +47,7 @@ public: }; Q_ENUM(EventRoles) - UserListModel(QObject *parent = nullptr); + explicit UserListModel(QObject *parent = nullptr); [[nodiscard]] NeoChatRoom *room() const; void setRoom(NeoChatRoom *room); diff --git a/src/notificationsmanager.h b/src/notificationsmanager.h index 414ce8d5d..5bb4ed5d0 100644 --- a/src/notificationsmanager.h +++ b/src/notificationsmanager.h @@ -85,7 +85,7 @@ public: #endif private: - NotificationsManager(QObject *parent = nullptr); + explicit NotificationsManager(QObject *parent = nullptr); QHash m_initialTimestamp; QHash m_oldNotifications; diff --git a/src/trayicon_sni.h b/src/trayicon_sni.h index 88e5b1359..85effb4f7 100644 --- a/src/trayicon_sni.h +++ b/src/trayicon_sni.h @@ -16,7 +16,7 @@ class TrayIcon : public KStatusNotifierItem { Q_OBJECT public: - TrayIcon(QObject *parent = nullptr); + explicit TrayIcon(QObject *parent = nullptr); /** * @brief Show the tray icon.