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

Method mapToSource

kdevplatform/util/multilevellistview.cpp:203–217  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

201}
202
203QModelIndex MultiLevelListViewPrivate::mapToSource(QModelIndex index) const
204{
205 if (!index.isValid()) {
206 return index;
207 }
208
209 while (index.model() != model) {
210 auto* proxy = qobject_cast<QAbstractProxyModel*>(
211 const_cast<QAbstractItemModel*>(index.model()));
212 Q_ASSERT(proxy);
213 index = proxy->mapToSource(index);
214 Q_ASSERT(index.isValid());
215 }
216 return index;
217}
218
219QModelIndex MultiLevelListViewPrivate::mapFromSource(QModelIndex index, int level) const
220{

Callers 3

selectItemDialogMethod · 0.45
currentIndexMethod · 0.45

Calls 2

isValidMethod · 0.45
modelMethod · 0.45

Tested by

no test coverage detected