mirror of
https://github.com/tnodir/fort
synced 2024-11-15 08:25:20 +00:00
UI: OptionsPage: Fix new version visibility again 2.
This commit is contained in:
parent
40e0eaa51f
commit
c9408d9260
@ -6,7 +6,7 @@
|
|||||||
#include "../fortmanager.h"
|
#include "../fortmanager.h"
|
||||||
#include "taskupdatechecker.h"
|
#include "taskupdatechecker.h"
|
||||||
|
|
||||||
#define TASK_INFO_VERSION 1
|
#define TASK_INFO_VERSION 2
|
||||||
|
|
||||||
TaskInfoUpdateChecker::TaskInfoUpdateChecker(QObject *parent) :
|
TaskInfoUpdateChecker::TaskInfoUpdateChecker(QObject *parent) :
|
||||||
TaskInfo(UpdateChecker, parent)
|
TaskInfo(UpdateChecker, parent)
|
||||||
@ -29,6 +29,7 @@ QByteArray TaskInfoUpdateChecker::data() const
|
|||||||
|
|
||||||
stream
|
stream
|
||||||
<< infoVersion
|
<< infoVersion
|
||||||
|
<< APP_VERSION_STR
|
||||||
<< m_version
|
<< m_version
|
||||||
<< m_downloadUrl
|
<< m_downloadUrl
|
||||||
<< m_releaseText;
|
<< m_releaseText;
|
||||||
@ -47,7 +48,18 @@ void TaskInfoUpdateChecker::setData(const QByteArray &data)
|
|||||||
if (infoVersion > TASK_INFO_VERSION)
|
if (infoVersion > TASK_INFO_VERSION)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
// COMPAT: v3.1.0: Self version
|
||||||
|
if (infoVersion < 2)
|
||||||
|
return;
|
||||||
|
|
||||||
// Load data
|
// Load data
|
||||||
|
QString appVersion;
|
||||||
|
|
||||||
|
stream >> appVersion;
|
||||||
|
|
||||||
|
if (appVersion != APP_VERSION_STR)
|
||||||
|
return; // app upgraded
|
||||||
|
|
||||||
stream
|
stream
|
||||||
>> m_version
|
>> m_version
|
||||||
>> m_downloadUrl
|
>> m_downloadUrl
|
||||||
|
Loading…
Reference in New Issue
Block a user