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

Method initialize

kdevplatform/shell/core.cpp:156–336  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

154}
155
156bool CorePrivate::initialize(Core::Setup mode, const QString& session )
157{
158 m_mode=mode;
159
160 qCDebug(SHELL) << "Creating controllers";
161
162 if( !sessionController )
163 {
164 sessionController = new SessionController(m_core);
165 }
166 if( !workingSetController && !(mode & Core::NoUi) )
167 {
168 workingSetController = new WorkingSetController();
169 }
170 qCDebug(SHELL) << "Creating ui controller";
171 if( !uiController )
172 {
173 uiController = new UiController(m_core);
174 }
175 qCDebug(SHELL) << "Creating plugin controller";
176
177 if( !pluginController )
178 {
179 pluginController = new PluginController(m_core);
180 const auto pluginInfos = pluginController->allPluginInfos();
181 if (pluginInfos.isEmpty()) {
182 const auto errorMessage = i18n(
183 "<p>Could not find any plugins during startup.<br/>"
184 "Please make sure QT_PLUGIN_PATH is set correctly.</p>"
185 "Refer to <a href="
186 "\"https://community.kde.org/Guidelines_and_HOWTOs/Build_from_source#Set_up_the_runtime_environment\""
187 ">this article</a> for more information.");
188 if (mode & Core::NoUi) {
189 qCCritical(SHELL) << errorMessage;
190 } else {
191 QMessageBox::critical(nullptr, i18nc("@title:window", "No Plugins Found"), errorMessage,
192 QMessageBox::Abort, QMessageBox::Abort);
193 }
194 qCWarning(SHELL) << "Could not find any plugins, aborting";
195 return false;
196 }
197 }
198 if( !partController && !(mode & Core::NoUi))
199 {
200 partController = new PartController(m_core, uiController->defaultMainWindow());
201 }
202
203 if( !projectController )
204 {
205 projectController = new ProjectController(m_core);
206 }
207
208 if( !documentController )
209 {
210 documentController = new DocumentController(m_core);
211 }
212
213 if( !languageController )

Callers 5

initMethod · 0.45
temporaryMethod · 0.45
initTestCaseMethod · 0.45
initMethod · 0.45
initMethod · 0.45

Calls 14

initializeFunction · 0.85
installSignalHandlerFunction · 0.85
allPluginInfosMethod · 0.80
defaultMainWindowMethod · 0.80
backgroundParserMethod · 0.80
loadAllAreasMethod · 0.80
showMethod · 0.80
isEmptyMethod · 0.45
activeSessionLockMethod · 0.45
activeSessionMethod · 0.45
suspendMethod · 0.45

Tested by 5

initMethod · 0.36
temporaryMethod · 0.36
initTestCaseMethod · 0.36
initMethod · 0.36
initMethod · 0.36