| 734 | } |
| 735 | |
| 736 | void ProjectController::eventuallyOpenProjectFile(KIO::Job* _job, const KIO::UDSEntryList& entries) |
| 737 | { |
| 738 | Q_D(ProjectController); |
| 739 | |
| 740 | auto* job = qobject_cast<KIO::SimpleJob*>(_job); |
| 741 | Q_ASSERT(job); |
| 742 | for (const KIO::UDSEntry& entry : entries) { |
| 743 | if(d->m_foundProjectFile) |
| 744 | break; |
| 745 | if(!entry.isDir()) { |
| 746 | QString name = entry.stringValue( KIO::UDSEntry::UDS_NAME ); |
| 747 | |
| 748 | if(name.endsWith(QLatin1String(".kdev4"))) { |
| 749 | //We have found a project-file, open it |
| 750 | openProject(Path(Path(job->url()), name).toUrl()); |
| 751 | d->m_foundProjectFile = true; |
| 752 | } |
| 753 | } |
| 754 | } |
| 755 | } |
| 756 | |
| 757 | void ProjectController::openProjectForUrlSlot(bool) { |
| 758 | if(ICore::self()->documentController()->activeDocument()) { |
nothing calls this directly
no test coverage detected