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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user