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

Method initialize

kdevplatform/shell/projectcontroller.cpp:659–693  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

657}
658
659void ProjectController::initialize()
660{
661 Q_D(ProjectController);
662
663 d->buildset = new ProjectBuildSetModel( this );
664 buildSetModel()->loadFromSession( Core::self()->activeSession() );
665 connect( this, &ProjectController::projectOpened,
666 d->buildset, &ProjectBuildSetModel::loadFromProject );
667 connect( this, &ProjectController::projectClosing,
668 d->buildset, &ProjectBuildSetModel::saveToProject );
669 connect( this, &ProjectController::projectClosed,
670 d->buildset, &ProjectBuildSetModel::projectClosed );
671
672 loadSettings(false);
673 d->dialog = new ProjectDialogProvider(d);
674
675 QDBusConnection::sessionBus().registerObject( QStringLiteral("/org/kdevelop/ProjectController"),
676 this, QDBusConnection::ExportScriptableSlots );
677
678 KSharedConfigPtr config = Core::self()->activeSession()->config();
679 KConfigGroup group = config->group(QStringLiteral("General Options"));
680 const auto projects = group.readEntry( "Open Projects", QList<QUrl>() );
681
682 connect( Core::self()->selectionController(), &ISelectionController::selectionChanged,
683 this, [this]() { Q_D(ProjectController); d->updateActionStates(); } );
684 connect(this, &ProjectController::projectOpened,
685 this, [this]() { Q_D(ProjectController); d->updateActionStates(); });
686 connect(this, &ProjectController::projectClosing,
687 this, [this]() { Q_D(ProjectController); d->updateActionStates(); });
688
689 QTimer::singleShot(0, this, [this, projects](){
690 openProjects(projects);
691 emit initialized();
692 });
693}
694
695void ProjectController::openProjects(const QList<QUrl>& projects)
696{

Callers

nothing calls this directly

Calls 6

loadFromSessionMethod · 0.80
readEntryMethod · 0.80
selectionControllerMethod · 0.80
updateActionStatesMethod · 0.80
activeSessionMethod · 0.45
configMethod · 0.45

Tested by

no test coverage detected