Use explicit keyword

This commit is contained in:
Laurent Montel
2023-07-12 13:18:32 +02:00
parent 10a294f99e
commit a5da17b000
11 changed files with 11 additions and 11 deletions

View File

@@ -78,7 +78,7 @@ public:
};
Q_ENUM(EventRoles)
RoomListModel(QObject *parent = nullptr);
explicit RoomListModel(QObject *parent = nullptr);
~RoomListModel() override;
[[nodiscard]] Quotient::Connection *connection() const;

View File

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

View File

@@ -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.

View File

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

View File

@@ -31,7 +31,7 @@ public:
};
Q_ENUM(Roles);
StateModel(QObject *parent = nullptr);
explicit StateModel(QObject *parent = nullptr);
NeoChatRoom *room() const;
void setRoom(NeoChatRoom *room);

View File

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

View File

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