File tree Expand file tree Collapse file tree 2 files changed +13
-7
lines changed Expand file tree Collapse file tree 2 files changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -208,9 +208,15 @@ void UpdateWalletDialog::gotReply()
208208 newVersionRevision = responseObject[strVerRev].toInt ();
209209 newVersionBuild = responseObject[strVerBuild].toInt ();
210210 newVersionRC = responseObject[strVerRC].toInt ();
211- if (lastMandatory[strVerMajor].toInt () <= CLIENT_VERSION_MAJOR && lastMandatory[strVerMinor].toInt () <= CLIENT_VERSION_MINOR && lastMandatory[strVerRev].toInt () <= CLIENT_VERSION_REVISION && lastMandatory[strVerBuild].toInt () <= CLIENT_VERSION_BUILD) {
211+ if (lastMandatory[strVerMajor].toInt () < CLIENT_VERSION_MAJOR || (lastMandatory[strVerMajor].toInt () == CLIENT_VERSION_MAJOR && lastMandatory[strVerMinor].toInt () < CLIENT_VERSION_MINOR) ||
212+ (lastMandatory[strVerMajor].toInt () == CLIENT_VERSION_MAJOR && lastMandatory[strVerMinor].toInt () == CLIENT_VERSION_MINOR && lastMandatory[strVerRev].toInt () < CLIENT_VERSION_REVISION) ||
213+ (lastMandatory[strVerMajor].toInt () == CLIENT_VERSION_MAJOR && lastMandatory[strVerMinor].toInt () == CLIENT_VERSION_MINOR && lastMandatory[strVerRev].toInt () == CLIENT_VERSION_REVISION &&
214+ lastMandatory[strVerBuild].toInt () <= CLIENT_VERSION_BUILD)) {
212215 mandatoryUpdate = responseObject[strMandatory].toBool ();
213- if (newVersionMajor <= CLIENT_VERSION_MAJOR && newVersionMinor <= CLIENT_VERSION_MINOR && newVersionRevision <= CLIENT_VERSION_REVISION && newVersionBuild <= CLIENT_VERSION_BUILD) {
216+ if (newVersionMajor < CLIENT_VERSION_MAJOR || (newVersionMajor == CLIENT_VERSION_MAJOR && newVersionMinor < CLIENT_VERSION_MINOR) ||
217+ (newVersionMajor == CLIENT_VERSION_MAJOR && newVersionMinor == CLIENT_VERSION_MINOR && newVersionRevision < CLIENT_VERSION_REVISION) ||
218+ (newVersionMajor == CLIENT_VERSION_MAJOR && newVersionMinor == CLIENT_VERSION_MINOR && newVersionRevision == CLIENT_VERSION_REVISION &&
219+ newVersionBuild <= CLIENT_VERSION_BUILD)) {
214220 outdated = false ;
215221 }
216222 }
Original file line number Diff line number Diff line change @@ -54,11 +54,11 @@ class UpdateWalletDialog : public QDialog
5454 QNetworkAccessManager *manager = nullptr ;
5555 QNetworkReply *reply = nullptr ;
5656 bool mandatoryUpdate = false ;
57- unsigned int newVersionMajor = 0 ;
58- unsigned int newVersionMinor = 0 ;
59- unsigned int newVersionRevision = 0 ;
60- unsigned int newVersionBuild = 0 ;
61- unsigned int newVersionRC = 0 ;
57+ int newVersionMajor = 0 ;
58+ int newVersionMinor = 0 ;
59+ int newVersionRevision = 0 ;
60+ int newVersionBuild = 0 ;
61+ int newVersionRC = 0 ;
6262
6363 void gotReply ();
6464 QString getUpdateString ();
You can’t perform that action at this time.
0 commit comments