Debugger: Fix automatic raising of Expressions

When adding a new expression automatically raise the
Expressions widget if it is not shown already.

Change-Id: If89e4e4fbf8cbe57e0f08478cd2d3b9f4797f5ad
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Christian Stenger
2019-09-26 14:37:54 +02:00
parent 38292de68a
commit 716ec39ae0

View File

@@ -2260,8 +2260,8 @@ void DebuggerEngine::openDisassemblerView(const Location &location)
void DebuggerEngine::raiseWatchersWindow() void DebuggerEngine::raiseWatchersWindow()
{ {
if (d->m_watchersView) { if (d->m_watchersView && d->m_watchersWindow) {
if (auto dock = qobject_cast<QDockWidget *>(d->m_watchersView->parentWidget())) { if (auto dock = qobject_cast<QDockWidget *>(d->m_watchersWindow->parentWidget())) {
if (QAction *act = dock->toggleViewAction()) { if (QAction *act = dock->toggleViewAction()) {
if (!act->isChecked()) if (!act->isChecked())
QTimer::singleShot(1, act, [act] { act->trigger(); }); QTimer::singleShot(1, act, [act] { act->trigger(); });