| 37 | } |
| 38 | |
| 39 | bool ProjectProxyModel::filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const |
| 40 | { |
| 41 | if (m_showTargets) { |
| 42 | return true; |
| 43 | } |
| 44 | else { |
| 45 | // Get the base item for the associated parent and row. |
| 46 | QModelIndex index = sourceModel()->index(sourceRow, 0, sourceParent); |
| 47 | auto *item = projectModel()->itemFromIndex(index); |
| 48 | // If it's a target, return false, otherwise true. |
| 49 | return item->type() != KDevelop::ProjectBaseItem::Target |
| 50 | && item->type() != KDevelop::ProjectBaseItem::LibraryTarget |
| 51 | && item->type() != KDevelop::ProjectBaseItem::ExecutableTarget; |
| 52 | } |
| 53 | } |
| 54 | |
| 55 | QModelIndex ProjectProxyModel::proxyIndexFromItem(KDevelop::ProjectBaseItem* item) const |
| 56 | { |
nothing calls this directly
no test coverage detected