mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-02-01 19:59:24 +00:00
feat(app): force the usage of override keyword
This commit is contained in:
parent
989bbc4edf
commit
7bcc90c38f
7 changed files with 18 additions and 15 deletions
|
|
@ -25,6 +25,8 @@ set(CUSTOM_FLAGS "\
|
|||
-Wpointer-arith \
|
||||
-Wuninitialized \
|
||||
-Wunused \
|
||||
-Wsuggest-override \
|
||||
-Werror=suggest-override \
|
||||
")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CUSTOM_FLAGS}")
|
||||
|
||||
|
|
|
|||
|
|
@ -47,13 +47,13 @@ public:
|
|||
|
||||
ChatModel (QObject *parent = Q_NULLPTR) : QAbstractListModel(parent) {}
|
||||
|
||||
int rowCount (const QModelIndex &index = QModelIndex()) const;
|
||||
int rowCount (const QModelIndex &index = QModelIndex()) const override;
|
||||
|
||||
QHash<int, QByteArray> roleNames () const;
|
||||
QVariant data (const QModelIndex &index, int role) const;
|
||||
QHash<int, QByteArray> roleNames () const override;
|
||||
QVariant data (const QModelIndex &index, int role) const override;
|
||||
|
||||
bool removeRow (int row, const QModelIndex &parent = QModelIndex());
|
||||
bool removeRows (int row, int count, const QModelIndex &parent = QModelIndex());
|
||||
bool removeRows (int row, int count, const QModelIndex &parent = QModelIndex()) override;
|
||||
|
||||
public slots:
|
||||
void removeEntry (int id);
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ public:
|
|||
ChatModelFilter (QObject *parent = Q_NULLPTR);
|
||||
|
||||
protected:
|
||||
bool filterAcceptsRow (int source_row, const QModelIndex &parent) const;
|
||||
bool filterAcceptsRow (int source_row, const QModelIndex &parent) const override;
|
||||
|
||||
private:
|
||||
void setEntryTypeFilter (ChatModel::EntryType type);
|
||||
|
|
@ -60,7 +60,7 @@ public slots:
|
|||
}
|
||||
|
||||
protected:
|
||||
bool filterAcceptsRow (int source_row, const QModelIndex &source_parent) const;
|
||||
bool filterAcceptsRow (int source_row, const QModelIndex &source_parent) const override;
|
||||
|
||||
private:
|
||||
QString getSipAddress () const {
|
||||
|
|
|
|||
|
|
@ -16,13 +16,13 @@ class ContactsListModel : public QAbstractListModel {
|
|||
public:
|
||||
ContactsListModel (QObject *parent = Q_NULLPTR);
|
||||
|
||||
int rowCount (const QModelIndex &index = QModelIndex()) const;
|
||||
int rowCount (const QModelIndex &index = QModelIndex()) const override;
|
||||
|
||||
QHash<int, QByteArray> roleNames () const;
|
||||
QVariant data (const QModelIndex &index, int role) const;
|
||||
QHash<int, QByteArray> roleNames () const override;
|
||||
QVariant data (const QModelIndex &index, int role) const override;
|
||||
|
||||
bool removeRow (int row, const QModelIndex &parent = QModelIndex());
|
||||
bool removeRows (int row, int count, const QModelIndex &parent = QModelIndex());
|
||||
bool removeRows (int row, int count, const QModelIndex &parent = QModelIndex()) override;
|
||||
|
||||
public slots:
|
||||
// See: http://doc.qt.io/qt-5/qtqml-cppintegration-data.html#data-ownership
|
||||
|
|
|
|||
|
|
@ -30,8 +30,8 @@ public slots:
|
|||
}
|
||||
|
||||
protected:
|
||||
bool filterAcceptsRow (int source_row, const QModelIndex &source_parent) const;
|
||||
bool lessThan (const QModelIndex &left, const QModelIndex &right) const;
|
||||
bool filterAcceptsRow (int source_row, const QModelIndex &source_parent) const override;
|
||||
bool lessThan (const QModelIndex &left, const QModelIndex &right) const override;
|
||||
|
||||
private:
|
||||
float computeStringWeight (const QString &string, float percentage) const;
|
||||
|
|
|
|||
|
|
@ -13,9 +13,9 @@ class TimelineModel : public QAbstractListModel {
|
|||
public:
|
||||
TimelineModel (const ContactsListModel *contacts_list);
|
||||
|
||||
int rowCount (const QModelIndex &) const;
|
||||
QHash<int, QByteArray> roleNames () const;
|
||||
QVariant data (const QModelIndex &index, int role) const;
|
||||
int rowCount (const QModelIndex &) const override;
|
||||
QHash<int, QByteArray> roleNames () const override;
|
||||
QVariant data (const QModelIndex &index, int role) const override;
|
||||
|
||||
private:
|
||||
void init_entries ();
|
||||
|
|
|
|||
|
|
@ -86,6 +86,7 @@ Window {
|
|||
childA: AbstractCall {
|
||||
anchors.fill: parent
|
||||
callTypeLabel: 'INCOMING VIDEO CALL'
|
||||
sipAddress: 'sip:erwan.croze@sip.linphone.org'
|
||||
}
|
||||
|
||||
childB: Rectangle {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue