summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2019-05-31 16:44:58 -0400
committerNat Goodspeed <nat@lindenlab.com>2020-03-25 16:05:09 -0400
commit15418f991a77416e765e985c39267bb6d4c51a6f (patch)
treeb78ab4a2fe6c256791ea8f5c94d4e88f3d64c981 /indra
parent7fbbd4b766a86c3b8d0d0ed3b9e2ebf3fd27a889 (diff)
SL-11216: getViewerInfo() calls LLVersionInfo::getReleaseNotes().
Make LLAppViewer retrieve release notes from LLVersionInfo, rather than synthesizing the release-notes URL itself based on the viewer version string.
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llappviewer.cpp22
1 files changed, 7 insertions, 15 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 795d14740a..ef4500c01f 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -3061,16 +3061,12 @@ LLSD LLAppViewer::getViewerInfo() const
// is available to a getInfo() caller as to the user opening
// LLFloaterAbout.
LLSD info;
- LLSD version;
- version.append(LLVersionInfo::instance().getMajor());
- version.append(LLVersionInfo::instance().getMinor());
- version.append(LLVersionInfo::instance().getPatch());
- version.append(LLVersionInfo::instance().getBuild());
- info["VIEWER_VERSION"] = version;
- info["VIEWER_VERSION_STR"] = LLVersionInfo::instance().getVersion();
- info["CHANNEL"] = LLVersionInfo::instance().getChannel();
+ auto& versionInfo{ LLVersionInfo::instance() };
+ info["VIEWER_VERSION"] = LLSDArray(versionInfo.getMajor())(versionInfo.getMinor())(versionInfo.getPatch())(versionInfo.getBuild());
+ info["VIEWER_VERSION_STR"] = versionInfo.getVersion();
+ info["CHANNEL"] = versionInfo.getChannel();
info["ADDRESS_SIZE"] = ADDRESS_SIZE;
- std::string build_config = LLVersionInfo::instance().getBuildConfig();
+ std::string build_config = versionInfo.getBuildConfig();
if (build_config != "Release")
{
info["BUILD_CONFIG"] = build_config;
@@ -3078,12 +3074,8 @@ LLSD LLAppViewer::getViewerInfo() const
// return a URL to the release notes for this viewer, such as:
// https://releasenotes.secondlife.com/viewer/2.1.0.123456.html
- std::string url = LLTrans::getString("RELEASE_NOTES_BASE_URL");
- if (! LLStringUtil::endsWith(url, "/"))
- url += "/";
- url += LLURI::escape(LLVersionInfo::instance().getVersion()) + ".html";
-
- info["VIEWER_RELEASE_NOTES_URL"] = url;
+ std::string url = versionInfo.getReleaseNotes();
+ info["VIEWER_RELEASE_NOTES_URL"] = url.empty()? LLTrans::getString("RetrievingData") : url;
// Position
LLViewerRegion* region = gAgent.getRegion();