diff options
author | AndreyL ProductEngine <alihatskiy@productengine.com> | 2016-05-24 21:59:58 +0300 |
---|---|---|
committer | AndreyL ProductEngine <alihatskiy@productengine.com> | 2016-05-24 21:59:58 +0300 |
commit | 0318e3616702b19c088f4cd6138b768d45b7ef11 (patch) | |
tree | 10bd6bf23cce0dedc5040dedaaa450093a79a7d6 /indra | |
parent | 357f6d04edb354f12ae052f35c65cfd87ba4cb2d (diff) |
MAINT-6419 Simplified the version check + buildfix
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/app_settings/settings.xml | 2 | ||||
-rw-r--r-- | indra/newview/llappviewer.cpp | 25 | ||||
-rw-r--r-- | indra/newview/llappviewer.h | 2 |
3 files changed, 6 insertions, 23 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 7bcbf819e4..57a9db9337 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -13285,7 +13285,7 @@ <key>Type</key> <string>Boolean</string> <key>Value</key> - <string>1</string> + <integer>1</integer> </map> <key>UploadBakedTexOld</key> <map> diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 29680093f9..acbcb4f8b7 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -5807,29 +5807,10 @@ void LLAppViewer::launchUpdater() */ void LLAppViewer::showReleaseNotesIfRequired() { - if (!gLastRunVersion.empty() && gSavedSettings.getBOOL("UpdaterShowReleaseNotes")) + if (LLVersionInfo::getChannelAndVersion() != gLastRunVersion && gSavedSettings.getBOOL("UpdaterShowReleaseNotes")) { - try - { - boost::regex expr("(?<chan>[\\w\\s]+)\\s(?<maj>\\d+)\\.(?<min>\\d+)\\.(?<patch>\\d+)\\.(?<build>\\d+)", boost::regex::perl | boost::regex::icase); - boost::smatch matches; - if (boost::regex_search(gLastRunVersion, matches, expr)) - { - if (LLVersionInfo::getChannel() == matches["chan"] && // don't show Release Notes when changing a channel - (LLVersionInfo::getBuild() > std::stoi(matches["build"]) - || LLVersionInfo::getPatch() > std::stoi(matches["patch"]) - || LLVersionInfo::getMinor() > std::stoi(matches["min"]) - || LLVersionInfo::getMajor() > std::stoi(matches["maj"]))) - { - LLSD info(getViewerInfo()); - LLWeb::loadURLInternal(info["VIEWER_RELEASE_NOTES_URL"]); - } - } - } - catch (boost::regex_error& e) - { - LL_WARNS() << "Can't parse previous run version, regex errpr: " << e.what() << LL_ENDL; - } + LLSD info(getViewerInfo()); + LLWeb::loadURLInternal(info["VIEWER_RELEASE_NOTES_URL"]); } } diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h index b5e674bd7b..07bef11dbc 100644 --- a/indra/newview/llappviewer.h +++ b/indra/newview/llappviewer.h @@ -254,6 +254,8 @@ private: void sendLogoutRequest(); void disconnectViewer(); + + void showReleaseNotesIfRequired(); // *FIX: the app viewer class should be some sort of singleton, no? // Perhaps its child class is the singleton and this should be an abstract base. |