Win32: Do not silent-update if the application is already up-to-date

Fixes #3368
This commit is contained in:
Daniel Molkentin 2015-07-16 17:26:53 +02:00
parent 770ca77673
commit 724c0c2953

View file

@ -50,7 +50,8 @@ bool OCUpdater::performUpdate()
ConfigFile cfg; ConfigFile cfg;
QSettings settings(cfg.configFile(), QSettings::IniFormat); QSettings settings(cfg.configFile(), QSettings::IniFormat);
QString updateFile = settings.value(updateAvailableC).toString(); QString updateFile = settings.value(updateAvailableC).toString();
if (!updateFile.isEmpty() && QFile(updateFile).exists()) { if (!updateFile.isEmpty() && QFile(updateFile).exists()
&& !updateSucceeded() /* Someone might have run the updater manually between restarts */ ) {
const QString name = Theme::instance()->appNameGUI(); const QString name = Theme::instance()->appNameGUI();
if (QMessageBox::information(0, tr("New %1 Update Ready").arg(name), if (QMessageBox::information(0, tr("New %1 Update Ready").arg(name),
tr("A new update for %1 is about to be installed. The updater may ask\n" tr("A new update for %1 is about to be installed. The updater may ask\n"