diff options
| author | Lynx Linden <lynx@lindenlab.com> | 2009-12-07 20:05:52 +0000 |
|---|---|---|
| committer | Lynx Linden <lynx@lindenlab.com> | 2009-12-07 20:05:52 +0000 |
| commit | de2f8212f0c8a42d02e636ecd0744d3ddfd0dce9 (patch) | |
| tree | af6922e5ee3d022317924d35f60c6f4ea436d75a /indra/newview/llviewerhelputil.cpp | |
| parent | 37c7e4059cab2a7152e730ca5d68530f14f8f51e (diff) | |
DEV-43439: Added calls to query the viewer version.
Rather than copy/paste the same version string formatting pattern
again, I added new string-based version routines:
/// return the full viewer version as a string like "2.0.0.200030"
const std::string &llGetViewerVersion();
/// return the viewer version as a string like "2.0.0"
const std::string &llGetViewerShortVersion();
/// return the viewer build version as a string, e.g., "200130"
const std::string &llGetViewerBuildVersion();
Diffstat (limited to 'indra/newview/llviewerhelputil.cpp')
| -rw-r--r-- | indra/newview/llviewerhelputil.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/indra/newview/llviewerhelputil.cpp b/indra/newview/llviewerhelputil.cpp index c1555eacdc..2d98765175 100644 --- a/indra/newview/llviewerhelputil.cpp +++ b/indra/newview/llviewerhelputil.cpp @@ -34,6 +34,7 @@ #include "llviewerprecompiledheaders.h" #include "llversionviewer.h" +#include "llviewerbuild.h" //#include "llfloaterhelpbrowser.h" //#include "llfloaterreg.h" @@ -86,14 +87,7 @@ std::string LLViewerHelpUtil::buildHelpURL( const std::string &topic, substitution["CHANNEL"] = helpURLEncode(savedSettings.getString("VersionChannelName")); - // *TODO: We should put this version pattern in a central place; this and near - // equivalents are replicated in other code - what's a good location? - std::ostringstream version; - version << LL_VERSION_MAJOR << "." - << LL_VERSION_MINOR << "." - << LL_VERSION_PATCH << "." - << LL_VERSION_BUILD; - substitution["VERSION"] = helpURLEncode(version.str()); + substitution["VERSION"] = helpURLEncode(llGetViewerVersion()); substitution["VERSION_MAJOR"] = buildHelpVersion(LL_VERSION_MAJOR); substitution["VERSION_MINOR"] = buildHelpVersion(LL_VERSION_MINOR); substitution["VERSION_PATCH"] = buildHelpVersion(LL_VERSION_PATCH); |
