From 9f4eae6536fd073ba139248c3003048bde698ea1 Mon Sep 17 00:00:00 2001 From: Henning Gruendl Date: Mon, 13 Feb 2023 14:20:44 +0100 Subject: [PATCH] QmlDesigner: Make application output the default Make the application output pane the default when the output dock widget is opened. Change-Id: I60079242078033310676df3c3c450ef83b8d67d1 Reviewed-by: Brook Cronin Reviewed-by: Reviewed-by: Thomas Hartmann --- src/plugins/qmldesigner/designmodewidget.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/plugins/qmldesigner/designmodewidget.cpp b/src/plugins/qmldesigner/designmodewidget.cpp index 09483d31040..21c8ac5b6aa 100644 --- a/src/plugins/qmldesigner/designmodewidget.cpp +++ b/src/plugins/qmldesigner/designmodewidget.cpp @@ -330,8 +330,19 @@ void DesignModeWidget::setup() command->setAttribute(Core::Command::CA_Hide); viewCommands.append(command); - connect(outputPanePlaceholder, &Core::OutputPanePlaceHolder::visibilityChangeRequested, - m_outputPaneDockWidget, &ADS::DockWidget::toggleView); + connect(command->action(), &QAction::triggered, this, [command]() { + if (!command->action()->isChecked()) + return; + + auto cmd = Core::ActionManager::command("QtCreator.Pane.ApplicationOutput"); + QTC_ASSERT(cmd, return); + cmd->action()->trigger(); + }); + + connect(outputPanePlaceholder, + &Core::OutputPanePlaceHolder::visibilityChangeRequested, + m_outputPaneDockWidget, + &ADS::DockWidget::toggleView); } std::sort(viewCommands.begin(), viewCommands.end(), [](Core::Command *first, Core::Command *second){