| 31 | { |
| 32 | |
| 33 | QStringList 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 | |
| 49 | QStringList joinProjectBasePath( const QStringList& partialpath, KDevelop::ProjectBaseItem* item ) |
| 50 | { |
no test coverage detected