do not display message that no update is avvailable if the check was done in the background
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
parent
5928bc30e1
commit
2c02d02214
@ -85,6 +85,11 @@ PrismExternalUpdater::~PrismExternalUpdater()
|
||||
}
|
||||
|
||||
void PrismExternalUpdater::checkForUpdates()
|
||||
{
|
||||
checkForUpdates(true);
|
||||
}
|
||||
|
||||
void PrismExternalUpdater::checkForUpdates(bool triggeredByUser)
|
||||
{
|
||||
QProgressDialog progress(tr("Checking for updates..."), "", 0, 0, priv->parent);
|
||||
progress.setCancelButton(nullptr);
|
||||
@ -160,7 +165,7 @@ void PrismExternalUpdater::checkForUpdates()
|
||||
switch (exit_code) {
|
||||
case 0:
|
||||
// no update available
|
||||
{
|
||||
if (triggeredByUser) {
|
||||
qDebug() << "No update available";
|
||||
auto msgBox = QMessageBox(QMessageBox::Information, tr("No Update Available"), tr("You are running the latest version."),
|
||||
QMessageBox::Ok, priv->parent);
|
||||
@ -288,7 +293,7 @@ void PrismExternalUpdater::disconnectTimer()
|
||||
void PrismExternalUpdater::autoCheckTimerFired()
|
||||
{
|
||||
qDebug() << "Auto update Timer fired";
|
||||
checkForUpdates();
|
||||
checkForUpdates(false);
|
||||
}
|
||||
|
||||
void PrismExternalUpdater::offerUpdate(const QString& version_name, const QString& version_tag, const QString& release_notes)
|
||||
|
@ -41,6 +41,7 @@ class PrismExternalUpdater : public ExternalUpdater {
|
||||
* Check for updates manually, showing the user a progress bar and an alert if no updates are found.
|
||||
*/
|
||||
void checkForUpdates() override;
|
||||
void checkForUpdates(bool triggeredByUser);
|
||||
|
||||
/*!
|
||||
* Indicates whether or not to check for updates automatically.
|
||||
|
Loading…
Reference in New Issue
Block a user