Fix update checker not working on macOS (#1642)

* Prevent update dialog from going off screen

Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
This commit is contained in:
Daniel
2020-05-10 07:13:47 -04:00
committed by GitHub
parent c5a7205d12
commit 680b500993
3 changed files with 19 additions and 7 deletions
+7 -5
View File
@@ -259,7 +259,7 @@ void Updates::checkForUpdates()
}
#if defined Q_OS_WIN || defined Q_OS_MACOS
/// Windows downloads an installer for the new version
/// Downloads an installer for the new version
QJsonValue updateExe_val = object.value("updateexe");
if (!updateExe_val.isString())
{
@@ -268,7 +268,8 @@ void Updates::checkForUpdates()
return Failure;
}
this->updateExe_ = updateExe_val.toString();
#endif
#ifdef Q_OS_WIN
/// Windows portable
QJsonValue portable_val = object.value("portable_download");
if (!portable_val.isString())
@@ -278,14 +279,15 @@ void Updates::checkForUpdates()
return Failure;
}
this->updatePortable_ = portable_val.toString();
#elif defined Q_OS_LINUX
#endif
#ifdef Q_OS_LINUX
QJsonValue updateGuide_val = object.value("updateguide");
if (updateGuide_val.isString())
{
this->updateGuideLink_ = updateGuide_val.toString();
}
#else
#endif
#if !defined(Q_OS_WIN) && !defined(Q_OS_MAC) && !defined(Q_OS_LINUX)
return Failure;
#endif