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

Method eventuallyOpenProjectFile

kdevplatform/shell/projectcontroller.cpp:736–755  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

734}
735
736void 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
757void ProjectController::openProjectForUrlSlot(bool) {
758 if(ICore::self()->documentController()->activeDocument()) {

Callers

nothing calls this directly

Calls 5

stringValueMethod · 0.80
endsWithMethod · 0.80
PathClass · 0.70
toUrlMethod · 0.45
urlMethod · 0.45

Tested by

no test coverage detected