Fix macros in xti.cpp
Replaced `wxToStringConverter<type, data, result)` with
`wxFromStringConverter<type>(data, result)`, which was broken
for 7 years since the commit 13830d6
This fixes compilation with `--enable-extended_rtti` configure flag.
Also removed all trailing spaces in this file.
This commit is contained in:
@@ -269,10 +269,10 @@ template<> void wxStringWriteValue(wxString &s, const wxString &data )
|
|||||||
&wxFromStringConverter<type>, typeid(type).name());
|
&wxFromStringConverter<type>, typeid(type).name());
|
||||||
#else
|
#else
|
||||||
#define wxBUILTIN_TYPE_INFO( element, type ) \
|
#define wxBUILTIN_TYPE_INFO( element, type ) \
|
||||||
void _toString##element( const wxAny& data, wxString &result ) \
|
void _toString##element( const wxAny& data, wxString &result ) \
|
||||||
{ wxToStringConverter<type, data, result); } \
|
{ wxToStringConverter<type>(data, result); } \
|
||||||
void _fromString##element( const wxString& data, wxAny &result ) \
|
void _fromString##element( const wxString& data, wxAny &result ) \
|
||||||
{ wxFromStringConverter<type, data, result); } \
|
{ wxFromStringConverter<type>(data, result); } \
|
||||||
wxBuiltInTypeInfo s_typeInfo##type(element, &_toString##element, \
|
wxBuiltInTypeInfo s_typeInfo##type(element, &_toString##element, \
|
||||||
&_fromString##element, typeid(type).name());
|
&_fromString##element, typeid(type).name());
|
||||||
#endif
|
#endif
|
||||||
@@ -328,7 +328,7 @@ wxCUSTOM_TYPE_INFO(wxRange, wxToStringConverter<wxRange> , wxFromStringConverter
|
|||||||
|
|
||||||
wxCOLLECTION_TYPE_INFO( wxString, wxArrayString );
|
wxCOLLECTION_TYPE_INFO( wxString, wxArrayString );
|
||||||
|
|
||||||
template<> void wxCollectionToVariantArray( wxArrayString const &theArray,
|
template<> void wxCollectionToVariantArray( wxArrayString const &theArray,
|
||||||
wxAnyList &value)
|
wxAnyList &value)
|
||||||
{
|
{
|
||||||
wxArrayCollectionToVariantArray( theArray, value );
|
wxArrayCollectionToVariantArray( theArray, value );
|
||||||
@@ -346,35 +346,35 @@ wxTypeInfo *wxTypeInfo::FindType(const wxString& typeName)
|
|||||||
return (wxTypeInfo *)iter->second;
|
return (wxTypeInfo *)iter->second;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxClassTypeInfo::wxClassTypeInfo( wxTypeKind kind, wxClassInfo* classInfo,
|
wxClassTypeInfo::wxClassTypeInfo( wxTypeKind kind, wxClassInfo* classInfo,
|
||||||
wxVariant2StringFnc to,
|
wxVariant2StringFnc to,
|
||||||
wxString2VariantFnc from,
|
wxString2VariantFnc from,
|
||||||
const wxString &name) :
|
const wxString &name) :
|
||||||
wxTypeInfo( kind, to, from, name)
|
wxTypeInfo( kind, to, from, name)
|
||||||
{
|
{
|
||||||
wxASSERT_MSG( kind == wxT_OBJECT_PTR || kind == wxT_OBJECT,
|
wxASSERT_MSG( kind == wxT_OBJECT_PTR || kind == wxT_OBJECT,
|
||||||
wxT("Illegal Kind for Enum Type")); m_classInfo = classInfo;
|
wxT("Illegal Kind for Enum Type")); m_classInfo = classInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxEventSourceTypeInfo::wxEventSourceTypeInfo( int eventType, wxClassInfo* eventClass,
|
wxEventSourceTypeInfo::wxEventSourceTypeInfo( int eventType, wxClassInfo* eventClass,
|
||||||
wxVariant2StringFnc to,
|
|
||||||
wxString2VariantFnc from ) :
|
|
||||||
wxTypeInfo ( wxT_DELEGATE, to, from, wxEmptyString )
|
|
||||||
{
|
|
||||||
m_eventClass = eventClass;
|
|
||||||
m_eventType = eventType;
|
|
||||||
m_lastEventType = -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
wxEventSourceTypeInfo::wxEventSourceTypeInfo( int eventType, int lastEventType,
|
|
||||||
wxClassInfo* eventClass,
|
|
||||||
wxVariant2StringFnc to,
|
wxVariant2StringFnc to,
|
||||||
wxString2VariantFnc from ) :
|
wxString2VariantFnc from ) :
|
||||||
wxTypeInfo ( wxT_DELEGATE, to, from, wxEmptyString )
|
wxTypeInfo ( wxT_DELEGATE, to, from, wxEmptyString )
|
||||||
{
|
{
|
||||||
m_eventClass = eventClass;
|
m_eventClass = eventClass;
|
||||||
m_eventType = eventType;
|
m_eventType = eventType;
|
||||||
m_lastEventType = lastEventType;
|
m_lastEventType = -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
wxEventSourceTypeInfo::wxEventSourceTypeInfo( int eventType, int lastEventType,
|
||||||
|
wxClassInfo* eventClass,
|
||||||
|
wxVariant2StringFnc to,
|
||||||
|
wxString2VariantFnc from ) :
|
||||||
|
wxTypeInfo ( wxT_DELEGATE, to, from, wxEmptyString )
|
||||||
|
{
|
||||||
|
m_eventClass = eventClass;
|
||||||
|
m_eventType = eventType;
|
||||||
|
m_lastEventType = lastEventType;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxTypeInfo::Register()
|
void wxTypeInfo::Register()
|
||||||
@@ -621,7 +621,7 @@ wxObjectStreamingCallback wxClassInfo::GetStreamingCallback() const
|
|||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxClassInfo::BeforeWriteObject( const wxObject *obj, wxObjectWriter *streamer,
|
bool wxClassInfo::BeforeWriteObject( const wxObject *obj, wxObjectWriter *streamer,
|
||||||
wxObjectWriterCallback *writercallback, const wxStringToAnyHashMap &metadata) const
|
wxObjectWriterCallback *writercallback, const wxStringToAnyHashMap &metadata) const
|
||||||
{
|
{
|
||||||
wxObjectStreamingCallback sb = GetStreamingCallback();
|
wxObjectStreamingCallback sb = GetStreamingCallback();
|
||||||
@@ -631,7 +631,7 @@ bool wxClassInfo::BeforeWriteObject( const wxObject *obj, wxObjectWriter *stream
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxClassInfo::SetProperty(wxObject *object, const wxChar *propertyName,
|
void wxClassInfo::SetProperty(wxObject *object, const wxChar *propertyName,
|
||||||
const wxAny &value) const
|
const wxAny &value) const
|
||||||
{
|
{
|
||||||
const wxPropertyAccessor *accessor;
|
const wxPropertyAccessor *accessor;
|
||||||
@@ -652,7 +652,7 @@ wxAny wxClassInfo::GetProperty(wxObject *object, const wxChar *propertyName) con
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxAnyList wxClassInfo::GetPropertyCollection(wxObject *object,
|
wxAnyList wxClassInfo::GetPropertyCollection(wxObject *object,
|
||||||
const wxChar *propertyName) const
|
const wxChar *propertyName) const
|
||||||
{
|
{
|
||||||
const wxPropertyAccessor *accessor;
|
const wxPropertyAccessor *accessor;
|
||||||
@@ -664,7 +664,7 @@ wxAnyList wxClassInfo::GetPropertyCollection(wxObject *object,
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxClassInfo::AddToPropertyCollection(wxObject *object, const wxChar *propertyName,
|
void wxClassInfo::AddToPropertyCollection(wxObject *object, const wxChar *propertyName,
|
||||||
const wxAny& value) const
|
const wxAny& value) const
|
||||||
{
|
{
|
||||||
const wxPropertyAccessor *accessor;
|
const wxPropertyAccessor *accessor;
|
||||||
@@ -713,9 +713,9 @@ wxAny wxClassInfo::ObjectPtrToAny( wxObject* obj) const
|
|||||||
return m_objectToVariantConverter(obj);
|
return m_objectToVariantConverter(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxClassInfo::NeedsDirectConstruction() const
|
bool wxClassInfo::NeedsDirectConstruction() const
|
||||||
{
|
{
|
||||||
return wx_dynamic_cast(wxObjectAllocator*, m_constructor) != NULL;
|
return wx_dynamic_cast(wxObjectAllocator*, m_constructor) != NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -777,7 +777,7 @@ void wxDynamicObject::RemoveProperty( const wxChar *propertyName )
|
|||||||
m_data->m_properties.erase( propertyName );
|
m_data->m_properties.erase( propertyName );
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxDynamicObject::RenameProperty( const wxChar *oldPropertyName,
|
void wxDynamicObject::RenameProperty( const wxChar *oldPropertyName,
|
||||||
const wxChar *newPropertyName )
|
const wxChar *newPropertyName )
|
||||||
{
|
{
|
||||||
wxASSERT_MSG(m_classInfo->FindPropertyInfoInThisClass(oldPropertyName),
|
wxASSERT_MSG(m_classInfo->FindPropertyInfoInThisClass(oldPropertyName),
|
||||||
@@ -793,8 +793,8 @@ void wxDynamicObject::RenameProperty( const wxChar *oldPropertyName,
|
|||||||
// wxDynamicClassInfo
|
// wxDynamicClassInfo
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
wxDynamicClassInfo::wxDynamicClassInfo( const wxChar *unitName,
|
wxDynamicClassInfo::wxDynamicClassInfo( const wxChar *unitName,
|
||||||
const wxChar *className,
|
const wxChar *className,
|
||||||
const wxClassInfo* superClass ) :
|
const wxClassInfo* superClass ) :
|
||||||
wxClassInfo( unitName, className, new const wxClassInfo*[2])
|
wxClassInfo( unitName, className, new const wxClassInfo*[2])
|
||||||
{
|
{
|
||||||
@@ -820,7 +820,7 @@ wxObject *wxDynamicClassInfo::AllocateObject() const
|
|||||||
bool wxDynamicClassInfo::Create (wxObject *object, int paramCount, wxAny *params) const
|
bool wxDynamicClassInfo::Create (wxObject *object, int paramCount, wxAny *params) const
|
||||||
{
|
{
|
||||||
wxDynamicObject *dynobj = wx_dynamic_cast( wxDynamicObject *, object );
|
wxDynamicObject *dynobj = wx_dynamic_cast( wxDynamicObject *, object );
|
||||||
wxASSERT_MSG( dynobj,
|
wxASSERT_MSG( dynobj,
|
||||||
wxT("cannot call wxDynamicClassInfo::Create on ")
|
wxT("cannot call wxDynamicClassInfo::Create on ")
|
||||||
wxT("an object other than wxDynamicObject") );
|
wxT("an object other than wxDynamicObject") );
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user