diff options
author | 2019-03-20 07:31:24 -0700 | |
---|---|---|
committer | 2019-04-04 15:18:07 -0700 | |
commit | c792c00f072d8d9ff838393b3e5fa0b2a655e422 (patch) | |
tree | eed938239d56083077a5d1d6971c35c586b2e42e /core/connectionlistmodel.h | |
parent | f1371adbb87dbfd37d5cc6619aac5b733df0d0e2 (diff) | |
download | subsurface-c792c00f072d8d9ff838393b3e5fa0b2a655e422.tar.gz |
Core: simplify ConnectionListModel
The complicated setup with the AddressRole is unnecessary. All we want to be
able to do is get the index of a specific text in the list. In hindsight I am
puzzled why I implemented this in such a complex fashion.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'core/connectionlistmodel.h')
-rw-r--r-- | core/connectionlistmodel.h | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/core/connectionlistmodel.h b/core/connectionlistmodel.h index 11a93bfbc..d6ffe831c 100644 --- a/core/connectionlistmodel.h +++ b/core/connectionlistmodel.h @@ -6,13 +6,8 @@ class ConnectionListModel : public QAbstractListModel { Q_OBJECT public: - enum CLMRole { - AddressRole = Qt::UserRole + 1 - }; ConnectionListModel(QObject *parent = 0); - QHash<int, QByteArray> roleNames() const; - QVariant data(const QModelIndex &index, int role = AddressRole) const; - QString address(int idx) const; + QVariant data(const QModelIndex &index, int role) const; int rowCount(const QModelIndex &parent = QModelIndex()) const; void addAddress(const QString address); void removeAllAddresses(); |