summaryrefslogtreecommitdiffstats
path: root/core/connectionlistmodel.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2018-08-08 05:54:10 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-08-11 11:14:22 -0700
commit1bbbc07dd5a969554c6d4041593d7b7e3ad25e5f (patch)
treef0a5f5fb1718995f91e774c5e21f79ccad2b7963 /core/connectionlistmodel.cpp
parent842210c80d1618a78928fb2bf93cc4a4c77a3ccf (diff)
downloadsubsurface-1bbbc07dd5a969554c6d4041593d7b7e3ad25e5f.tar.gz
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>
Diffstat (limited to 'core/connectionlistmodel.cpp')
-rw-r--r--core/connectionlistmodel.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/connectionlistmodel.cpp b/core/connectionlistmodel.cpp
index 04d1d5909..aaa829949 100644
--- a/core/connectionlistmodel.cpp
+++ b/core/connectionlistmodel.cpp
@@ -50,3 +50,8 @@ void ConnectionListModel::removeAllAddresses()
m_addresses.clear();
endRemoveRows();
}
+
+int ConnectionListModel::indexOf(QString address)
+{
+ return m_addresses.indexOf(address);
+}