Debugger: Start introducing dynamic perspectives

Make perspectives and tool bars destroyable. This is a
step forward to multiply debugger engines whose perspective's
life time is connected to the engine, not the debug mode.

In the present setup there are two kind of perspective:
1 - static: with a lifetime associated to the application
(or, rather, plugin that defines them). These are listed
in the perspective chooser, later e.g. Debugger for
pre-set breakpoints
2 - dynamic: with a shorted lifetime, e.g. running GDB engine.

Presently, and possibly also in future so, a dynamic
perspective is related to exactly one of the static
perspectives, i.e. are kind of "child".

Change-Id: Ic11572e7121e14f8da2927a0c0ac3441c99073a3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
hjk
2018-07-24 14:28:31 +02:00
parent 9c688e8f9e
commit be89452602
4 changed files with 63 additions and 3 deletions

View File

@@ -3494,6 +3494,11 @@ void registerToolbar(const QByteArray &perspectiveId, const ToolbarDescription &
dd->m_mainWindow->registerToolbar(perspectiveId, toolbar);
}
void destroyDynamicToolbar(const QByteArray &perspectiveId)
{
dd->m_mainWindow->destroyDynamicToolbar(perspectiveId);
}
QAction *createStartAction()
{
auto action = new QAction(DebuggerMainWindow::tr("Start"), DebuggerPlugin::instance());
@@ -3515,6 +3520,11 @@ void registerPerspective(const QByteArray &perspectiveId, const Perspective *per
dd->m_mainWindow->registerPerspective(perspectiveId, perspective);
}
void destroyDynamicPerspective(const QByteArray &perspectiveId)
{
dd->m_mainWindow->destroyDynamicPerspective(perspectiveId);
}
void setPerspectiveEnabled(const QByteArray &perspectiveId, bool enabled)
{
dd->m_mainWindow->setPerspectiveEnabled(perspectiveId, enabled);