From f3752e200ad299f7021b40d3e615cb056bc5a534 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Tue, 2 Feb 2021 16:40:01 +0100 Subject: [PATCH] [libcalamaresui] Display first 6, last 2 lines of long error messages, preserve newlines --- src/libcalamaresui/ViewManager.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/libcalamaresui/ViewManager.cpp b/src/libcalamaresui/ViewManager.cpp index 39f0bb902..d25b7cdee 100644 --- a/src/libcalamaresui/ViewManager.cpp +++ b/src/libcalamaresui/ViewManager.cpp @@ -153,7 +153,10 @@ ViewManager::onInstallationFailed( const QString& message, const QString& detail QString text = "

" + message + "

"; if ( !details.isEmpty() ) { - text += "

" + CalamaresUtils::truncateMultiLine( details, CalamaresUtils::LinesStartEnd { 8, 0 } ) + "

"; + text += "

" + + CalamaresUtils::truncateMultiLine( details, CalamaresUtils::LinesStartEnd { 6, 2 } ) + .replace( '\n', QStringLiteral( "
" ) ) + + "

"; } if ( shouldOfferWebPaste ) {