Use explicit keyword
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -78,7 +78,7 @@ public:
|
||||
};
|
||||
Q_ENUM(EventRoles)
|
||||
|
||||
RoomListModel(QObject *parent = nullptr);
|
||||
explicit RoomListModel(QObject *parent = nullptr);
|
||||
~RoomListModel() override;
|
||||
|
||||
[[nodiscard]] Quotient::Connection *connection() const;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -31,7 +31,7 @@ public:
|
||||
};
|
||||
Q_ENUM(Roles);
|
||||
|
||||
StateModel(QObject *parent = nullptr);
|
||||
explicit StateModel(QObject *parent = nullptr);
|
||||
|
||||
NeoChatRoom *room() const;
|
||||
void setRoom(NeoChatRoom *room);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -85,7 +85,7 @@ public:
|
||||
#endif
|
||||
|
||||
private:
|
||||
NotificationsManager(QObject *parent = nullptr);
|
||||
explicit NotificationsManager(QObject *parent = nullptr);
|
||||
|
||||
QHash<QString, qint64> m_initialTimestamp;
|
||||
QHash<QString, QStringList> m_oldNotifications;
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user