diff --git a/code/nel/include/nel/gui/group_html.h b/code/nel/include/nel/gui/group_html.h index 392644abb..74c5a0145 100644 --- a/code/nel/include/nel/gui/group_html.h +++ b/code/nel/include/nel/gui/group_html.h @@ -215,7 +215,7 @@ namespace NLGUI // Browser home std::string Home; // Get Home URL - virtual std::string home(); + virtual std::string home() const; // Undo browse: Browse the precedent url browsed. no op if none void browseUndo (); diff --git a/code/nel/include/nel/gui/group_tree.h b/code/nel/include/nel/gui/group_tree.h index 3d3a2d6fd..266e7e23f 100644 --- a/code/nel/include/nel/gui/group_tree.h +++ b/code/nel/include/nel/gui/group_tree.h @@ -181,7 +181,7 @@ namespace NLGUI REFLECT_STRING("AHParamsClose", getAHParamsClose, setAHParamsClose); REFLECT_BOOL("Opened", getOpened, setOpened); REFLECT_BOOL("Show", getShow, setShow); - REFLECT_UCSTRING("Text", getText, setText); + REFLECT_UCSTRING_REF("Text", getText, setText); // lua REFLECT_LUA_METHOD("getNumChildren", luaGetNumChildren); REFLECT_LUA_METHOD("getChild", luaGetChild); diff --git a/code/nel/include/nel/gui/interface_element.h b/code/nel/include/nel/gui/interface_element.h index dbe1ba37e..47025f155 100644 --- a/code/nel/include/nel/gui/interface_element.h +++ b/code/nel/include/nel/gui/interface_element.h @@ -365,10 +365,6 @@ namespace NLGUI void setModulateGlobalColor(bool state) {_ModulateGlobalColor= state;} bool getModulateGlobalColor() const {return _ModulateGlobalColor;} - - void dummySet(sint32 value); - void dummySet(const std::string &value); - // lua methods int luaUpdateCoords(CLuaState &ls); int luaInvalidateCoords(CLuaState &ls); @@ -382,6 +378,11 @@ namespace NLGUI std::string getSizeRefAsString() const; std::string getSizeRefAsString( const sint32 &sizeRef, const sint32 &sizeDivW, const sint32 &sizeDivH ) const; + void dummySet(sint32 value); + void dummySet(const std::string &value); + + public: + // export some properties REFLECT_EXPORT_START(CInterfaceElement, CReflectable) REFLECT_BOOL ("active", getActive, setActive); diff --git a/code/nel/include/nel/gui/interface_group.h b/code/nel/include/nel/gui/interface_group.h index 44c18414e..9f1e5562b 100644 --- a/code/nel/include/nel/gui/interface_group.h +++ b/code/nel/include/nel/gui/interface_group.h @@ -234,18 +234,18 @@ namespace NLGUI REFLECT_LUA_METHOD("dumpSize", luaDumpSize); REFLECT_LUA_METHOD("dumpEltsOrder", luaDumpEltsOrder); REFLECT_LUA_METHOD("dumpGroups", luaDumpGroups); - REFLECT_STRING ("left_click", getLeftClickHandler, setLeftClickHandler); - REFLECT_STRING ("right_click", getRightClickHandler, setRightClickHandler); - REFLECT_STRING ("left_click_params", getLeftClickHandlerParams, setLeftClickHandlerParams); - REFLECT_STRING ("right_click_params", getRightClickHandlerParams, setRightClickHandlerParams); - REFLECT_STRING ("on_active", getOnActiveHandler, setOnActiveHandler); - REFLECT_STRING ("on_active_params", getOnActiveParams, setOnActiveParams); - REFLECT_STRING ("on_deactive", getOnDeactiveHandler, setOnDeactiveHandler); - REFLECT_STRING ("on_deactive_params", getOnDeactiveParams, setOnDeactiveParams); - REFLECT_STRING ("on_enter", getAHOnEnter, setAHOnEnter); - REFLECT_STRING ("on_enter_params", getAHOnEnterParams, setAHOnEnterParams); - REFLECT_STRING ("on_escape", getAHOnEscape, setAHOnEscape); - REFLECT_STRING ("on_escape_params", getAHOnEscapeParams, setAHOnEscapeParams); + REFLECT_STRING_REF ("left_click", getLeftClickHandler, setLeftClickHandler); + REFLECT_STRING_REF ("right_click", getRightClickHandler, setRightClickHandler); + REFLECT_STRING_REF ("left_click_params", getLeftClickHandlerParams, setLeftClickHandlerParams); + REFLECT_STRING_REF ("right_click_params", getRightClickHandlerParams, setRightClickHandlerParams); + REFLECT_STRING_REF ("on_active", getOnActiveHandler, setOnActiveHandler); + REFLECT_STRING_REF ("on_active_params", getOnActiveParams, setOnActiveParams); + REFLECT_STRING_REF ("on_deactive", getOnDeactiveHandler, setOnDeactiveHandler); + REFLECT_STRING_REF ("on_deactive_params", getOnDeactiveParams, setOnDeactiveParams); + REFLECT_STRING_REF ("on_enter", getAHOnEnter, setAHOnEnter); + REFLECT_STRING_REF ("on_enter_params", getAHOnEnterParams, setAHOnEnterParams); + REFLECT_STRING_REF ("on_escape", getAHOnEscape, setAHOnEscape); + REFLECT_STRING_REF ("on_escape_params", getAHOnEscapeParams, setAHOnEscapeParams); REFLECT_SINT32 ("ofsx", getOfsX, setOfsX); REFLECT_SINT32 ("ofsy", getOfsY, setOfsY); REFLECT_BOOL("child_resize_w", getResizeFromChildW, setResizeFromChildW); diff --git a/code/nel/include/nel/gui/reflect.h b/code/nel/include/nel/gui/reflect.h index 9b594a0a5..8bd3b4781 100644 --- a/code/nel/include/nel/gui/reflect.h +++ b/code/nel/include/nel/gui/reflect.h @@ -42,6 +42,8 @@ namespace NLGUI Float, String, UCString, + StringRef, + UCStringRef, RGBA, LuaMethod }; // other types will be added when needed @@ -52,6 +54,8 @@ namespace NLGUI typedef float (CReflectable::* TGetFloat) () const; typedef std::string (CReflectable::* TGetString) () const; typedef ucstring (CReflectable::* TGetUCString) () const; + typedef const std::string & (CReflectable::* TGetStringRef) () const; + typedef const ucstring & (CReflectable::* TGetUCStringRef) () const; typedef NLMISC::CRGBA (CReflectable::* TGetRGBA) () const; // typedef void (CReflectable::* TSetBool) (bool); @@ -75,6 +79,8 @@ namespace NLGUI TGetFloat GetFloat; TGetString GetString; TGetUCString GetUCString; + TGetStringRef GetStringRef; + TGetUCStringRef GetUCStringRef; TGetRGBA GetRGBA; TLuaMethod GetLuaMethod; // lua method can only be obtained, not written ... } GetMethod; @@ -108,7 +114,7 @@ namespace NLGUI public: virtual ~CReflectable() {} virtual const char *getReflectedClassName() const { return "CReflectable"; } - virtual const char *getRflectedParentClassName() const { return ""; } + virtual const char *getReflectedParentClassName() const { return ""; } /** When registering classes, the reflect system will call this function on each class * to know which properties they exports. @@ -211,8 +217,8 @@ namespace NLGUI * Should be placed inside the class */ #define REFLECT_EXPORT_START(className, parentName) \ - virtual const char *getReflectedClassName() const { return #className; } \ - virtual const char *getReflectedParentClassName() const { return #parentName; } \ + virtual const char *getReflectedClassName() const NL_OVERRIDE { return #className; } \ + virtual const char *getReflectedParentClassName() const NL_OVERRIDE { return #parentName; } \ static void getReflectedProperties(TReflectedProperties &props) \ { \ typedef className A; \ @@ -222,6 +228,8 @@ namespace NLGUI typedef float (className::* TGetFloata) () const; \ typedef std::string (className::* TGetStringa) () const; \ typedef ucstring (className::* TGetUCStringa) () const; \ + typedef const std::string & (className::* TGetStringRefa) () const; \ + typedef const ucstring & (className::* TGetUCStringRefa) () const; \ typedef NLMISC::CRGBA (className::* TGetRGBAa) () const; \ typedef void (className::* TSetBoola) (bool); \ typedef void (className::* TSetSInt32a) (sint32); \ @@ -240,8 +248,8 @@ namespace NLGUI CReflectedProperty prop; \ prop.Name = exportName; \ prop.Type = CReflectedProperty::Boolean; \ - prop.GetMethod.GetBool = (CReflectedProperty::TGetBool) (TGetBoola) &A::getMethod; \ - prop.SetMethod.SetBool = (CReflectedProperty::TSetBool) (TSetBoola) &A::setMethod; \ + prop.GetMethod.GetBool = (CReflectedProperty::TGetBool) static_cast(&A::getMethod); \ + prop.SetMethod.SetBool = (CReflectedProperty::TSetBool) static_cast(&A::setMethod); \ props.push_back(prop); \ } @@ -251,8 +259,8 @@ namespace NLGUI CReflectedProperty prop; \ prop.Name = exportName; \ prop.Type = CReflectedProperty::SInt32; \ - prop.GetMethod.GetSInt32 = (CReflectedProperty::TGetSInt32) (TGetSInt32a) &A::getMethod; \ - prop.SetMethod.SetSInt32 = (CReflectedProperty::TSetSInt32) (TSetSInt32a) &A::setMethod; \ + prop.GetMethod.GetSInt32 = (CReflectedProperty::TGetSInt32) static_cast(&A::getMethod); \ + prop.SetMethod.SetSInt32 = (CReflectedProperty::TSetSInt32) static_cast(&A::setMethod); \ props.push_back(prop); \ } @@ -262,8 +270,8 @@ namespace NLGUI CReflectedProperty prop; \ prop.Name = exportName; \ prop.Type = CReflectedProperty::UInt32; \ - prop.GetMethod.GetUInt32 = (CReflectedProperty::TGetUInt32) (TGetUInt32a) &A::getMethod; \ - prop.SetMethod.SetUInt32 = (CReflectedProperty::TSetUInt32) (TSetUInt32a) &A::setMethod; \ + prop.GetMethod.GetUInt32 = (CReflectedProperty::TGetUInt32) static_cast(&A::getMethod); \ + prop.SetMethod.SetUInt32 = (CReflectedProperty::TSetUInt32) static_cast(&A::setMethod); \ props.push_back(prop); \ } @@ -273,8 +281,8 @@ namespace NLGUI CReflectedProperty prop; \ prop.Name = exportName; \ prop.Type = CReflectedProperty::Float; \ - prop.GetMethod.GetFloat = (CReflectedProperty::TGetFloat) (TGetFloata) &A::getMethod; \ - prop.SetMethod.SetFloat = (CReflectedProperty::TSetFloat) (TSetFloata) &A::setMethod; \ + prop.GetMethod.GetFloat = (CReflectedProperty::TGetFloat) static_cast(&A::getMethod); \ + prop.SetMethod.SetFloat = (CReflectedProperty::TSetFloat) static_cast(&A::setMethod); \ props.push_back(prop); \ } @@ -284,8 +292,8 @@ namespace NLGUI CReflectedProperty prop; \ prop.Name = exportName; \ prop.Type = CReflectedProperty::String; \ - prop.GetMethod.GetString = (CReflectedProperty::TGetString) (TGetStringa) &A::getMethod; \ - prop.SetMethod.SetString = (CReflectedProperty::TSetString) (TSetStringa) &A::setMethod; \ + prop.GetMethod.GetString = (CReflectedProperty::TGetString) static_cast(&A::getMethod); \ + prop.SetMethod.SetString = (CReflectedProperty::TSetString) static_cast(&A::setMethod); \ props.push_back(prop); \ } @@ -295,8 +303,30 @@ namespace NLGUI CReflectedProperty prop; \ prop.Name = exportName; \ prop.Type = CReflectedProperty::UCString; \ - prop.GetMethod.GetUCString = (CReflectedProperty::TGetUCString) (TGetUCStringa) &A::getMethod; \ - prop.SetMethod.SetUCString = (CReflectedProperty::TSetUCString) (TSetUCStringa) &A::setMethod; \ + prop.GetMethod.GetUCString = (CReflectedProperty::TGetUCString) static_cast(&A::getMethod); \ + prop.SetMethod.SetUCString = (CReflectedProperty::TSetUCString) static_cast(&A::setMethod); \ + props.push_back(prop); \ + } + + // export a string value, by giving the name of the get and the set method + #define REFLECT_STRING_REF(exportName, getMethod, setMethod) \ + { \ + CReflectedProperty prop; \ + prop.Name = exportName; \ + prop.Type = CReflectedProperty::StringRef; \ + prop.GetMethod.GetStringRef = (CReflectedProperty::TGetStringRef) static_cast(&A::getMethod); \ + prop.SetMethod.SetString = (CReflectedProperty::TSetString) static_cast(&A::setMethod); \ + props.push_back(prop); \ + } + + // export a unicode string value, by giving the name of the get and the set method + #define REFLECT_UCSTRING_REF(exportName, getMethod, setMethod) \ + { \ + CReflectedProperty prop; \ + prop.Name = exportName; \ + prop.Type = CReflectedProperty::UCStringRef; \ + prop.GetMethod.GetUCStringRef = (CReflectedProperty::TGetUCStringRef) static_cast(&A::getMethod); \ + prop.SetMethod.SetUCString = (CReflectedProperty::TSetUCString) static_cast(&A::setMethod); \ props.push_back(prop); \ } @@ -307,8 +337,8 @@ namespace NLGUI CReflectedProperty prop; \ prop.Name = exportName; \ prop.Type = CReflectedProperty::RGBA; \ - prop.GetMethod.GetRGBA = (CReflectedProperty::TGetRGBA) (TGetRGBAa) &A::getMethod; \ - prop.SetMethod.SetRGBA = (CReflectedProperty::TSetRGBA) (TSetRGBAa) &A::setMethod; \ + prop.GetMethod.GetRGBA = (CReflectedProperty::TGetRGBA) static_cast(&A::getMethod); \ + prop.SetMethod.SetRGBA = (CReflectedProperty::TSetRGBA) static_cast(&A::setMethod); \ props.push_back(prop); \ } @@ -318,7 +348,7 @@ namespace NLGUI CReflectedProperty prop; \ prop.Name = exportName; \ prop.Type = CReflectedProperty::LuaMethod; \ - prop.GetMethod.GetLuaMethod = (CReflectedProperty::TLuaMethod) (TLuaMethoda) &A::method; \ + prop.GetMethod.GetLuaMethod = (CReflectedProperty::TLuaMethod) static_cast(&A::method); \ props.push_back(prop); \ } diff --git a/code/nel/include/nel/misc/debug.h b/code/nel/include/nel/misc/debug.h index 68f47af8a..668c2e5a3 100644 --- a/code/nel/include/nel/misc/debug.h +++ b/code/nel/include/nel/misc/debug.h @@ -589,7 +589,7 @@ template inline T type_cast(U o) /** Compile time assertion */ #ifdef NL_ISO_CPP0X_AVAILABLE -# define nlctassert(cond) static_assert(cond, "Compile time assert in "#cond) +# define nlctassert(cond) static_assert((cond), "Compile time assert in "#cond) #else # define nlctassert(cond) (void)sizeof(uint[(cond) ? 1 : 0]) #endif diff --git a/code/nel/src/gui/group_html.cpp b/code/nel/src/gui/group_html.cpp index 2500af967..2e74182c3 100644 --- a/code/nel/src/gui/group_html.cpp +++ b/code/nel/src/gui/group_html.cpp @@ -4318,7 +4318,7 @@ namespace NLGUI // *************************************************************************** - string CGroupHTML::home () + string CGroupHTML::home () const { return Home; } diff --git a/code/nel/src/gui/interface_expr_user_fct.cpp b/code/nel/src/gui/interface_expr_user_fct.cpp index 2b77b143e..d0c687d26 100644 --- a/code/nel/src/gui/interface_expr_user_fct.cpp +++ b/code/nel/src/gui/interface_expr_user_fct.cpp @@ -555,6 +555,12 @@ namespace NLGUI case CReflectedProperty::UCString: result.setUCString ((elem->*(pRP->GetMethod.GetUCString))()); break; + case CReflectedProperty::StringRef: + result.setString ((elem->*(pRP->GetMethod.GetStringRef))()); + break; + case CReflectedProperty::UCStringRef: + result.setUCString ((elem->*(pRP->GetMethod.GetUCStringRef))()); + break; case CReflectedProperty::RGBA: result.setRGBA ((elem->*(pRP->GetMethod.GetRGBA))()); break; diff --git a/code/nel/src/gui/interface_link.cpp b/code/nel/src/gui/interface_link.cpp index 7ae26be5b..966354e10 100644 --- a/code/nel/src/gui/interface_link.cpp +++ b/code/nel/src/gui/interface_link.cpp @@ -106,6 +106,7 @@ namespace NLGUI } break; case CReflectedProperty::String: + case CReflectedProperty::StringRef: if (valueToAffect.toString()) { (destElem.*(property.SetMethod.SetString))(valueToAffect.getString()); @@ -117,6 +118,7 @@ namespace NLGUI } break; case CReflectedProperty::UCString: + case CReflectedProperty::UCStringRef: if (valueToAffect.toString()) { (destElem.*(property.SetMethod.SetUCString))(valueToAffect.getUCString()); diff --git a/code/nel/src/gui/lua_ihm.cpp b/code/nel/src/gui/lua_ihm.cpp index 1438150cf..132f1e4b9 100644 --- a/code/nel/src/gui/lua_ihm.cpp +++ b/code/nel/src/gui/lua_ihm.cpp @@ -1435,6 +1435,20 @@ namespace NLGUI #endif } break; + case CReflectedProperty::UCStringRef: + { + ucstring str = (reflectedObject.*(property.GetMethod.GetUCStringRef))(); + #if LUABIND_VERSION > 600 + luabind::detail::push(ls.getStatePointer(), str); + #else + luabind::object obj(ls.getStatePointer(), str); + obj.pushvalue(); + #endif + } + break; + case CReflectedProperty::StringRef: + ls.push( (reflectedObject.*(property.GetMethod.GetStringRef))() ); + break; case CReflectedProperty::RGBA: { CRGBA color = (reflectedObject.*(property.GetMethod.GetRGBA))(); @@ -1499,6 +1513,7 @@ namespace NLGUI return; } case CReflectedProperty::String: + case CReflectedProperty::StringRef: { std::string val; ls.toString(stackIndex, val); @@ -1506,6 +1521,7 @@ namespace NLGUI return; } case CReflectedProperty::UCString: + case CReflectedProperty::UCStringRef: { ucstring val; // Additionaly return of CInterfaceExpr may be std::string... test std string too diff --git a/code/ryzom/client/src/interface_v3/dbctrl_sheet.h b/code/ryzom/client/src/interface_v3/dbctrl_sheet.h index 1281b1ae8..8b89a91ed 100644 --- a/code/ryzom/client/src/interface_v3/dbctrl_sheet.h +++ b/code/ryzom/client/src/interface_v3/dbctrl_sheet.h @@ -296,14 +296,14 @@ public: REFLECT_SINT32("symbol", getGuildSymbol, setGuildSymbol); REFLECT_BOOL("invert_symbol", getInvertGuildSymbol, setInvertGuildSymbol); REFLECT_BOOL("can_drop", getCanDrop, setCanDrop); - REFLECT_STRING ("left_click", getActionOnLeftClick, setActionOnLeftClick); - REFLECT_STRING ("right_click", getActionOnRightClick, setActionOnRightClick); - REFLECT_STRING ("left_click_params", getParamsOnLeftClick, setParamsOnLeftClick); - REFLECT_STRING ("right_click_params", getParamsOnRightClick, setParamsOnRightClick); - REFLECT_STRING ("on_drop", getActionOnDrop, setActionOnDrop); - REFLECT_STRING ("on_drop_params", getParamsOnDrop, setParamsOnDrop); - REFLECT_STRING ("on_can_drop", getActionOnCanDrop, setActionOnCanDrop); - REFLECT_STRING ("on_can_drop_params", getParamsOnCanDrop, setParamsOnCanDrop); + REFLECT_STRING_REF ("left_click", getActionOnLeftClick, setActionOnLeftClick); + REFLECT_STRING_REF ("right_click", getActionOnRightClick, setActionOnRightClick); + REFLECT_STRING_REF ("left_click_params", getParamsOnLeftClick, setParamsOnLeftClick); + REFLECT_STRING_REF ("right_click_params", getParamsOnRightClick, setParamsOnRightClick); + REFLECT_STRING_REF ("on_drop", getActionOnDrop, setActionOnDrop); + REFLECT_STRING_REF ("on_drop_params", getParamsOnDrop, setParamsOnDrop); + REFLECT_STRING_REF ("on_can_drop", getActionOnCanDrop, setActionOnCanDrop); + REFLECT_STRING_REF ("on_can_drop_params", getParamsOnCanDrop, setParamsOnCanDrop); REFLECT_LUA_METHOD("getDraggedSheet", luaGetDraggedSheet); REFLECT_LUA_METHOD("getItemInfo", luaGetItemInfo); REFLECT_LUA_METHOD("getName", luaGetName); diff --git a/code/ryzom/client/src/interface_v3/group_html_cs.cpp b/code/ryzom/client/src/interface_v3/group_html_cs.cpp index 353410029..ba20123e1 100644 --- a/code/ryzom/client/src/interface_v3/group_html_cs.cpp +++ b/code/ryzom/client/src/interface_v3/group_html_cs.cpp @@ -88,7 +88,7 @@ void CGroupHTMLCS::addHTTPPostParams (SFormFields &formfields, bool /*trustedDom // *************************************************************************** -string CGroupHTMLCS::home () +string CGroupHTMLCS::home () const { return Home; } diff --git a/code/ryzom/client/src/interface_v3/group_html_cs.h b/code/ryzom/client/src/interface_v3/group_html_cs.h index 463bdbc09..76a066e6d 100644 --- a/code/ryzom/client/src/interface_v3/group_html_cs.h +++ b/code/ryzom/client/src/interface_v3/group_html_cs.h @@ -45,7 +45,7 @@ public: // From CGroupHTML virtual void addHTTPGetParams (std::string &url, bool trustedDomain); virtual void addHTTPPostParams (SFormFields &formfields, bool trustedDomain); - virtual std::string home(); + virtual std::string home() const NL_OVERRIDE; private: diff --git a/code/ryzom/client/src/interface_v3/group_html_forum.cpp b/code/ryzom/client/src/interface_v3/group_html_forum.cpp index 79a4574dc..fe218c215 100644 --- a/code/ryzom/client/src/interface_v3/group_html_forum.cpp +++ b/code/ryzom/client/src/interface_v3/group_html_forum.cpp @@ -108,10 +108,10 @@ void CGroupHTMLForum::addHTTPPostParams (SFormFields &formfields, bool /*trusted // *************************************************************************** -string CGroupHTMLForum::home () +string CGroupHTMLForum::home () const { CInterfaceManager *pIM = CInterfaceManager::getInstance(); - NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:FORUM_UPDATED")->setValue32(0); + NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:FORUM_UPDATED")->setValue32(0); // FIXME: How is this const?! return Home; } diff --git a/code/ryzom/client/src/interface_v3/group_html_forum.h b/code/ryzom/client/src/interface_v3/group_html_forum.h index 53ab7d675..31e5308be 100644 --- a/code/ryzom/client/src/interface_v3/group_html_forum.h +++ b/code/ryzom/client/src/interface_v3/group_html_forum.h @@ -45,7 +45,7 @@ public: // From CGroupHTML virtual void addHTTPGetParams (std::string &url, bool trustedDomain); virtual void addHTTPPostParams (SFormFields &formfields, bool trustedDomain); - virtual std::string home(); + virtual std::string home() const NL_OVERRIDE; virtual void handle (); private: diff --git a/code/ryzom/client/src/interface_v3/group_html_mail.cpp b/code/ryzom/client/src/interface_v3/group_html_mail.cpp index e351b10ef..8627a8573 100644 --- a/code/ryzom/client/src/interface_v3/group_html_mail.cpp +++ b/code/ryzom/client/src/interface_v3/group_html_mail.cpp @@ -77,10 +77,10 @@ void CGroupHTMLMail::addHTTPPostParams (SFormFields &formfields, bool /*trustedD // *************************************************************************** -string CGroupHTMLMail::home () +string CGroupHTMLMail::home () const { CInterfaceManager *pIM = CInterfaceManager::getInstance(); - NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:MAIL_WAITING")->setValue32(0); + NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:MAIL_WAITING")->setValue32(0); // FIXME: How is this const?! return Home; } diff --git a/code/ryzom/client/src/interface_v3/group_html_mail.h b/code/ryzom/client/src/interface_v3/group_html_mail.h index e67a098a4..59cf4c852 100644 --- a/code/ryzom/client/src/interface_v3/group_html_mail.h +++ b/code/ryzom/client/src/interface_v3/group_html_mail.h @@ -45,7 +45,7 @@ public: // From CGroupHTML virtual void addHTTPGetParams (std::string &url, bool trustedDomain); virtual void addHTTPPostParams (SFormFields &formfields, bool trustedDomain); - virtual std::string home(); + virtual std::string home() const NL_OVERRIDE; virtual void handle (); private: diff --git a/code/ryzom/client/src/interface_v3/group_html_webig.cpp b/code/ryzom/client/src/interface_v3/group_html_webig.cpp index 18ab0fc75..985ae3f20 100644 --- a/code/ryzom/client/src/interface_v3/group_html_webig.cpp +++ b/code/ryzom/client/src/interface_v3/group_html_webig.cpp @@ -396,7 +396,7 @@ void CGroupHTMLAuth::addHTTPPostParams (SFormFields &formfields, bool trustedDom // *************************************************************************** -string CGroupHTMLAuth::home () +string CGroupHTMLAuth::home () const { return Home; } @@ -442,7 +442,7 @@ void CGroupHTMLWebIG::addHTTPPostParams (SFormFields &formfields, bool trustedDo // *************************************************************************** -string CGroupHTMLWebIG::home () +string CGroupHTMLWebIG::home () const { return Home; } diff --git a/code/ryzom/client/src/interface_v3/group_html_webig.h b/code/ryzom/client/src/interface_v3/group_html_webig.h index 30ccb5825..a339dd3dc 100644 --- a/code/ryzom/client/src/interface_v3/group_html_webig.h +++ b/code/ryzom/client/src/interface_v3/group_html_webig.h @@ -41,7 +41,7 @@ public: // From CGroupHTML virtual void addHTTPGetParams (std::string &url, bool trustedDomain); virtual void addHTTPPostParams (SFormFields &formfields, bool trustedDomain); - virtual std::string home(); + virtual std::string home() const NL_OVERRIDE; virtual void handle (); private: @@ -63,7 +63,7 @@ public: /// From CGroupHTMLAuth virtual void addHTTPGetParams (std::string &url, bool trustedDomain); virtual void addHTTPPostParams (SFormFields &formfields, bool trustedDomain); - virtual std::string home(); + virtual std::string home() const NL_OVERRIDE; virtual void handle (); private: diff --git a/code/ryzom/client/src/interface_v3/group_quick_help.cpp b/code/ryzom/client/src/interface_v3/group_quick_help.cpp index 48b904398..0b789fccf 100644 --- a/code/ryzom/client/src/interface_v3/group_quick_help.cpp +++ b/code/ryzom/client/src/interface_v3/group_quick_help.cpp @@ -348,7 +348,7 @@ void CGroupQuickHelp::browse (const char *url) // *************************************************************************** -std::string CGroupQuickHelp::home() +std::string CGroupQuickHelp::home() const { string completeURL = getLanguageUrl(Home, ClientCfg.getHtmlLanguageCode()); diff --git a/code/ryzom/client/src/interface_v3/group_quick_help.h b/code/ryzom/client/src/interface_v3/group_quick_help.h index 7843d5de2..0d897d014 100644 --- a/code/ryzom/client/src/interface_v3/group_quick_help.h +++ b/code/ryzom/client/src/interface_v3/group_quick_help.h @@ -53,7 +53,7 @@ private: virtual void beginElement (NLGUI::CHtmlElement &elm); virtual void endBuild (); virtual void browse (const char *url); - virtual std::string home(); + virtual std::string home() const NL_OVERRIDE; // Modify uri with '.html' or '_??.html' ending to have current user language, // If the uri is not found locally, then try "en" as fallback language