Skip to content

Commit 9eeb6d1

Browse files
author
Alexis López Zubieta
committed
Don't open release url if a download url was found.
1 parent d8ab6c9 commit 9eeb6d1

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

src/QSimpleUpdater/src/Updater.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -442,15 +442,14 @@ void Updater::setUpdateAvailable (const bool available)
442442
box.setDefaultButton (QMessageBox::Yes);
443443

444444
if (box.exec() == QMessageBox::Yes) {
445-
if (!openUrl().isEmpty())
445+
if (downloadUrl().isEmpty())
446446
QDesktopServices::openUrl (QUrl (openUrl()));
447447

448-
else if (downloaderEnabled()) {
448+
if (downloaderEnabled()) {
449449
m_downloader->setUrlId (url());
450450
m_downloader->setFileName (downloadUrl().split ("/").last());
451451
m_downloader->startDownload (QUrl (downloadUrl()));
452452
}
453-
454453
else
455454
QDesktopServices::openUrl (QUrl (downloadUrl()));
456455
}

0 commit comments

Comments
 (0)