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

Function removeProjectBasePath

kdevplatform/project/projectmodel.cpp:33–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31{
32
33QStringList removeProjectBasePath( const QStringList& fullpath, KDevelop::ProjectBaseItem* item )
34{
35 QStringList result = fullpath;
36 if( item )
37 {
38 KDevelop::ProjectModel* model = KDevelop::ICore::self()->projectController()->projectModel();
39 QStringList basePath = model->pathFromIndex( model->indexFromItem( item ) );
40 if( basePath.count() >= fullpath.count() )
41 {
42 return QStringList();
43 }
44 return result.mid(basePath.count());
45 }
46 return result;
47}
48
49QStringList joinProjectBasePath( const QStringList& partialpath, KDevelop::ProjectBaseItem* item )
50{

Callers 2

pathFromIndexMethod · 0.85
setItemPathMethod · 0.85

Calls 7

QStringListClass · 0.85
projectControllerMethod · 0.80
indexFromItemMethod · 0.80
midMethod · 0.80
projectModelMethod · 0.45
pathFromIndexMethod · 0.45
countMethod · 0.45

Tested by

no test coverage detected