Fix wxPropertyGrid classes build without implicit wxString encoding

Ensure that all headers in wx/propgrid can be compiled with
wxNO_IMPLICIT_WXSTRING_ENCODING defined.

Closes #22102.
This commit is contained in:
Artur Wieczorek 2022-05-30 19:07:08 +02:00
parent b9cb57eceb
commit b079554100

View File

@ -55,12 +55,14 @@ public:
wxCHECK( m_isProperty, NULL ); wxCHECK( m_isProperty, NULL );
return m_property; return m_property;
} }
#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
wxPGPropArgCls( const char* str ) wxPGPropArgCls( const char* str )
{ {
m_name = str; m_name = str;
m_property = NULL; m_property = NULL;
m_isProperty = false; m_isProperty = false;
} }
#endif // !wxNO_IMPLICIT_WXSTRING_ENCODING
wxPGPropArgCls( const wchar_t* str ) wxPGPropArgCls( const wchar_t* str )
{ {
m_name = str; m_name = str;
@ -906,11 +908,13 @@ public:
SetPropertyValueString( id, wxString(value) ); SetPropertyValueString( id, wxString(value) );
} }
#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
// Sets value (char*) of a property. // Sets value (char*) of a property.
void SetPropertyValue( wxPGPropArg id, const char* value ) void SetPropertyValue( wxPGPropArg id, const char* value )
{ {
SetPropertyValueString( id, wxString(value) ); SetPropertyValueString( id, wxString(value) );
} }
#endif // !wxNO_IMPLICIT_WXSTRING_ENCODING
// Sets value (string) of a property. // Sets value (string) of a property.
void SetPropertyValue( wxPGPropArg id, const wxString& value ) void SetPropertyValue( wxPGPropArg id, const wxString& value )