| 362 | } |
| 363 | |
| 364 | void UiController::addToolView(const QString & name, IToolViewFactory *factory, FindFlags state) |
| 365 | { |
| 366 | Q_D(UiController); |
| 367 | |
| 368 | if (!factory) |
| 369 | return; |
| 370 | |
| 371 | auto *doc = new Sublime::ToolDocument(name, this, new UiToolViewFactory(factory)); |
| 372 | d->factoryDocuments[factory] = doc; |
| 373 | |
| 374 | qCDebug(SHELL) << "UiController added tool view" << doc->documentSpecifier(); |
| 375 | |
| 376 | /* Until areas are restored, we don't know which views should be really |
| 377 | added, and which not, so we just record view availability. */ |
| 378 | if (d->areasRestored && state != None) { |
| 379 | const auto areas = allAreas(); |
| 380 | for (Sublime::Area* area : areas) { |
| 381 | addToolViewToArea(factory, doc, area); |
| 382 | } |
| 383 | } |
| 384 | } |
| 385 | |
| 386 | void KDevelop::UiController::raiseToolView(Sublime::View * view) |
| 387 | { |
no test coverage detected