diff --git a/samples/propgrid/sampleprops.cpp b/samples/propgrid/sampleprops.cpp index 45d6c68c4e..e1b9b5322e 100644 --- a/samples/propgrid/sampleprops.cpp +++ b/samples/propgrid/sampleprops.cpp @@ -155,7 +155,7 @@ void wxFontDataProperty::RefreshChildren() if ( GetChildCount() < 6 ) // Number is count of wxFontProperty's children + 1. return; wxFontData fontData; fontData << m_value_wxFontData; - wxVariant variant; variant << fontData.GetColour(); + wxVariant variant = WXVARIANT(fontData.GetColour()); Item(6)->SetValue( variant ); } diff --git a/src/propgrid/advprops.cpp b/src/propgrid/advprops.cpp index 11cd5c89a1..90a2645452 100644 --- a/src/propgrid/advprops.cpp +++ b/src/propgrid/advprops.cpp @@ -645,7 +645,7 @@ void wxFontProperty::OnSetValue() if ( !font.IsOk() ) { - m_value << *wxNORMAL_FONT; + m_value = WXVARIANT(*wxNORMAL_FONT); } } @@ -744,8 +744,7 @@ wxVariant wxFontProperty::ChildChanged( wxVariant& thisValue, font.SetFamily( static_cast(fam) ); } - wxVariant newVariant; - newVariant << font; + wxVariant newVariant = WXVARIANT(font); return newVariant; } @@ -1022,7 +1021,7 @@ void wxSystemColourProperty::OnSetValue() if ( m_value.IsType(wxS("wxColour*")) ) { wxColour* pCol = wxStaticCast(m_value.GetWxObjectPtr(), wxColour); - m_value << *pCol; + m_value = WXVARIANT(*pCol); } wxColourPropertyValue val = GetVal(&m_value); @@ -1638,9 +1637,7 @@ void wxColourProperty::Init( wxColour colour ) { if ( !colour.IsOk() ) colour = *wxWHITE; - wxVariant variant; - variant << colour; - m_value = variant; + m_value = WXVARIANT(colour); int ind = ColToInd(colour); if ( ind < 0 ) ind = m_choices.GetCount() - 1; @@ -1666,8 +1663,7 @@ wxColour wxColourProperty::GetColour( int index ) const wxVariant wxColourProperty::DoTranslateVal( wxColourPropertyValue& v ) const { - wxVariant variant; - variant << v.m_colour; + wxVariant variant = WXVARIANT(v.m_colour); return variant; }