fix updater with changes in release name (#4666)

* fix updater with changes in release name

* clangify
This commit is contained in:
ebbit1q 2022-10-17 22:42:08 +02:00 committed by GitHub
parent c8a2fd78b0
commit 3f78235a74
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -62,9 +62,14 @@ bool ReleaseChannel::downloadMatchesCurrentOS(const QString &fileName)
bool ReleaseChannel::downloadMatchesCurrentOS(const QString &fileName) bool ReleaseChannel::downloadMatchesCurrentOS(const QString &fileName)
{ {
#if Q_PROCESSOR_WORDSIZE == 4 #if Q_PROCESSOR_WORDSIZE == 4
return fileName.contains("win32"); return fileName.contains("32bit");
#elif Q_PROCESSOR_WORDSIZE == 8 #elif Q_PROCESSOR_WORDSIZE == 8
return fileName.contains("win64"); const QString &version = QSysInfo::productVersion();
if (version.startsWith("7") || version.startsWith("8")) {
return fileName.contains("Win7");
} else {
return fileName.contains("Win10");
}
#else #else
return false; return false;
#endif #endif