Changeset - 73ac923cf254
[Not reviewed]
Hasan Yavuz Ă–ZDERYA - 8 years ago 2017-08-20 12:08:40
hy@ozderya.net
compile time option to notify user about package manager
1 file changed with 7 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/updatecheckdialog.cpp
Show inline comments
 
@@ -39,26 +39,33 @@ UpdateCheckDialog::UpdateCheckDialog(QWi
 

	
 
    connect(&updateChecker, &UpdateChecker::checkFinished,
 
            [this](bool found, QString newVersion, QString downloadUrl)
 
            {
 
                QString text;
 
                if (!found)
 
                {
 
                    text = "There is no update yet.";
 
                }
 
                else
 
                {
 
                    show();
 
#ifdef UPDATE_TYPE_PKGMAN
 
                    text = QString("There is a new version: %1. "
 
                                   "Use your package manager to update"
 
                                   " or click to <a href=\"%2\">download</a>.")\
 
                        .arg(newVersion).arg(downloadUrl);
 
#else
 
                    text = QString("Found update to version %1. Click to <a href=\"%2\">download</a>.")\
 
                        .arg(newVersion).arg(downloadUrl);
 
#endif
 
                }
 

	
 
                lastCheck = QDate::currentDate();
 
                ui->label->setText(text);
 
            });
 
}
 

	
 
UpdateCheckDialog::~UpdateCheckDialog()
 
{
 
    delete ui;
 
}
 

	
0 comments (0 inline, 0 general)