mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Add function to clear connectionModel data
Preparation primarily for mobile. When we want to switch in one session from BT to cable connection and vise versa, we need a way to clear the model data containing the possible connections in use. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
This commit is contained in:
parent
f7d120e39c
commit
8b8863b640
2 changed files with 8 additions and 0 deletions
|
@ -42,3 +42,10 @@ void ConnectionListModel::addAddress(const QString address)
|
|||
m_addresses.append(address);
|
||||
endInsertRows();
|
||||
}
|
||||
|
||||
void ConnectionListModel::removeAllAddresses()
|
||||
{
|
||||
beginRemoveRows(QModelIndex(), 0, rowCount());
|
||||
m_addresses.clear();
|
||||
endRemoveRows();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue