From 93eea1cb6b03e76080a317aa531dea7cbdf563a0 Mon Sep 17 00:00:00 2001 From: Francois Cartegnie Date: Tue, 26 Mar 2013 17:26:23 +0100 Subject: [PATCH] Qt: UpdateDialog: highlight security changes --- modules/gui/qt4/dialogs/help.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/modules/gui/qt4/dialogs/help.cpp b/modules/gui/qt4/dialogs/help.cpp index fb6fb8d36f..31187b7ec8 100644 --- a/modules/gui/qt4/dialogs/help.cpp +++ b/modules/gui/qt4/dialogs/help.cpp @@ -249,7 +249,16 @@ void UpdateDialog::updateNotify( bool b_result ) .arg( p_release->i_extra == 0 ? "" : "." + QString::number( p_release->i_extra ) ); ui.updateNotifyLabel->setText( message ); - ui.updateNotifyTextEdit->setText( qfu( p_release->psz_desc ) ); + message = qfu( p_release->psz_desc ).replace( "\n", "
" ); + + /* Try to highlight releases featuring security changes */ + int i_index = message.indexOf( "security", Qt::CaseInsensitive ); + if ( i_index >= 0 ) + { + message.insert( i_index + 8, "" ); + message.insert( i_index, "" ); + } + ui.updateNotifyTextEdit->setHtml( message ); /* Force the dialog to be shown */ this->show(); -- 2.39.5