diff options
author | Roberto C. Sanchez <roberto@connexer.com> | 2014-10-21 22:48:29 -0400 |
---|---|---|
committer | Roberto C. Sanchez <roberto@connexer.com> | 2014-10-21 22:48:29 -0400 |
commit | e8a196082586bb68e0bf254a8f6f4b8f39071f32 (patch) | |
tree | b03dbbd1b5be6092ed5e9bcb3806aa2d4938bba3 /src/backend/bookshelfmodel/btmodulenamefilterproxymodel.cpp | |
parent | dd2f7ce46df53f2c377c02d1bf4df8adcf092072 (diff) |
Imported Upstream version 2.3.3
Diffstat (limited to 'src/backend/bookshelfmodel/btmodulenamefilterproxymodel.cpp')
-rw-r--r-- | src/backend/bookshelfmodel/btmodulenamefilterproxymodel.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/backend/bookshelfmodel/btmodulenamefilterproxymodel.cpp b/src/backend/bookshelfmodel/btmodulenamefilterproxymodel.cpp index f416175..31b93e1 100644 --- a/src/backend/bookshelfmodel/btmodulenamefilterproxymodel.cpp +++ b/src/backend/bookshelfmodel/btmodulenamefilterproxymodel.cpp @@ -13,8 +13,7 @@ #include "backend/bookshelfmodel/btmodulenamefilterproxymodel.h" BtModuleNameFilterProxyModel::BtModuleNameFilterProxyModel(QObject *parent) - : QSortFilterProxyModel(parent), m_enabled(true) -{ + : QSortFilterProxyModel(parent), m_enabled(true) { setFilterCaseSensitivity(Qt::CaseInsensitive); } @@ -23,8 +22,7 @@ BtModuleNameFilterProxyModel::~BtModuleNameFilterProxyModel() { } bool BtModuleNameFilterProxyModel::filterAcceptsRow(int row, - const QModelIndex &p) const -{ + const QModelIndex &p) const { if (!m_enabled) return true; const QAbstractItemModel *m(sourceModel()); @@ -34,7 +32,8 @@ bool BtModuleNameFilterProxyModel::filterAcceptsRow(int row, int numChildren(m->rowCount(itemIndex)); if (numChildren == 0) { return QSortFilterProxyModel::filterAcceptsRow(row, p); - } else { + } + else { for (int i(0); i < numChildren; i++) { if (filterAcceptsRow(i, itemIndex)) return true; } |