mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-02-03 04:39:24 +00:00
- avoid the usage of a lot of singletons, use methods in `CoreManager` instead - create a `UnregisteredSipAddressesProxyModel` model - unstable
14 lines
589 B
C++
14 lines
589 B
C++
#include "../core/CoreManager.hpp"
|
|
|
|
#include "UnregisteredSipAddressesModel.hpp"
|
|
|
|
// =============================================================================
|
|
|
|
UnregisteredSipAddressesModel::UnregisteredSipAddressesModel (QObject *parent) : QSortFilterProxyModel(parent) {
|
|
setSourceModel(CoreManager::getInstance()->getSipAddressesModel());
|
|
}
|
|
|
|
bool UnregisteredSipAddressesModel::filterAcceptsRow (int source_row, const QModelIndex &source_parent) const {
|
|
QModelIndex index = sourceModel()->index(source_row, 0, source_parent);
|
|
return index.data().toMap().contains("contact");
|
|
}
|