disable update dialog

This commit is contained in:
Martin Marmsoler 2021-11-19 07:32:52 +01:00
parent 20686f8968
commit ec561e637c

View File

@ -75,23 +75,24 @@ Updater::Updater(QObject *parent)
connect(this, &Updater::updateAvailable,
[this](const QString &version, const QString &log, const QString &link) {
// Show the update dialog.
QVersionNumber appVersion =
QVersionNumber::fromString(QCoreApplication::applicationVersion());
QVersionNumber newVersion = QVersionNumber::fromString(version);
if (newVersion.majorVersion() > appVersion.majorVersion() ||
!Settings::instance()->value("update/download").toBool()) {
UpdateDialog *dialog = new UpdateDialog(version, log, link);
connect(dialog, &UpdateDialog::rejected, this, &Updater::updateCanceled);
dialog->show();
return;
}
// For now the update dialog is disabled.
// // Show the update dialog.
// QVersionNumber appVersion =
// QVersionNumber::fromString(QCoreApplication::applicationVersion());
// QVersionNumber newVersion = QVersionNumber::fromString(version);
// if (newVersion.majorVersion() > appVersion.majorVersion() ||
// !Settings::instance()->value("update/download").toBool()) {
// UpdateDialog *dialog = new UpdateDialog(version, log, link);
// connect(dialog, &UpdateDialog::rejected, this, &Updater::updateCanceled);
// dialog->show();
// return;
// }
// Skip the update dialog and just start downloading.
if (Updater::DownloadRef download = this->download(link)) {
DownloadDialog *dialog = new DownloadDialog(download);
dialog->show();
}
// // Skip the update dialog and just start downloading.
// if (Updater::DownloadRef download = this->download(link)) {
// DownloadDialog *dialog = new DownloadDialog(download);
// dialog->show();
// }
});
connect(this, &Updater::updateError,