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

Method fileItemForUrl

kdevplatform/vcs/models/vcsfilechangesmodel.cpp:189–204  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

187}
188
189QStandardItem* VcsFileChangesModel::fileItemForUrl(QStandardItem* parent, const QUrl& url) const
190{
191 Q_ASSERT(parent);
192 if (!parent) {
193 qCWarning(VCS) << "null QStandardItem passed to" << Q_FUNC_INFO;
194 return nullptr;
195 }
196
197 for(int i=0, c=parent->rowCount(); i<c; i++) {
198 QStandardItem* item = parent->child(i);
199 if(indexFromItem(item).data(UrlRole).toUrl() == url) {
200 return parent->child(i);
201 }
202 }
203 return nullptr;
204}
205
206void VcsFileChangesModel::setAllChecked(bool checked)
207{

Callers

nothing calls this directly

Calls 4

rowCountMethod · 0.45
childMethod · 0.45
toUrlMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected