| 447 | } |
| 448 | |
| 449 | void 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 | |
| 466 | Qt::ItemFlags ProjectBaseItem::flags() |
| 467 | { |