From bd0b1a5ac52d9c00acba92537297372534dcbb70 Mon Sep 17 00:00:00 2001 From: drbob Date: Fri, 25 Oct 2013 00:42:49 +0000 Subject: [PATCH] Updated SVN revision number for v0.5.5b. Moved #defines to code files for better encapsulation. Removed other references to #defines. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6877 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- libretroshare/src/plugins/pluginmanager.cc | 2 +- libretroshare/src/retroshare/rsplugin.h | 2 +- libretroshare/src/util/rsversion.cc | 10 ++++++++++ libretroshare/src/util/rsversion.h | 6 ++---- retroshare-gui/src/util/rsguiversion.cpp | 4 ++++ retroshare-gui/src/util/rsguiversion.h | 6 ------ 6 files changed, 18 insertions(+), 12 deletions(-) diff --git a/libretroshare/src/plugins/pluginmanager.cc b/libretroshare/src/plugins/pluginmanager.cc index 340c146bf..17573bdc6 100644 --- a/libretroshare/src/plugins/pluginmanager.cc +++ b/libretroshare/src/plugins/pluginmanager.cc @@ -306,7 +306,7 @@ bool RsPluginManager::loadPlugin(const std::string& plugin_name) std::cerr << " -> plugin revision number: " << pinfo.svn_revision << std::endl; std::cerr << " plugin API number : " << std::hex << pinfo.API_version << std::dec << std::endl; - std::cerr << " retroshare svn number: " << SVN_REVISION_NUMBER << std::endl; + std::cerr << " retroshare svn number: " << RsUtil::retroshareRevision() << std::endl; // Check that the plugin provides a svn revision number and a API number // diff --git a/libretroshare/src/retroshare/rsplugin.h b/libretroshare/src/retroshare/rsplugin.h index 41b87455f..4196ddf66 100644 --- a/libretroshare/src/retroshare/rsplugin.h +++ b/libretroshare/src/retroshare/rsplugin.h @@ -148,7 +148,7 @@ class RsPlugin // // All these items appear in the config->plugins tab, as a description of the plugin. // - uint32_t getSvnRevision() const { return SVN_REVISION_NUMBER ; } // This is read from libretroshare/util/rsversion.h + uint32_t getSvnRevision() const { return RsUtil::retroshareRevision(); } // This is read from libretroshare/util/rsversion.h virtual std::string getShortPluginDescription() const = 0 ; virtual std::string getPluginName() const = 0 ; diff --git a/libretroshare/src/util/rsversion.cc b/libretroshare/src/util/rsversion.cc index 68241313c..43031af27 100644 --- a/libretroshare/src/util/rsversion.cc +++ b/libretroshare/src/util/rsversion.cc @@ -7,8 +7,18 @@ #include "rsversion.h" +#define LIB_VERSION "0.5.5b" +#define SVN_REVISION "Revision 6877" +#define SVN_REVISION_NUMBER 6877 + std::string RsUtil::retroshareVersion() { return std::string(LIB_VERSION) + " " + std::string(SVN_REVISION); } + +uint32_t RsUtil::retroshareRevision() +{ + return SVN_REVISION_NUMBER; +} + diff --git a/libretroshare/src/util/rsversion.h b/libretroshare/src/util/rsversion.h index cb428234e..3cc331aca 100644 --- a/libretroshare/src/util/rsversion.h +++ b/libretroshare/src/util/rsversion.h @@ -6,13 +6,11 @@ */ #include - -#define LIB_VERSION "0.5.5b" -#define SVN_REVISION "Revision 6722" -#define SVN_REVISION_NUMBER 6722 +#include namespace RsUtil { + uint32_t retroshareRevision(); std::string retroshareVersion(); } diff --git a/retroshare-gui/src/util/rsguiversion.cpp b/retroshare-gui/src/util/rsguiversion.cpp index 7d6edbdf1..6334759f0 100644 --- a/retroshare-gui/src/util/rsguiversion.cpp +++ b/retroshare-gui/src/util/rsguiversion.cpp @@ -21,6 +21,10 @@ #include "rsguiversion.h" + +#define GUI_VERSION "0.5.5b" +#define GUI_REVISION "Revision: 6877" + QString retroshareVersion() { return QString(GUI_VERSION); } diff --git a/retroshare-gui/src/util/rsguiversion.h b/retroshare-gui/src/util/rsguiversion.h index f948f4b4c..7f8e67d52 100644 --- a/retroshare-gui/src/util/rsguiversion.h +++ b/retroshare-gui/src/util/rsguiversion.h @@ -19,12 +19,6 @@ * Boston, MA 02110-1301, USA. ****************************************************************/ - -#define GUI_VERSION "0.5.5b" - -#define GUI_REVISION "Revision: 6722" - - #include QString retroshareVersion();