core: add indexOf member to ConnectionListModel
This will allow us to programatically set the connection in the QML UI. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
842210c80d
commit
1bbbc07dd5
@ -50,3 +50,8 @@ void ConnectionListModel::removeAllAddresses()
|
||||
m_addresses.clear();
|
||||
endRemoveRows();
|
||||
}
|
||||
|
||||
int ConnectionListModel::indexOf(QString address)
|
||||
{
|
||||
return m_addresses.indexOf(address);
|
||||
}
|
||||
|
||||
@ -16,6 +16,7 @@ public:
|
||||
int rowCount(const QModelIndex &parent = QModelIndex()) const;
|
||||
void addAddress(const QString address);
|
||||
void removeAllAddresses();
|
||||
int indexOf(QString address);
|
||||
private:
|
||||
QStringList m_addresses;
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user