MCPcopy Create free account
hub / github.com/KangLin/RabbitRemoteControl / canFetchMore

Method canFetchMore

App/Client/Favorite/FavoriteModel.cpp:90–109  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

88}
89
90bool CFavoriteModel::canFetchMore(const QModelIndex &parent) const
91{
92 //qDebug(log) << "canFatchMore:" << parent;
93 if(!m_pDatabase) return false;
94 int parentId = 0;
95 if (parent.isValid()) {
96 if(0 != parent.column()) return false;
97 tree* parentItem = static_cast<tree*>(parent.internalPointer());
98 if(!parentItem)
99 return false;
100 if(parentItem->item.isFavorite())
101 return false;
102 parentId = parentItem->item.id;
103 if(parentItem->children.isEmpty())
104 return m_pDatabase->GetCount(parentId) > 0;
105 else
106 return false;
107 }
108 return true;
109}
110
111void CFavoriteModel::fetchMore(const QModelIndex &parent)
112{

Callers

nothing calls this directly

Calls 4

isValidMethod · 0.80
isFavoriteMethod · 0.80
GetCountMethod · 0.80
isEmptyMethod · 0.45

Tested by

no test coverage detected