summaryrefslogtreecommitdiffstats
path: root/core/connectionlistmodel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/connectionlistmodel.cpp')
-rw-r--r--core/connectionlistmodel.cpp16
1 files changed, 1 insertions, 15 deletions
diff --git a/core/connectionlistmodel.cpp b/core/connectionlistmodel.cpp
index 3cc9c24f9..8cd270347 100644
--- a/core/connectionlistmodel.cpp
+++ b/core/connectionlistmodel.cpp
@@ -7,29 +7,15 @@ ConnectionListModel::ConnectionListModel(QObject *parent) :
{
}
-QHash <int, QByteArray> ConnectionListModel::roleNames() const
-{
- QHash<int, QByteArray> roles;
- roles[AddressRole] = "address";
- return roles;
-}
-
QVariant ConnectionListModel::data(const QModelIndex &index, int role) const
{
if (index.row() < 0 || index.row() >= m_addresses.count())
return QVariant();
- if (role != AddressRole)
+ if (role != Qt::DisplayRole)
return QVariant();
return m_addresses[index.row()];
}
-QString ConnectionListModel::address(int idx) const
-{
- if (idx < 0 || idx >> m_addresses.count())
- return QString();
- return m_addresses[idx];
-}
-
int ConnectionListModel::rowCount(const QModelIndex&) const
{
return m_addresses.count();