Commit 93eea1cb authored by Francois Cartegnie's avatar Francois Cartegnie

Qt: UpdateDialog: highlight security changes

parent 631c8363
...@@ -249,7 +249,16 @@ void UpdateDialog::updateNotify( bool b_result ) ...@@ -249,7 +249,16 @@ void UpdateDialog::updateNotify( bool b_result )
.arg( p_release->i_extra == 0 ? "" : "." + QString::number( p_release->i_extra ) ); .arg( p_release->i_extra == 0 ? "" : "." + QString::number( p_release->i_extra ) );
ui.updateNotifyLabel->setText( message ); ui.updateNotifyLabel->setText( message );
ui.updateNotifyTextEdit->setText( qfu( p_release->psz_desc ) ); message = qfu( p_release->psz_desc ).replace( "\n", "<br/>" );
/* Try to highlight releases featuring security changes */
int i_index = message.indexOf( "security", Qt::CaseInsensitive );
if ( i_index >= 0 )
{
message.insert( i_index + 8, "</font>" );
message.insert( i_index, "<font style=\"color:red\">" );
}
ui.updateNotifyTextEdit->setHtml( message );
/* Force the dialog to be shown */ /* Force the dialog to be shown */
this->show(); this->show();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment