| 45 | } |
| 46 | |
| 47 | ToolViewFactoryHolder::~ToolViewFactoryHolder() |
| 48 | { |
| 49 | auto* const core = KDevelop::ICore::self(); |
| 50 | if (!core || core->shuttingDown()) { |
| 51 | // NOTE: cannot print plugin() because it may return a dangling pointer if the factories are already destroyed. |
| 52 | qCDebug(DEBUGGERGDB) << "not unregistering GDB tool views, because KDevelop is exiting"; |
| 53 | return; |
| 54 | } |
| 55 | qCDebug(DEBUGGERGDB) << "unregistering GDB tool views for" << plugin(); |
| 56 | auto* const uiController = core->uiController(); |
| 57 | |
| 58 | uiController->removeToolView(m_disassembleFactory); |
| 59 | uiController->removeToolView(m_gdbOutputFactory); |
| 60 | #ifdef KDEV_WITH_MEMVIEW |
| 61 | uiController->removeToolView(m_memoryViewerFactory); |
| 62 | #endif |
| 63 | } |
| 64 | |
| 65 | const KDevMI::MIDebuggerPlugin* ToolViewFactoryHolder::plugin() const |
| 66 | { |
nothing calls this directly
no test coverage detected