diff options
author | Jarek Kobus <jaroslaw.kobus@qt.io> | 2020-06-22 10:12:38 +0200 |
---|---|---|
committer | Jarek Kobus <jaroslaw.kobus@qt.io> | 2020-06-23 14:01:11 +0200 |
commit | 29c99bddbf48f97b054a34354f55b36a3f84a62c (patch) | |
tree | ca0116c45cc3cb04e13a953316f468012d3dc2d2 /examples/widgets/itemviews/addressbook/tablemodel.h | |
parent | d7efb2a419a88c8f512b98194c8f7bc81dbe942b (diff) |
Use QList instead of QVector in examples
Task-number: QTBUG-84469
Change-Id: Id14119168bb1bf11f99bda7ef6ee9cf51bcfab2e
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Diffstat (limited to 'examples/widgets/itemviews/addressbook/tablemodel.h')
-rw-r--r-- | examples/widgets/itemviews/addressbook/tablemodel.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/widgets/itemviews/addressbook/tablemodel.h b/examples/widgets/itemviews/addressbook/tablemodel.h index e4025fc734..c5bac4f4a4 100644 --- a/examples/widgets/itemviews/addressbook/tablemodel.h +++ b/examples/widgets/itemviews/addressbook/tablemodel.h @@ -52,7 +52,7 @@ #define TABLEMODEL_H #include <QAbstractTableModel> -#include <QVector> +#include <QList> //! [0] @@ -83,7 +83,7 @@ class TableModel : public QAbstractTableModel public: TableModel(QObject *parent = nullptr); - TableModel(const QVector<Contact> &contacts, QObject *parent = nullptr); + TableModel(const QList<Contact> &contacts, QObject *parent = nullptr); int rowCount(const QModelIndex &parent) const override; int columnCount(const QModelIndex &parent) const override; @@ -93,10 +93,10 @@ public: bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override; bool insertRows(int position, int rows, const QModelIndex &index = QModelIndex()) override; bool removeRows(int position, int rows, const QModelIndex &index = QModelIndex()) override; - const QVector<Contact> &getContacts() const; + const QList<Contact> &getContacts() const; private: - QVector<Contact> contacts; + QList<Contact> contacts; }; //! [0] |