Changeset View
Changeset View
Standalone View
Standalone View
shell/core.cpp
Show All 40 Lines | |||||
41 | #include "documentationcontroller.h" | 41 | #include "documentationcontroller.h" | ||
42 | #include "sourceformattercontroller.h" | 42 | #include "sourceformattercontroller.h" | ||
43 | #include "progresswidget/progressmanager.h" | 43 | #include "progresswidget/progressmanager.h" | ||
44 | #include "selectioncontroller.h" | 44 | #include "selectioncontroller.h" | ||
45 | #include "debugcontroller.h" | 45 | #include "debugcontroller.h" | ||
46 | #include "kdevplatform_version.h" | 46 | #include "kdevplatform_version.h" | ||
47 | #include "workingsetcontroller.h" | 47 | #include "workingsetcontroller.h" | ||
48 | #include "testcontroller.h" | 48 | #include "testcontroller.h" | ||
49 | #include "runtimecontroller.h" | ||||
49 | #include "debug.h" | 50 | #include "debug.h" | ||
50 | 51 | | |||
51 | #include <KTextEditor/Document> | 52 | #include <KTextEditor/Document> | ||
52 | #include <ktexteditor/movinginterface.h> | 53 | #include <ktexteditor/movinginterface.h> | ||
53 | 54 | | |||
54 | #include <csignal> | 55 | #include <csignal> | ||
55 | 56 | | |||
56 | namespace { | 57 | namespace { | ||
▲ Show 20 Lines • Show All 148 Lines • ▼ Show 20 Line(s) | 205 | { | |||
205 | selectionController = new SelectionController(m_core); | 206 | selectionController = new SelectionController(m_core); | ||
206 | } | 207 | } | ||
207 | 208 | | |||
208 | if( !documentationController && !(mode & Core::NoUi) ) | 209 | if( !documentationController && !(mode & Core::NoUi) ) | ||
209 | { | 210 | { | ||
210 | documentationController = new DocumentationController(m_core); | 211 | documentationController = new DocumentationController(m_core); | ||
211 | } | 212 | } | ||
212 | 213 | | |||
214 | if( !runtimeController ) | ||||
215 | { | ||||
216 | runtimeController = new RuntimeController(m_core); | ||||
217 | } | ||||
218 | | ||||
213 | if( !debugController ) | 219 | if( !debugController ) | ||
214 | { | 220 | { | ||
215 | debugController = new DebugController(m_core); | 221 | debugController = new DebugController(m_core); | ||
216 | } | 222 | } | ||
217 | 223 | | |||
218 | if( !testController ) | 224 | if( !testController ) | ||
219 | { | 225 | { | ||
220 | testController = new TestController(m_core); | 226 | testController = new TestController(m_core); | ||
▲ Show 20 Lines • Show All 49 Lines • ▼ Show 20 Line(s) | |||||
270 | runController.data()->initialize(); | 276 | runController.data()->initialize(); | ||
271 | sourceFormatterController.data()->initialize(); | 277 | sourceFormatterController.data()->initialize(); | ||
272 | selectionController.data()->initialize(); | 278 | selectionController.data()->initialize(); | ||
273 | if (documentationController) { | 279 | if (documentationController) { | ||
274 | documentationController.data()->initialize(); | 280 | documentationController.data()->initialize(); | ||
275 | } | 281 | } | ||
276 | debugController.data()->initialize(); | 282 | debugController.data()->initialize(); | ||
277 | testController.data()->initialize(); | 283 | testController.data()->initialize(); | ||
284 | runtimeController.data()->initialize(); | ||||
278 | 285 | | |||
279 | installSignalHandler(); | 286 | installSignalHandler(); | ||
280 | 287 | | |||
281 | qCDebug(SHELL) << "Done initializing controllers"; | 288 | qCDebug(SHELL) << "Done initializing controllers"; | ||
282 | 289 | | |||
283 | return true; | 290 | return true; | ||
284 | } | 291 | } | ||
285 | CorePrivate::~CorePrivate() | 292 | CorePrivate::~CorePrivate() | ||
286 | { | 293 | { | ||
287 | delete selectionController.data(); | 294 | delete selectionController.data(); | ||
288 | delete projectController.data(); | 295 | delete projectController.data(); | ||
289 | delete languageController.data(); | 296 | delete languageController.data(); | ||
290 | delete pluginController.data(); | 297 | delete pluginController.data(); | ||
291 | delete uiController.data(); | 298 | delete uiController.data(); | ||
292 | delete partController.data(); | 299 | delete partController.data(); | ||
293 | delete documentController.data(); | 300 | delete documentController.data(); | ||
294 | delete runController.data(); | 301 | delete runController.data(); | ||
295 | delete sessionController.data(); | 302 | delete sessionController.data(); | ||
296 | delete sourceFormatterController.data(); | 303 | delete sourceFormatterController.data(); | ||
297 | delete documentationController.data(); | 304 | delete documentationController.data(); | ||
298 | delete debugController.data(); | 305 | delete debugController.data(); | ||
299 | delete workingSetController.data(); | 306 | delete workingSetController.data(); | ||
300 | delete testController.data(); | 307 | delete testController.data(); | ||
308 | delete runtimeController.data(); | ||||
301 | 309 | | |||
302 | selectionController.clear(); | 310 | selectionController.clear(); | ||
303 | projectController.clear(); | 311 | projectController.clear(); | ||
304 | languageController.clear(); | 312 | languageController.clear(); | ||
305 | pluginController.clear(); | 313 | pluginController.clear(); | ||
306 | uiController.clear(); | 314 | uiController.clear(); | ||
307 | partController.clear(); | 315 | partController.clear(); | ||
308 | documentController.clear(); | 316 | documentController.clear(); | ||
309 | runController.clear(); | 317 | runController.clear(); | ||
310 | sessionController.clear(); | 318 | sessionController.clear(); | ||
311 | sourceFormatterController.clear(); | 319 | sourceFormatterController.clear(); | ||
312 | documentationController.clear(); | 320 | documentationController.clear(); | ||
313 | debugController.clear(); | 321 | debugController.clear(); | ||
314 | workingSetController.clear(); | 322 | workingSetController.clear(); | ||
315 | testController.clear(); | 323 | testController.clear(); | ||
324 | runtimeController.clear(); | ||||
316 | } | 325 | } | ||
317 | 326 | | |||
318 | bool Core::initialize(QObject* splash, Setup mode, const QString& session ) | 327 | bool Core::initialize(QObject* splash, Setup mode, const QString& session ) | ||
319 | { | 328 | { | ||
320 | if (splash) { | 329 | if (splash) { | ||
321 | QTimer::singleShot( 200, splash, &QObject::deleteLater ); | 330 | QTimer::singleShot( 200, splash, &QObject::deleteLater ); | ||
322 | } | 331 | } | ||
323 | return initialize(mode, session); | 332 | return initialize(mode, session); | ||
▲ Show 20 Lines • Show All 223 Lines • ▼ Show 20 Line(s) | 555 | { | |||
547 | return d->documentationController.data(); | 556 | return d->documentationController.data(); | ||
548 | } | 557 | } | ||
549 | 558 | | |||
550 | DocumentationController* Core::documentationControllerInternal() | 559 | DocumentationController* Core::documentationControllerInternal() | ||
551 | { | 560 | { | ||
552 | return d->documentationController.data(); | 561 | return d->documentationController.data(); | ||
553 | } | 562 | } | ||
554 | 563 | | |||
564 | IRuntimeController* Core::runtimeController() | ||||
565 | { | ||||
566 | return d->runtimeController.data(); | ||||
567 | } | ||||
568 | | ||||
569 | RuntimeController* Core::runtimeControllerInternal() | ||||
570 | { | ||||
571 | return d->runtimeController.data(); | ||||
572 | } | ||||
573 | | ||||
555 | IDebugController* Core::debugController() | 574 | IDebugController* Core::debugController() | ||
556 | { | 575 | { | ||
557 | return d->debugController.data(); | 576 | return d->debugController.data(); | ||
558 | } | 577 | } | ||
559 | 578 | | |||
560 | DebugController* Core::debugControllerInternal() | 579 | DebugController* Core::debugControllerInternal() | ||
561 | { | 580 | { | ||
562 | return d->debugController.data(); | 581 | return d->debugController.data(); | ||
Show All 24 Lines |