MCPcopy Create free account
hub / github.com/KDE/kdevelop / filterAcceptsRow

Method filterAcceptsRow

kdevplatform/project/projectproxymodel.cpp:39–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37}
38
39bool 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
55QModelIndex ProjectProxyModel::proxyIndexFromItem(KDevelop::ProjectBaseItem* item) const
56{

Callers

nothing calls this directly

Calls 3

indexMethod · 0.45
itemFromIndexMethod · 0.45
typeMethod · 0.45

Tested by

no test coverage detected