Prepare propgrid sample to build successfully when wxUSE_LONGLONG is disabled.
Make the code ready to build even when wxLongLong type is not available.
This commit is contained in:
@@ -1422,7 +1422,11 @@ void FormMain::PopulateWithExamples ()
|
|||||||
pg->Append( new wxPointProperty( wxT("PointProperty"), wxT("Position"), GetPosition() ) );
|
pg->Append( new wxPointProperty( wxT("PointProperty"), wxT("Position"), GetPosition() ) );
|
||||||
|
|
||||||
// UInt samples
|
// UInt samples
|
||||||
|
#if wxUSE_LONGLONG
|
||||||
pg->Append( new wxUIntProperty( wxT("UIntProperty"), wxPG_LABEL, wxULongLong(wxULL(0xFEEEFEEEFEEE))));
|
pg->Append( new wxUIntProperty( wxT("UIntProperty"), wxPG_LABEL, wxULongLong(wxULL(0xFEEEFEEEFEEE))));
|
||||||
|
#else
|
||||||
|
pg->Append( new wxUIntProperty( wxT("UIntProperty"), wxPG_LABEL, 0xFEEEFEEE));
|
||||||
|
#endif
|
||||||
pg->SetPropertyAttribute( wxT("UIntProperty"), wxPG_UINT_PREFIX, wxPG_PREFIX_NONE );
|
pg->SetPropertyAttribute( wxT("UIntProperty"), wxPG_UINT_PREFIX, wxPG_PREFIX_NONE );
|
||||||
pg->SetPropertyAttribute( wxT("UIntProperty"), wxPG_UINT_BASE, wxPG_BASE_HEX );
|
pg->SetPropertyAttribute( wxT("UIntProperty"), wxPG_UINT_BASE, wxPG_BASE_HEX );
|
||||||
//pg->SetPropertyAttribute( wxT("UIntProperty"), wxPG_UINT_PREFIX, wxPG_PREFIX_NONE );
|
//pg->SetPropertyAttribute( wxT("UIntProperty"), wxPG_UINT_PREFIX, wxPG_PREFIX_NONE );
|
||||||
|
@@ -671,9 +671,15 @@ bool FormMain::RunTests( bool fullTest, bool interactive )
|
|||||||
RT_FAILURE();
|
RT_FAILURE();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if wxUSE_LONGLONG && defined(wxLongLong_t)
|
||||||
pgman->SetPropertyValue(wxT("IntProperty"),wxLL(10000000000));
|
pgman->SetPropertyValue(wxT("IntProperty"),wxLL(10000000000));
|
||||||
if ( pg->GetPropertyValueAsLongLong(wxT("IntProperty")) != wxLL(10000000000) )
|
if ( pg->GetPropertyValueAsLongLong(wxT("IntProperty")) != wxLL(10000000000) )
|
||||||
RT_FAILURE();
|
RT_FAILURE();
|
||||||
|
#else
|
||||||
|
pgman->SetPropertyValue(wxT("IntProperty"),1000000000);
|
||||||
|
if ( pg->GetPropertyValueAsLong(wxT("IntProperty")) != 1000000000 )
|
||||||
|
RT_FAILURE();
|
||||||
|
#endif
|
||||||
|
|
||||||
pg->SetPropertyValue(wxT("StringProperty"),wxT("Text2"));
|
pg->SetPropertyValue(wxT("StringProperty"),wxT("Text2"));
|
||||||
pg->SetPropertyValue(wxT("IntProperty"),512);
|
pg->SetPropertyValue(wxT("IntProperty"),512);
|
||||||
@@ -721,9 +727,15 @@ bool FormMain::RunTests( bool fullTest, bool interactive )
|
|||||||
RT_FAILURE();
|
RT_FAILURE();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if wxUSE_LONGLONG && defined(wxLongLong_t)
|
||||||
pgman->SetPropertyValue(wxT("IntProperty"),wxLL(-80000000000));
|
pgman->SetPropertyValue(wxT("IntProperty"),wxLL(-80000000000));
|
||||||
if ( pgman->GetPropertyValueAsLongLong(wxT("IntProperty")) != wxLL(-80000000000) )
|
if ( pgman->GetPropertyValueAsLongLong(wxT("IntProperty")) != wxLL(-80000000000) )
|
||||||
RT_FAILURE();
|
RT_FAILURE();
|
||||||
|
#else
|
||||||
|
pgman->SetPropertyValue(wxT("IntProperty"),-1000000000);
|
||||||
|
if ( pgman->GetPropertyValueAsLong(wxT("IntProperty")) != -1000000000 )
|
||||||
|
RT_FAILURE();
|
||||||
|
#endif
|
||||||
|
|
||||||
// Make sure children of composite parent get updated as well
|
// Make sure children of composite parent get updated as well
|
||||||
// Original string value: "Lamborghini Diablo SV; 5707; [300; 3.9; 8.6] 300000; Not Convertible"
|
// Original string value: "Lamborghini Diablo SV; 5707; [300; 3.9; 8.6] 300000; Not Convertible"
|
||||||
|
Reference in New Issue
Block a user