[libcalamaresui] Display first 6, last 2 lines of long error messages, preserve newlines

main
Adriaan de Groot 6 years ago
parent c3d27be103
commit f3752e200a

@ -153,7 +153,10 @@ ViewManager::onInstallationFailed( const QString& message, const QString& detail
QString text = "<p>" + message + "</p>";
if ( !details.isEmpty() )
{
text += "<p>" + CalamaresUtils::truncateMultiLine( details, CalamaresUtils::LinesStartEnd { 8, 0 } ) + "</p>";
text += "<p>"
+ CalamaresUtils::truncateMultiLine( details, CalamaresUtils::LinesStartEnd { 6, 2 } )
.replace( '\n', QStringLiteral( "<br/>" ) )
+ "</p>";
}
if ( shouldOfferWebPaste )
{

Loading…
Cancel
Save