diff --git a/include/wx/xrc/xmlres.h b/include/wx/xrc/xmlres.h index 4bcd32b180..ecf0ca4c0b 100644 --- a/include/wx/xrc/xmlres.h +++ b/include/wx/xrc/xmlres.h @@ -512,7 +512,7 @@ public: // wxXML_ENTITY_NODE name="tag", content="" // |-- wxXML_TEXT_NODE or // wxXML_CDATA_SECTION_NODE name="" content="content" - wxString GetNodeContent(const wxXmlNode *node) override; + wxString GetNodeContent(const wxXmlNode *node) const override; wxXmlNode *GetNodeParent(const wxXmlNode *node) const override; wxXmlNode *GetNodeNext(const wxXmlNode *node) const override; diff --git a/include/wx/xrc/xmlreshandler.h b/include/wx/xrc/xmlreshandler.h index bfbbfb4318..2b00ceefe4 100644 --- a/include/wx/xrc/xmlreshandler.h +++ b/include/wx/xrc/xmlreshandler.h @@ -61,7 +61,7 @@ public: wxObject *instance) = 0; virtual bool IsOfClass(wxXmlNode *node, const wxString& classname) const = 0; virtual bool IsObjectNode(const wxXmlNode *node) const = 0; - virtual wxString GetNodeContent(const wxXmlNode *node) = 0; + virtual wxString GetNodeContent(const wxXmlNode *node) const = 0; virtual wxXmlNode *GetNodeParent(const wxXmlNode *node) const = 0; virtual wxXmlNode *GetNodeNext(const wxXmlNode *node) const = 0; virtual wxXmlNode *GetNodeChildren(const wxXmlNode *node) const = 0; @@ -240,7 +240,7 @@ protected: { return GetImpl()->IsObjectNode(node); } - wxString GetNodeContent(const wxXmlNode *node) + wxString GetNodeContent(const wxXmlNode *node) const { return GetImpl()->GetNodeContent(node); } diff --git a/interface/wx/xrc/xmlres.h b/interface/wx/xrc/xmlres.h index 8db9539fdb..ce1db0dede 100644 --- a/interface/wx/xrc/xmlres.h +++ b/interface/wx/xrc/xmlres.h @@ -763,7 +763,7 @@ protected: /** Gets node content from wxXML_ENTITY_NODE. */ - wxString GetNodeContent(wxXmlNode* node); + wxString GetNodeContent(wxXmlNode* node) const; /** Gets the parent of the node given. diff --git a/src/xrc/xmlres.cpp b/src/xrc/xmlres.cpp index b8d503caea..e3746da976 100644 --- a/src/xrc/xmlres.cpp +++ b/src/xrc/xmlres.cpp @@ -2260,7 +2260,7 @@ bool wxXmlResourceHandlerImpl::IsObjectNode(const wxXmlNode *node) const node->GetName() == wxS("object_ref")); } -wxString wxXmlResourceHandlerImpl::GetNodeContent(const wxXmlNode *node) +wxString wxXmlResourceHandlerImpl::GetNodeContent(const wxXmlNode *node) const { return node ? node->GetNodeContent() : wxString{}; }