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

Method setPath

kdevplatform/project/projectmodel.cpp:449–464  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

447}
448
449void ProjectBaseItem::setPath( const Path& path)
450{
451 Q_D(ProjectBaseItem);
452
453 if (model() && !d->m_indexedPath.isEmpty()) {
454 model()->d_func()->pathLookupTable.remove(d->m_indexedPath, this);
455 }
456
457 d->m_path = path;
458 d->m_indexedPath = IndexedStringView{path.pathOrUrl()};
459 setText( path.lastPathSegment() );
460
461 if (model() && !d->m_indexedPath.isEmpty()) {
462 model()->d_func()->pathLookupTable.insert(d->m_indexedPath, this);
463 }
464}
465
466Qt::ItemFlags ProjectBaseItem::flags()
467{

Callers 4

renameMethod · 0.45
propagateRenameMethod · 0.45
testItemSanityMethod · 0.45
testProjectFileIconMethod · 0.45

Calls 10

modelFunction · 0.85
d_funcMethod · 0.80
pathOrUrlMethod · 0.80
lastPathSegmentMethod · 0.80
isEmptyMethod · 0.45
removeMethod · 0.45
insertMethod · 0.45
removeFromFileSetMethod · 0.45
addToFileSetMethod · 0.45
clearMethod · 0.45

Tested by 2

testItemSanityMethod · 0.36
testProjectFileIconMethod · 0.36