From c54e417ff358da5ef81f0d8ec9dbe9ca654de0f4 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Fri, 19 Mar 2021 13:38:06 +0100 Subject: [PATCH] [calamares] Add a 'send log' button to the debug window FIXES #1660 --- src/calamares/DebugWindow.cpp | 5 +++++ src/calamares/DebugWindow.ui | 9 ++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/calamares/DebugWindow.cpp b/src/calamares/DebugWindow.cpp index 45e28878c..fa8a31647 100644 --- a/src/calamares/DebugWindow.cpp +++ b/src/calamares/DebugWindow.cpp @@ -20,6 +20,7 @@ #include "modulesystem/Module.h" #include "modulesystem/ModuleManager.h" #include "utils/Logger.h" +#include "utils/Paste.h" #include "utils/Retranslator.h" #ifdef WITH_PYTHONQT @@ -213,6 +214,10 @@ DebugWindow::DebugWindow() } } ); + // Send Log button only if it would be useful + m_ui->sendLogButton->setVisible( CalamaresUtils::Paste::isEnabled() ); + connect( m_ui->sendLogButton, &QPushButton::clicked, [this]() { CalamaresUtils::Paste::doLogUpload( this ); } ); + CALAMARES_RETRANSLATE( m_ui->retranslateUi( this ); setWindowTitle( tr( "Debug information" ) ); ); } diff --git a/src/calamares/DebugWindow.ui b/src/calamares/DebugWindow.ui index 014d4837e..ad9234c0f 100644 --- a/src/calamares/DebugWindow.ui +++ b/src/calamares/DebugWindow.ui @@ -21,7 +21,7 @@ SPDX-License-Identifier: GPL-3.0-or-later - 2 + 3 @@ -118,6 +118,13 @@ SPDX-License-Identifier: GPL-3.0-or-later + + + + Send Session Log + + +