| 1091 | } |
| 1092 | |
| 1093 | IProject* ProjectController::findProjectForUrl( const QUrl& url ) const |
| 1094 | { |
| 1095 | Q_D(const ProjectController); |
| 1096 | |
| 1097 | if (d->m_projects.isEmpty()) { |
| 1098 | return nullptr; |
| 1099 | } |
| 1100 | |
| 1101 | const auto* const item = d->model->itemForPath(IndexedStringView{url}); |
| 1102 | if (item) { |
| 1103 | return item->project(); |
| 1104 | } |
| 1105 | return nullptr; |
| 1106 | } |
| 1107 | |
| 1108 | IProject* ProjectController::findProjectByName( const QString& name ) |
| 1109 | { |