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 <brook.cronin@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Henning Gruendl
2023-02-13 14:20:44 +01:00
committed by Henning Gründl
parent fbb79bb4e4
commit 9f4eae6536

View File

@@ -330,8 +330,19 @@ void DesignModeWidget::setup()
command->setAttribute(Core::Command::CA_Hide); command->setAttribute(Core::Command::CA_Hide);
viewCommands.append(command); viewCommands.append(command);
connect(outputPanePlaceholder, &Core::OutputPanePlaceHolder::visibilityChangeRequested, connect(command->action(), &QAction::triggered, this, [command]() {
m_outputPaneDockWidget, &ADS::DockWidget::toggleView); 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){ std::sort(viewCommands.begin(), viewCommands.end(), [](Core::Command *first, Core::Command *second){