+
+/*****************************************************************************************
+ * FilteredCoreAccountModel
+ *****************************************************************************************/
+
+FilteredCoreAccountModel::FilteredCoreAccountModel(CoreAccountModel *model, QObject *parent) : QSortFilterProxyModel(parent) {
+ _internalAccount = model->internalAccount();
+ setSourceModel(model);
+}
+
+bool FilteredCoreAccountModel::filterAcceptsRow(int source_row, const QModelIndex &source_parent) const {
+ if(Quassel::runMode() == Quassel::Monolithic)
+ return true;
+
+ if(!_internalAccount.isValid())
+ return true;
+
+ return _internalAccount != sourceModel()->index(source_row, 0, source_parent).data(CoreAccountModel::AccountIdRole).value<AccountId>();
+}