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

Method checkUrls

kdevplatform/vcs/models/vcsfilechangesmodel.cpp:257–277  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

255}
256
257void VcsFileChangesModel::checkUrls(QStandardItem *parent, const QList<QUrl>& urls) const
258{
259 Q_D(const VcsFileChangesModel);
260
261 Q_ASSERT(parent);
262 if (!parent) {
263 qCWarning(VCS) << "null QStandardItem passed to" << Q_FUNC_INFO;
264 return;
265 }
266
267 if(!d->allowSelection)
268 return;
269
270 const QSet<QUrl> urlSet(urls.begin(), urls.end());
271 for(int i = 0, c = parent->rowCount(); i < c; i++) {
272 QStandardItem* item = parent->child(i);
273 item->setCheckState(urlSet.contains(indexFromItem(item).data(UrlRole).toUrl()) ?
274 Qt::Checked :
275 Qt::Unchecked);
276 }
277}
278
279void VcsFileChangesModel::setIsCheckbable(bool checkable)
280{

Callers

nothing calls this directly

Calls 7

beginMethod · 0.45
endMethod · 0.45
rowCountMethod · 0.45
childMethod · 0.45
containsMethod · 0.45
toUrlMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected