reinterpret_cast also does not compile as I suspected.
../../../../../../../trunk/src/plugins/contrib/wxSmith/wxwidgets/properties/wxscolourproperty.cpp: In member function 'void {anonymous}::wxsMyColourPropertyClass::Init(int, const wxColour&)':
../../../../../../../trunk/src/plugins/contrib/wxSmith/wxwidgets/properties/wxscolourproperty.cpp:210:37: warning: 'wxPGProperty::FlagType' is deprecated: use wxPGFlags type instead [-Wdeprecated-declarations]
210 | m_flags |= reinterpret_cast<FlagType>(wxPG_PROP_STATIC_CHOICES); // Colour selection cannot be changed.
| ^~~~~~~~
In file included from /opt/wx/include/wx-3.3/wx/propgrid/propgrid.h:21,
from ../../../../../../../trunk/src/plugins/contrib/wxSmith/wxwidgets/properties/../../properties/wxsproperty.h:34,
from ../../../../../../../trunk/src/plugins/contrib/wxSmith/wxwidgets/properties/../../properties/wxsproperties.h:8,
from ../../../../../../../trunk/src/plugins/contrib/wxSmith/wxwidgets/properties/wxscolourproperty.h:28,
from ../../../../../../../trunk/src/plugins/contrib/wxSmith/wxwidgets/properties/wxscolourproperty.cpp:23:
/opt/wx/include/wx-3.3/wx/propgrid/property.h:1038:22: note: declared here
1038 | typedef wxUint32 FlagType;
| ^~~~~~~~
../../../../../../../trunk/src/plugins/contrib/wxSmith/wxwidgets/properties/wxscolourproperty.cpp:210:20: error: invalid cast from type 'int' to type 'wxPGProperty::FlagType' {aka 'unsigned int'}
210 | m_flags |= reinterpret_cast<FlagType>(wxPG_PROP_STATIC_CHOICES); // Colour selection cannot be changed.
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../../../../trunk/src/plugins/contrib/wxSmith/wxwidgets/properties/wxscolourproperty.cpp:211:37: warning: 'wxPGProperty::FlagType' is deprecated: use wxPGFlags type instead [-Wdeprecated-declarations]
211 | m_flags |= reinterpret_cast<FlagType>(wxPG_PROP_STATIC_CHOICES); // Colour selection cannot be changed.
| ^~~~~~~~
/opt/wx/include/wx-3.3/wx/propgrid/property.h:1038:22: note: declared here
1038 | typedef wxUint32 FlagType;
| ^~~~~~~~
../../../../../../../trunk/src/plugins/contrib/wxSmith/wxwidgets/properties/wxscolourproperty.cpp:211:20: error: invalid cast from type 'int' to type 'wxPGProperty::FlagType' {aka 'unsigned int'}
211 | m_flags |= reinterpret_cast<FlagType>(wxPG_PROP_STATIC_CHOICES); // Colour selection cannot be changed.
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../../../../trunk/src/plugins/contrib/wxSmith/wxwidgets/properties/wxscolourproperty.cpp: In member function 'virtual void {anonymous}::wxsMyColourPropertyClass::OnCustomPaint(wxDC&, const wxRect&, wxPGPaintData&)':
../../../../../../../trunk/src/plugins/contrib/wxSmith/wxwidgets/properties/wxscolourproperty.cpp:589:48: warning: 'wxPGProperty::FlagType' is deprecated: use wxPGFlags type instead [-Wdeprecated-declarations]
589 | else if ( !(m_flags & reinterpret_cast<FlagType>(wxPG_PROP_UNSPECIFIED)) )
| ^~~~~~~~
/opt/wx/include/wx-3.3/wx/propgrid/property.h:1038:22: note: declared here
1038 | typedef wxUint32 FlagType;
| ^~~~~~~~
../../../../../../../trunk/src/plugins/contrib/wxSmith/wxwidgets/properties/wxscolourproperty.cpp:589:31: error: invalid cast from type 'wxPG_EX_WINDOW_STYLES' to type 'wxPGProperty::FlagType' {aka 'unsigned int'}
589 | else if ( !(m_flags & reinterpret_cast<FlagType>(wxPG_PROP_UNSPECIFIED)) )
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../../../../trunk/src/plugins/contrib/wxSmith/wxwidgets/properties/wxscolourproperty.cpp: In member function 'virtual bool {anonymous}::wxsMyColourPropertyClass::StringToValue(wxVariant&, const wxString&, int) const':
../../../../../../../trunk/src/plugins/contrib/wxSmith/wxwidgets/properties/wxscolourproperty.cpp:674:57: warning: 'virtual bool wxEnumProperty::StringToValue(wxVariant&, const wxString&, int) const' is deprecated: use StringToValue with 'flags' argument as wxPGPropValFormatFlags [-Wdeprecated-declarations]
674 | bool res = wxEnumProperty::StringToValue(value, colourName, argFlags);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /opt/wx/include/wx-3.3/wx/propgrid/propgrid.h:2210:
/opt/wx/include/wx-3.3/wx/propgrid/props.h:519:18: note: declared here
519 | virtual bool StringToValue(wxVariant& variant, const wxString& text,
| ^~~~~~~~~~~~~
make[7]: *** [Makefile:677: wxscolourproperty.lo] Fehler 1
wxCHECK_VERSION seems to be used quite often in cb. Where do I find the minimum required version? Can't find it at first glance.
In case it is wxCHECK_VERSION(3, 0, 0) anyway, shouldn't those conditionals be updated, that is eliminated? I also like backwards
compatibility for some not too short time. That allows to update dependent projects like cb on their own pace and stepwise instead of
a big bang. Nice if indicated by [[deprecated]] and tools like clang-tidy [-modernize-...].
Thanks for the active contributions.