Skip to content
Snippets Groups Projects

Show ChangeLog

Merged Martin Straka requested to merge apk-show-changelog into develop
Viewing commit c3a0539b
Show latest version
1 file
+ 9
16
Preferences
Compare changes
+ 9
16
@@ -787,31 +787,24 @@ bool GlobalSettingsQmlWrapper::useIosDocumentPicker(void)
bool GlobalSettingsQmlWrapper::isNewVersion(void)
{
bool isNew = true;
QString dbVersion;
QString storedVersion;
if (GlobInstcs::prefsPtr != Q_NULLPTR) {
GlobInstcs::prefsPtr->strVal("app.version", dbVersion);
GlobInstcs::prefsPtr->strVal("application.notification_shown.last_version", storedVersion);
} else {
Q_ASSERT(0);
return false;
}
if (Q_UNLIKELY(dbVersion.isEmpty())) {
if (GlobInstcs::prefsPtr != Q_NULLPTR) {
GlobInstcs::prefsPtr->setStrVal("app.version", VERSION);
return isNew;
} else {
Q_ASSERT(0);
}
if (Q_UNLIKELY(storedVersion.isEmpty())) {
GlobInstcs::prefsPtr->setStrVal("application.notification_shown.last_version", VERSION);
return isNew;
}
isNew = AppVersionInfo::compareVersionStrings(VERSION, dbVersion) > 0;
isNew = (1 == AppVersionInfo::compareVersionStrings(VERSION, storedVersion));
if (isNew) {
if (GlobInstcs::prefsPtr != Q_NULLPTR) {
GlobInstcs::prefsPtr->setStrVal("app.version", VERSION);
return isNew;
} else {
Q_ASSERT(0);
}
GlobInstcs::prefsPtr->setStrVal("application.notification_shown.last_version", VERSION);
}
return isNew;