diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2019-04-16 09:47:28 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2019-04-16 23:43:14 +1200 |
commit | 15b2dbede4bb7907d687cf72d54b4ecdd7cc42a9 (patch) | |
tree | de6109f33f2fab51b1cb8358bc9dd448572a2410 /core/connectionlistmodel.cpp | |
parent | aa86d47e47b049addc8e09625e47df94383530a0 (diff) | |
download | subsurface-15b2dbede4bb7907d687cf72d54b4ecdd7cc42a9.tar.gz |
Mobile: reinstate roleNames function in ConnectionListModel
Commit c69ca4df80c9c74aa842b7f1fb3c44b22ae3232e removed the roleNames
function, which is not needed according to the docs, as a default function
is provided. For unknown reasons this broke the QML combo box.
Reinstate the function.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/connectionlistmodel.cpp')
-rw-r--r-- | core/connectionlistmodel.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/core/connectionlistmodel.cpp b/core/connectionlistmodel.cpp index 0e4d69828..e4ac8bfeb 100644 --- a/core/connectionlistmodel.cpp +++ b/core/connectionlistmodel.cpp @@ -7,6 +7,13 @@ ConnectionListModel::ConnectionListModel(QObject *parent) : { } +QHash <int, QByteArray> ConnectionListModel::roleNames() const +{ + QHash<int, QByteArray> roles; + roles[Qt::DisplayRole] = "display"; + return roles; +} + QVariant ConnectionListModel::data(const QModelIndex &index, int role) const { if (index.row() < 0 || index.row() >= m_addresses.count()) |