vlc_linux/vlc-3.0.16/modules/gui/qt/dialogs/help.cpp
/* Notify the end of the update_Check */
Notify the end of the update_Check
Notify the end of the update_Check
void UpdateDialog::updateNotify( bool b_result )
{
    if( b_result )
    {
        if( update_NeedUpgrade( p_update ) )
        {
            ui.stackedWidget->setCurrentWidget( ui.updateNotifyPage );
            update_release_t *p_release = update_GetRelease( p_update );
            assert( p_release );
            b_checked = true;
            QString message = QString(
                    qtr( "A new version of VLC (%1.%2.%3%4) is available." ) )
                .arg( QString::number( p_release->i_major ) )
                .arg( QString::number( p_release->i_minor ) )
                .arg( QString::number( p_release->i_revision ) )
                .arg( p_release->i_extra == 0 ? "" : "." + QString::number( p_release->i_extra ) );
            ui.updateNotifyLabel->setText( message );
            message = qfu( p_release->psz_desc ).replace( "\n", "<br/>" );
            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 );
            this->show();
        }
        else
        {
            ui.stackedWidget->setCurrentWidget( ui.updateDialogPage );
            ui.updateDialogLabel->setText(
                    qtr( "You have the latest version of VLC media player." ) );
        }
    }
    else
    {
        ui.stackedWidget->setCurrentWidget( ui.updateDialogPage );
        ui.updateDialogLabel->setText(
                    qtr( "An error occurred while checking for updates..." ) );
    }
}
void UpdateDialog :: updateNotify ( bool b_result ) { if ( b_result ) { if ( update_NeedUpgrade ( p_update ) ) { ui . stackedWidget -> setCurrentWidget ( ui . updateNotifyPage ) ; update_release_t * p_release = update_GetRelease ( p_update ) ; assert ( p_release ) ; b_checked = true ; QString message = QString ( qtr ( " " ) ) . arg ( QString :: number ( p_release -> i_major ) ) . arg ( QString :: number ( p_release -> i_minor ) ) . arg ( QString :: number ( p_release -> i_revision ) ) . arg ( p_release -> i_extra == 0 ? " " : " " + QString :: number ( p_release -> i_extra ) ) ; ui . updateNotifyLabel -> setText ( message ) ; message = qfu ( p_release -> psz_desc ) . replace ( " \n " , " " ) ; int i_index = message . indexOf ( " " , Qt :: CaseInsensitive ) ; if ( i_index >= 0 ) { message . insert ( i_index + 8 , " " ) ; message . insert ( i_index , " \" \" " ) ; } ui . updateNotifyTextEdit -> setHtml ( message ) ; this -> show ( ) ; } else { ui . stackedWidget -> setCurrentWidget ( ui . updateDialogPage ) ; ui . updateDialogLabel -> setText ( qtr ( " " ) ) ; } } else { ui . stackedWidget -> setCurrentWidget ( ui . updateDialogPage ) ; ui . updateDialogLabel -> setText ( qtr ( " " ) ) ; } }
Notify the end of the update_Check
Notify the end of the update_Check
/* The update finish without errors */ /* Try to highlight releases featuring security changes */ /* Force the dialog to be shown */