Fix XTI compilation in STL build.
Use explicit c_str() calls in XTI code as implicit conversion to "const char *" doesn't exist in STL build. This fixes compilation problems when wxUSE_EXTENDED_RTTI && wxUSE_STL. Closes #13087. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67342 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -88,7 +88,7 @@ private:
|
|||||||
wxEnumData s_enumData##e( s_enumDataMembers##e ); \
|
wxEnumData s_enumData##e( s_enumDataMembers##e ); \
|
||||||
wxEnumData *wxGetEnumData(e) { return &s_enumData##e; } \
|
wxEnumData *wxGetEnumData(e) { return &s_enumData##e; } \
|
||||||
template<> void wxStringReadValue(const wxString& s, e &data ) \
|
template<> void wxStringReadValue(const wxString& s, e &data ) \
|
||||||
{ data = (e) s_enumData##e.GetEnumMemberValue(s); } \
|
{ data = (e) s_enumData##e.GetEnumMemberValue(s.c_str()); } \
|
||||||
template<> void wxStringWriteValue(wxString &s, const e &data ) \
|
template<> void wxStringWriteValue(wxString &s, const e &data ) \
|
||||||
{ s = s_enumData##e.GetEnumMemberName((int)data); } \
|
{ s = s_enumData##e.GetEnumMemberName((int)data); } \
|
||||||
void FromLong##e( long data, wxAny& result ) \
|
void FromLong##e( long data, wxAny& result ) \
|
||||||
@@ -202,7 +202,7 @@ void wxFlagsFromString(const wxString &s, e &data )
|
|||||||
{
|
{
|
||||||
flag = array[i];
|
flag = array[i];
|
||||||
int ivalue;
|
int ivalue;
|
||||||
if ( edata->HasEnumMemberValue( flag, &ivalue ) )
|
if ( edata->HasEnumMemberValue( flag.c_str(), &ivalue ) )
|
||||||
{
|
{
|
||||||
data.m_data |= ivalue;
|
data.m_data |= ivalue;
|
||||||
}
|
}
|
||||||
|
@@ -931,14 +931,14 @@ void wxGenericPropertyAccessor::SetProperty(wxObject *object, const wxAny &value
|
|||||||
{
|
{
|
||||||
wxDynamicObject* dynobj = wx_dynamic_cast(wxDynamicObject*, object);
|
wxDynamicObject* dynobj = wx_dynamic_cast(wxDynamicObject*, object);
|
||||||
wxASSERT_MSG( dynobj, wxT("cannot call wxDynamicClassInfo::SetProperty on an object other than wxDynamicObject") );
|
wxASSERT_MSG( dynobj, wxT("cannot call wxDynamicClassInfo::SetProperty on an object other than wxDynamicObject") );
|
||||||
dynobj->SetProperty(m_propertyName, value );
|
dynobj->SetProperty(m_propertyName.c_str(), value );
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxGenericPropertyAccessor::GetProperty(const wxObject *object, wxAny& value) const
|
void wxGenericPropertyAccessor::GetProperty(const wxObject *object, wxAny& value) const
|
||||||
{
|
{
|
||||||
const wxDynamicObject* dynobj = wx_dynamic_cast( const wxDynamicObject * , object );
|
const wxDynamicObject* dynobj = wx_dynamic_cast( const wxDynamicObject * , object );
|
||||||
wxASSERT_MSG( dynobj, wxT("cannot call wxDynamicClassInfo::SetProperty on an object other than wxDynamicObject") );
|
wxASSERT_MSG( dynobj, wxT("cannot call wxDynamicClassInfo::SetProperty on an object other than wxDynamicObject") );
|
||||||
value = dynobj->GetProperty( m_propertyName );
|
value = dynobj->GetProperty( m_propertyName.c_str() );
|
||||||
}
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
@@ -577,7 +577,7 @@ void wxObjectRuntimeReaderCallback::SetProperty(int objectID,
|
|||||||
{
|
{
|
||||||
wxObject *o;
|
wxObject *o;
|
||||||
o = m_data->GetObject(objectID);
|
o = m_data->GetObject(objectID);
|
||||||
classInfo->SetProperty( o, propertyInfo->GetName(), value );
|
classInfo->SetProperty( o, propertyInfo->GetName().c_str(), value );
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxObjectRuntimeReaderCallback::SetPropertyAsObject(int objectID,
|
void wxObjectRuntimeReaderCallback::SetPropertyAsObject(int objectID,
|
||||||
@@ -599,7 +599,7 @@ void wxObjectRuntimeReaderCallback::SetPropertyAsObject(int objectID,
|
|||||||
valo = dynvalo->GetSuperClassInstance();
|
valo = dynvalo->GetSuperClassInstance();
|
||||||
}
|
}
|
||||||
|
|
||||||
classInfo->SetProperty( o, propertyInfo->GetName(),
|
classInfo->SetProperty( o, propertyInfo->GetName().c_str(),
|
||||||
valClassInfo->ObjectPtrToAny(valo) );
|
valClassInfo->ObjectPtrToAny(valo) );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -650,7 +650,7 @@ void wxObjectRuntimeReaderCallback::AddToPropertyCollection( int objectID,
|
|||||||
{
|
{
|
||||||
wxObject *o;
|
wxObject *o;
|
||||||
o = m_data->GetObject(objectID);
|
o = m_data->GetObject(objectID);
|
||||||
classInfo->AddToPropertyCollection( o, propertyInfo->GetName(), value );
|
classInfo->AddToPropertyCollection( o, propertyInfo->GetName().c_str(), value );
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxObjectRuntimeReaderCallback::AddToPropertyCollectionAsObject(int objectID,
|
void wxObjectRuntimeReaderCallback::AddToPropertyCollectionAsObject(int objectID,
|
||||||
@@ -674,7 +674,7 @@ void wxObjectRuntimeReaderCallback::AddToPropertyCollectionAsObject(int objectID
|
|||||||
valo = dynvalo->GetSuperClassInstance();
|
valo = dynvalo->GetSuperClassInstance();
|
||||||
}
|
}
|
||||||
|
|
||||||
classInfo->AddToPropertyCollection( o, propertyInfo->GetName(),
|
classInfo->AddToPropertyCollection( o, propertyInfo->GetName().c_str(),
|
||||||
valClassInfo->ObjectPtrToAny(valo) );
|
valClassInfo->ObjectPtrToAny(valo) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -483,7 +483,7 @@ int wxObjectXmlReader::ReadComponent(wxXmlNode *node, wxObjectReaderCallback *ca
|
|||||||
wxClassInfo* sinkClassInfo = GetObjectClassInfo( sinkOid );
|
wxClassInfo* sinkClassInfo = GetObjectClassInfo( sinkOid );
|
||||||
|
|
||||||
callbacks->SetConnect( objectID, classInfo, pi, sinkClassInfo,
|
callbacks->SetConnect( objectID, classInfo, pi, sinkClassInfo,
|
||||||
sinkClassInfo->FindHandlerInfo(handlerName), sinkOid );
|
sinkClassInfo->FindHandlerInfo(handlerName.c_str()), sinkOid );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user