Vadim Zeitlin pushed to branch master at wxWidgets / wxWidgets
Commits:
aa5b929e by Vadim Zeitlin at 2026-05-23T16:58:14+02:00
Revert "Use wxDEPRECATED_BUT_USED_INTERNALLY_MSG() in wxPG headers"
This reverts commit 2d8898b02c06dc47209407ca6535f5228c9b53d6 because it
doesn't really solve the problem with deprecation warnings given by the
latest version of MSVS 2026 and these warnings will be fixed in a better
way by the upcoming commits.
- - - - -
e3b05163 by Vadim Zeitlin at 2026-05-23T18:17:30+02:00
Don't override deprecated wxPGProperty virtual functions
This provokes MSVS 2026 warnings about using deprecated functions (which
makes sense, as overriding a function is a kind of use) and just seems
unnecessary as the only point of these overrides seems to be to prevent
the base class function from being hidden -- but this can be achieved
more clearly and simpler by a using declaration.
- - - - -
615a020c by Vadim Zeitlin at 2026-05-23T18:17:30+02:00
Don't use deprecated constants in wx own code
They were used for implementing deprecated functions and resulted in
warnings about using them -- avoid this by using their value instead,
it's not going to change and this code will be removed relatively soon
anyhow.
- - - - -
33e192f5 by Vadim Zeitlin at 2026-05-23T18:17:30+02:00
Test WXWIN_COMPATIBILITY_3_0=1 in MSVS CI jobs
Stop disabling WXWIN_COMPATIBILITY_3_2 in MSVS 2026 build, as it
shouldn't be necessary after the last commit, but do add a build with
WXWIN_COMPATIBILITY_3_0=1 as it can be useful to check that the library
still builds correctly with deprecated functions enabled.
- - - - -
294a364b by Vadim Zeitlin at 2026-05-23T18:36:54+02:00
Merge branch 'msvs2026-propgrid-depr'
Fix MSVS 2026 deprecation warnings in wxPG headers in a better way.
See #26502.
- - - - -
5 changed files:
- .github/workflows/ci_msw.yml
- include/wx/propgrid/advprops.h
- include/wx/propgrid/property.h
- include/wx/propgrid/props.h
- src/propgrid/props.cpp
Changes:
=====================================
.github/workflows/ci_msw.yml
=====================================
@@ -80,6 +80,7 @@ jobs:
compiler: vs2022
compiler_suffix: vc17.sln
use_cxx20: true
+ use_compat_3_0: true
- configuration: 'DLL Release'
use_std_string: true
platform: 'x64'
@@ -92,7 +93,6 @@ jobs:
compiler: vs2026
compiler_suffix: vc18.slnx
use_cxx20: true
- no_compat_3_2: true
steps:
- name: Checkout
@@ -105,11 +105,13 @@ jobs:
run: |
$use_std_string = "${{ matrix.use_std_string }}" ? 1 : 0
$use_utf8 = "${{ matrix.use_utf8 }}" ? 1 : 0
+ $use_compat_3_0 = "${{ matrix.use_compat_3_0 }}" ? 1 : 0
$no_compat_3_2 = "${{ matrix.no_compat_3_2 }}" ? 1 : 0
- if ( $use_std_string -or $use_utf8 -or $no_compat_3_2 ) {
+ if ( $use_std_string -or $use_utf8 -or $use_compat_3_0 -or $no_compat_3_2 ) {
$use_compat_3_2 = 1 - $no_compat_3_2
$txt = Get-Content setup.h
Write-Output $txt |
+ %{$_ -replace "define WXWIN_COMPATIBILITY_3_0 0", "define WXWIN_COMPATIBILITY_3_0 $use_compat_3_0"} |
%{$_ -replace "define WXWIN_COMPATIBILITY_3_2 1", "define WXWIN_COMPATIBILITY_3_2 $use_compat_3_2"} |
%{$_ -replace "define wxUSE_STD_STRING_CONV_IN_WXSTRING 0", "define wxUSE_STD_STRING_CONV_IN_WXSTRING $use_std_string"} |
%{$_ -replace "define wxUSE_UNICODE_UTF8 0", "define wxUSE_UNICODE_UTF8 $use_utf8"} |
=====================================
include/wx/propgrid/advprops.h
=====================================
@@ -136,14 +136,6 @@ public:
const wxFont& value = wxFont());
virtual ~wxFontProperty() = default;
virtual void OnSetValue() override;
-#if WXWIN_COMPATIBILITY_3_2
- wxDEPRECATED_MSG("use ValueToString with 'flags' argument as wxPGPropValFormatFlags")
- virtual wxString ValueToString(wxVariant& value, int flags) const override
- {
- m_oldValueToStringCalled = true;
- return ValueToString(value, static_cast<wxPGPropValFormatFlags>(flags));
- }
-#endif // WXWIN_COMPATIBILITY_3_2
virtual wxString ValueToString(wxVariant& value,
wxPGPropValFormatFlags flags = wxPGPropValFormatFlags::Null) const override;
virtual wxVariant ChildChanged( wxVariant& thisValue,
@@ -151,6 +143,10 @@ public:
wxVariant& childValue ) const override;
virtual void RefreshChildren() override;
+#if WXWIN_COMPATIBILITY_3_2
+ using wxEditorDialogProperty::ValueToString;
+#endif // WXWIN_COMPATIBILITY_3_2
+
protected:
virtual bool DisplayEditorDialog(wxPropertyGrid* pg, wxVariant& value) override;
};
@@ -176,15 +172,6 @@ public:
virtual ~wxSystemColourProperty() = default;
virtual void OnSetValue() override;
-#if WXWIN_COMPATIBILITY_3_2
- wxDEPRECATED_MSG("use IntToValue with 'flags' argument as wxPGPropValFormatFlags")
- virtual bool IntToValue(wxVariant& variant, int number,
- int flags) const override
- {
- m_oldIntToValueCalled = true;
- return IntToValue(variant, number, static_cast<wxPGPropValFormatFlags>(flags));
- }
-#endif // WXWIN_COMPATIBILITY_3_2
virtual bool IntToValue(wxVariant& variant, int number,
wxPGPropValFormatFlags flags = wxPGPropValFormatFlags::Null) const override;
@@ -209,25 +196,8 @@ public:
// (default is last).
virtual int GetCustomColourIndex() const;
-#if WXWIN_COMPATIBILITY_3_2
- wxDEPRECATED_BUT_USED_INTERNALLY_MSG("use ValueToString with 'flags' argument as wxPGPropValFormatFlags")
- virtual wxString ValueToString(wxVariant& value, int flags) const override
- {
- m_oldValueToStringCalled = true;
- return ValueToString(value, static_cast<wxPGPropValFormatFlags>(flags));
- }
-#endif // WXWIN_COMPATIBILITY_3_2
virtual wxString ValueToString(wxVariant& value,
wxPGPropValFormatFlags flags = wxPGPropValFormatFlags::Null) const override;
-#if WXWIN_COMPATIBILITY_3_2
- wxDEPRECATED_MSG("use StringToValue with 'flags' argument as wxPGPropValFormatFlags")
- virtual bool StringToValue(wxVariant& variant, const wxString& text,
- int flags) const override
- {
- m_oldStringToValueCalled = true;
- return StringToValue(variant, text, static_cast<wxPGPropValFormatFlags>(flags));
- }
-#endif // WXWIN_COMPATIBILITY_3_2
virtual bool StringToValue(wxVariant& variant, const wxString& text,
wxPGPropValFormatFlags flags = wxPGPropValFormatFlags::Null) const override;
virtual bool OnEvent( wxPropertyGrid* propgrid,
@@ -246,6 +216,12 @@ public:
wxColourPropertyValue GetVal( const wxVariant* pVariant = nullptr ) const;
+#if WXWIN_COMPATIBILITY_3_2
+ using wxEnumProperty::IntToValue;
+ using wxEnumProperty::StringToValue;
+ using wxEnumProperty::ValueToString;
+#endif // WXWIN_COMPATIBILITY_3_2
+
protected:
// Special constructors to be used by derived classes.
@@ -285,18 +261,14 @@ public:
const wxColour& value = *wxWHITE );
virtual ~wxColourProperty() = default;
-#if WXWIN_COMPATIBILITY_3_2
- wxDEPRECATED_MSG("use ValueToString with 'flags' argument as wxPGPropValFormatFlags")
- virtual wxString ValueToString(wxVariant& value, int flags) const override
- {
- m_oldValueToStringCalled = true;
- return ValueToString(value, static_cast<wxPGPropValFormatFlags>(flags));
- }
-#endif // WXWIN_COMPATIBILITY_3_2
virtual wxString ValueToString(wxVariant& value,
wxPGPropValFormatFlags flags = wxPGPropValFormatFlags::Null) const override;
virtual wxColour GetColour( int index ) const override;
+#if WXWIN_COMPATIBILITY_3_2
+ using wxSystemColourProperty::ValueToString;
+#endif // WXWIN_COMPATIBILITY_3_2
+
protected:
virtual wxVariant DoTranslateVal( wxColourPropertyValue& v ) const override;
@@ -316,19 +288,15 @@ class WXDLLIMPEXP_PROPGRID wxCursorProperty : public wxEnumProperty
int value = 0 );
virtual ~wxCursorProperty() = default;
-#if WXWIN_COMPATIBILITY_3_2
- wxDEPRECATED_MSG("use ValueToString with 'flags' argument as wxPGPropValFormatFlags")
- virtual wxString ValueToString(wxVariant& value, int flags) const override
- {
- m_oldValueToStringCalled = true;
- return ValueToString(value, static_cast<wxPGPropValFormatFlags>(flags));
- }
-#endif // WXWIN_COMPATIBILITY_3_2
virtual wxString ValueToString(wxVariant& value,
wxPGPropValFormatFlags flags = wxPGPropValFormatFlags::Null) const override;
virtual wxSize OnMeasureImage( int item ) const override;
virtual void OnCustomPaint( wxDC& dc,
const wxRect& rect, wxPGPaintData& paintdata ) override;
+
+#if WXWIN_COMPATIBILITY_3_2
+ using wxEnumProperty::ValueToString;
+#endif // WXWIN_COMPATIBILITY_3_2
};
// -----------------------------------------------------------------------
@@ -395,25 +363,8 @@ public:
virtual ~wxMultiChoiceProperty() = default;
virtual void OnSetValue() override;
-#if WXWIN_COMPATIBILITY_3_2
- wxDEPRECATED_MSG("use ValueToString with 'flags' argument as wxPGPropValFormatFlags")
- virtual wxString ValueToString(wxVariant& value, int flags) const override
- {
- m_oldValueToStringCalled = true;
- return ValueToString(value, static_cast<wxPGPropValFormatFlags>(flags));
- }
-#endif // WXWIN_COMPATIBILITY_3_2
virtual wxString ValueToString(wxVariant& value,
wxPGPropValFormatFlags flags = wxPGPropValFormatFlags::Null) const override;
-#if WXWIN_COMPATIBILITY_3_2
- wxDEPRECATED_MSG("use StringToValue with 'flags' argument as wxPGPropValFormatFlags")
- virtual bool StringToValue(wxVariant& variant, const wxString& text,
- int flags) const override
- {
- m_oldStringToValueCalled = true;
- return StringToValue(variant, text, static_cast<wxPGPropValFormatFlags>(flags));
- }
-#endif // WXWIN_COMPATIBILITY_3_2
virtual bool StringToValue(wxVariant& variant, const wxString& text,
wxPGPropValFormatFlags flags = wxPGPropValFormatFlags::Null) const override;
virtual bool DoSetAttribute( const wxString& name, wxVariant& value ) override;
@@ -423,6 +374,11 @@ public:
return m_choices.GetValuesForStrings(m_value.GetArrayString());
}
+#if WXWIN_COMPATIBILITY_3_2
+ using wxEditorDialogProperty::StringToValue;
+ using wxEditorDialogProperty::ValueToString;
+#endif // WXWIN_COMPATIBILITY_3_2
+
protected:
virtual bool DisplayEditorDialog(wxPropertyGrid* pg, wxVariant& value) override;
@@ -462,25 +418,8 @@ public:
virtual ~wxDateProperty() = default;
virtual void OnSetValue() override;
-#if WXWIN_COMPATIBILITY_3_2
- wxDEPRECATED_MSG("use ValueToString with 'flags' argument as wxPGPropValFormatFlags")
- virtual wxString ValueToString(wxVariant& value, int flags) const override
- {
- m_oldValueToStringCalled = true;
- return ValueToString(value, static_cast<wxPGPropValFormatFlags>(flags));
- }
-#endif // WXWIN_COMPATIBILITY_3_2
virtual wxString ValueToString(wxVariant& value,
wxPGPropValFormatFlags flags = wxPGPropValFormatFlags::Null) const override;
-#if WXWIN_COMPATIBILITY_3_2
- wxDEPRECATED_MSG("use ValueToString with 'flags' argument as wxPGPropValFormatFlags")
- virtual bool StringToValue(wxVariant& variant, const wxString& text,
- int flags) const override
- {
- m_oldStringToValueCalled = true;
- return StringToValue(variant, text, static_cast<wxPGPropValFormatFlags>(flags));
- }
-#endif // WXWIN_COMPATIBILITY_3_2
virtual bool StringToValue(wxVariant& variant, const wxString& text,
wxPGPropValFormatFlags flags = wxPGPropValFormatFlags::Null) const override;
@@ -513,6 +452,11 @@ public:
return m_dpStyle;
}
+#if WXWIN_COMPATIBILITY_3_2
+ using wxPGProperty::StringToValue;
+ using wxPGProperty::ValueToString;
+#endif // WXWIN_COMPATIBILITY_3_2
+
protected:
wxString m_format;
long m_dpStyle; // DatePicker style
=====================================
include/wx/propgrid/property.h
=====================================
@@ -2336,18 +2336,15 @@ public:
wxPGRootProperty( const wxString& name = wxS("<Root>") );
virtual ~wxPGRootProperty() = default;
-#if WXWIN_COMPATIBILITY_3_2
- wxDEPRECATED_MSG("use StringToValue with 'flags' argument as wxPGPropValFormatFlags")
- virtual bool StringToValue( wxVariant&, const wxString&, int ) const override
- {
- return false;
- }
-#endif // WXWIN_COMPATIBILITY_3_2
virtual bool StringToValue( wxVariant&, const wxString&, wxPGPropValFormatFlags ) const override
{
return false;
}
+#if WXWIN_COMPATIBILITY_3_2
+ using wxPGProperty::StringToValue;
+#endif // WXWIN_COMPATIBILITY_3_2
+
protected:
};
@@ -2369,24 +2366,13 @@ public:
int GetTextExtent( const wxWindow* wnd, const wxFont& font ) const;
-#if WXWIN_COMPATIBILITY_3_2
- wxDEPRECATED_MSG("use ValueToString with 'flags' argument as wxPGPropValFormatFlags")
- virtual wxString ValueToString(wxVariant& value, int flags) const override
- {
- m_oldValueToStringCalled = true;
- return ValueToString(value, static_cast<wxPGPropValFormatFlags>(flags));
- }
-#endif // WXWIN_COMPATIBILITY_3_2
virtual wxString ValueToString(wxVariant& value, wxPGPropValFormatFlags flags) const override;
+ virtual wxString GetValueAsString(wxPGPropValFormatFlags flags = wxPGPropValFormatFlags::Null) const override;
+
#if WXWIN_COMPATIBILITY_3_2
- wxDEPRECATED_MSG("use GetValueAsString with 'flags' argument as wxPGPropValFormatFlags")
- virtual wxString GetValueAsString(int flags) const override
- {
- m_oldGetValueAsString = true;
- return GetValueAsString(static_cast<wxPGPropValFormatFlags>(flags));
- }
+ using wxPGProperty::GetValueAsString;
+ using wxPGProperty::ValueToString;
#endif // WXWIN_COMPATIBILITY_3_2
- virtual wxString GetValueAsString(wxPGPropValFormatFlags flags = wxPGPropValFormatFlags::Null) const override;
protected:
void SetTextColIndex( unsigned int colInd )
=====================================
include/wx/propgrid/props.h
=====================================
@@ -99,26 +99,9 @@ public:
const wxString& value = wxString() );
virtual ~wxStringProperty() = default;
-#if WXWIN_COMPATIBILITY_3_2
- wxDEPRECATED_MSG("use ValueToString with 'flags' argument as wxPGPropValFormatFlags")
- virtual wxString ValueToString(wxVariant& value, int flags) const override
- {
- m_oldValueToStringCalled = true;
- return ValueToString(value, static_cast<wxPGPropValFormatFlags>(flags));
- }
-#endif // WXWIN_COMPATIBILITY_3_2
virtual wxString ValueToString(wxVariant& value,
wxPGPropValFormatFlags flags = wxPGPropValFormatFlags::Null) const override;
-#if WXWIN_COMPATIBILITY_3_2
- wxDEPRECATED_MSG("use StringToValue with 'flags' argument as wxPGPropValFormatFlags")
- virtual bool StringToValue( wxVariant& variant, const wxString& text,
- int flags ) const override
- {
- m_oldStringToValueCalled = true;
- return StringToValue(variant, text, static_cast<wxPGPropValFormatFlags>(flags));
- }
-#endif // WXWIN_COMPATIBILITY_3_2
virtual bool StringToValue(wxVariant& variant, const wxString& text,
wxPGPropValFormatFlags flags = wxPGPropValFormatFlags::Null) const override;
@@ -127,6 +110,13 @@ public:
// This is updated so "<composed>" special value can be handled.
virtual void OnSetValue() override;
+ // These using declarations are needed only to avoid hiding deprecated
+ // overloads of these functions in the base class.
+#if WXWIN_COMPATIBILITY_3_2
+ using wxPGProperty::ValueToString;
+ using wxPGProperty::StringToValue;
+#endif // WXWIN_COMPATIBILITY_3_2
+
protected:
};
@@ -230,43 +220,24 @@ public:
wxIntProperty( const wxString& label,
const wxString& name,
const wxLongLong& value );
-#if WXWIN_COMPATIBILITY_3_2
- wxDEPRECATED_MSG("use ValueToString with 'flags' argument as wxPGPropValFormatFlags")
- virtual wxString ValueToString(wxVariant& value, int flags) const override
- {
- m_oldValueToStringCalled = true;
- return ValueToString(value, static_cast<wxPGPropValFormatFlags>(flags));
- }
-#endif // WXWIN_COMPATIBILITY_3_2
virtual wxString ValueToString(wxVariant& value,
wxPGPropValFormatFlags flags = wxPGPropValFormatFlags::Null) const override;
-#if WXWIN_COMPATIBILITY_3_2
- wxDEPRECATED_MSG("use ValueToString with 'flags' argument as wxPGPropValFormatFlags")
- virtual bool StringToValue(wxVariant& variant, const wxString& text,
- int flags) const override
- {
- m_oldStringToValueCalled = true;
- return StringToValue(variant, text, static_cast<wxPGPropValFormatFlags>(flags));
- }
-#endif // WXWIN_COMPATIBILITY_3_2
virtual bool StringToValue(wxVariant& variant, const wxString& text,
wxPGPropValFormatFlags flags = wxPGPropValFormatFlags::Null) const override;
virtual bool ValidateValue( wxVariant& value,
wxPGValidationInfo& validationInfo ) const override;
-#if WXWIN_COMPATIBILITY_3_2
- wxDEPRECATED_MSG("use IntToValue with 'flags' argument as wxPGPropValFormatFlags")
- virtual bool IntToValue(wxVariant& variant, int number, int flags) const override
- {
- m_oldIntToValueCalled = true;
- return IntToValue(variant, number, static_cast<wxPGPropValFormatFlags>(flags));
- }
-#endif // WXWIN_COMPATIBILITY_3_2
virtual bool IntToValue(wxVariant& variant, int number,
wxPGPropValFormatFlags flags = wxPGPropValFormatFlags::Null) const override;
static wxValidator* GetClassValidator();
virtual wxValidator* DoGetValidator() const override;
virtual wxVariant AddSpinStepValue(long stepScale) const override;
+#if WXWIN_COMPATIBILITY_3_2
+ using wxPGProperty::IntToValue;
+ using wxPGProperty::StringToValue;
+ using wxPGProperty::ValueToString;
+#endif // WXWIN_COMPATIBILITY_3_2
+
private:
// Validation helpers.
static bool DoValidation( const wxNumericProperty* property,
@@ -294,44 +265,24 @@ public:
wxUIntProperty( const wxString& label,
const wxString& name,
const wxULongLong& value );
-#if WXWIN_COMPATIBILITY_3_2
- wxDEPRECATED_MSG("use ValueToString with 'flags' argument as wxPGPropValFormatFlags")
- virtual wxString ValueToString(wxVariant& value, int flags) const override
- {
- m_oldValueToStringCalled = true;
- return ValueToString(value, static_cast<wxPGPropValFormatFlags>(flags));
- }
-#endif // WXWIN_COMPATIBILITY_3_2
virtual wxString ValueToString(wxVariant& value,
wxPGPropValFormatFlags flags = wxPGPropValFormatFlags::Null) const override;
-#if WXWIN_COMPATIBILITY_3_2
- wxDEPRECATED_MSG("use StringToValue with 'flags' argument as wxPGPropValFormatFlags")
- virtual bool StringToValue(wxVariant& variant, const wxString& text,
- int flags) const override
- {
- m_oldStringToValueCalled = true;
- return StringToValue(variant, text, static_cast<wxPGPropValFormatFlags>(flags));
- }
-#endif // WXWIN_COMPATIBILITY_3_2
virtual bool StringToValue(wxVariant& variant, const wxString& text,
wxPGPropValFormatFlags flags = wxPGPropValFormatFlags::Null) const override;
virtual bool DoSetAttribute( const wxString& name, wxVariant& value ) override;
virtual bool ValidateValue( wxVariant& value,
wxPGValidationInfo& validationInfo ) const override;
virtual wxValidator* DoGetValidator () const override;
-#if WXWIN_COMPATIBILITY_3_2
- wxDEPRECATED_MSG("use IntToValue with 'flags' argument as wxPGPropValFormatFlags")
- virtual bool IntToValue(wxVariant& variant, int number,
- int flags) const override
- {
- m_oldIntToValueCalled = true;
- return IntToValue(variant, number, static_cast<wxPGPropValFormatFlags>(flags));
- }
-#endif // WXWIN_COMPATIBILITY_3_2
virtual bool IntToValue(wxVariant& variant, int number,
wxPGPropValFormatFlags flags = wxPGPropValFormatFlags::Null) const override;
virtual wxVariant AddSpinStepValue(long stepScale) const override;
+#if WXWIN_COMPATIBILITY_3_2
+ using wxPGProperty::IntToValue;
+ using wxPGProperty::StringToValue;
+ using wxPGProperty::ValueToString;
+#endif // WXWIN_COMPATIBILITY_3_2
+
protected:
wxByte m_base;
wxByte m_realBase; // translated to 8,16,etc.
@@ -362,25 +313,8 @@ public:
double value = 0.0 );
virtual ~wxFloatProperty() = default;
-#if WXWIN_COMPATIBILITY_3_2
- wxDEPRECATED_MSG("use ValueToString with 'flags' argument as wxPGPropValFormatFlags")
- virtual wxString ValueToString(wxVariant& value, int flags) const override
- {
- m_oldValueToStringCalled = true;
- return ValueToString(value, static_cast<wxPGPropValFormatFlags>(flags));
- }
-#endif // WXWIN_COMPATIBILITY_3_2
virtual wxString ValueToString(wxVariant& value,
wxPGPropValFormatFlags flags = wxPGPropValFormatFlags::Null) const override;
-#if WXWIN_COMPATIBILITY_3_2
- wxDEPRECATED_MSG("use StringToValue with 'flags' argument as wxPGPropValFormatFlags")
- virtual bool StringToValue(wxVariant& variant, const wxString& text,
- int flags) const override
- {
- m_oldStringToValueCalled = true;
- return StringToValue(variant, text, static_cast<wxPGPropValFormatFlags>(flags));
- }
-#endif // WXWIN_COMPATIBILITY_3_2
virtual bool StringToValue(wxVariant& variant, const wxString& text,
wxPGPropValFormatFlags flags = wxPGPropValFormatFlags::Null) const override;
virtual bool DoSetAttribute( const wxString& name, wxVariant& value ) override;
@@ -392,6 +326,11 @@ public:
virtual wxValidator* DoGetValidator () const override;
virtual wxVariant AddSpinStepValue(long stepScale) const override;
+#if WXWIN_COMPATIBILITY_3_2
+ using wxPGProperty::StringToValue;
+ using wxPGProperty::ValueToString;
+#endif // WXWIN_COMPATIBILITY_3_2
+
protected:
int m_precision;
@@ -415,38 +354,19 @@ public:
bool value = false );
virtual ~wxBoolProperty() = default;
-#if WXWIN_COMPATIBILITY_3_2
- wxDEPRECATED_MSG("use ValueToString with 'flags' argument as wxPGPropValFormatFlags")
- virtual wxString ValueToString(wxVariant& value, int flags) const override
- {
- m_oldValueToStringCalled = true;
- return ValueToString(value, static_cast<wxPGPropValFormatFlags>(flags));
- }
-#endif // WXWIN_COMPATIBILITY_3_2
virtual wxString ValueToString(wxVariant& value,
wxPGPropValFormatFlags flags = wxPGPropValFormatFlags::Null) const override;
-#if WXWIN_COMPATIBILITY_3_2
- wxDEPRECATED_MSG("use StringToValue with 'flags' argument as wxPGPropValFormatFlags")
- virtual bool StringToValue(wxVariant& variant, const wxString& text,
- int flags) const override
- {
- m_oldStringToValueCalled = true;
- return StringToValue(variant, text, static_cast<wxPGPropValFormatFlags>(flags));
- }
-#endif // WXWIN_COMPATIBILITY_3_2
virtual bool StringToValue(wxVariant& variant, const wxString& text,
wxPGPropValFormatFlags flags = wxPGPropValFormatFlags::Null) const override;
-#if WXWIN_COMPATIBILITY_3_2
- wxDEPRECATED_MSG("use IntToValue with 'flags' argument as wxPGPropValFormatFlags")
- virtual bool IntToValue(wxVariant& variant, int number, int flags) const override
- {
- m_oldIntToValueCalled = true;
- return IntToValue(variant, number, static_cast<wxPGPropValFormatFlags>(flags));
- }
-#endif // WXWIN_COMPATIBILITY_3_2
virtual bool IntToValue(wxVariant& variant, int number,
wxPGPropValFormatFlags flags = wxPGPropValFormatFlags::Null) const override;
virtual bool DoSetAttribute( const wxString& name, wxVariant& value ) override;
+
+#if WXWIN_COMPATIBILITY_3_2
+ using wxPGProperty::IntToValue;
+ using wxPGProperty::StringToValue;
+ using wxPGProperty::ValueToString;
+#endif // WXWIN_COMPATIBILITY_3_2
};
// -----------------------------------------------------------------------
@@ -505,24 +425,7 @@ public:
size_t GetItemCount() const { return m_choices.GetCount(); }
virtual void OnSetValue() override;
-#if WXWIN_COMPATIBILITY_3_2
- wxDEPRECATED_BUT_USED_INTERNALLY_MSG("use ValueToString with 'flags' argument as wxPGPropValFormatFlags")
- virtual wxString ValueToString(wxVariant& value, int flags) const override
- {
- m_oldValueToStringCalled = true;
- return ValueToString(value, static_cast<wxPGPropValFormatFlags>(flags));
- }
-#endif // WXWIN_COMPATIBILITY_3_2
virtual wxString ValueToString(wxVariant& value, wxPGPropValFormatFlags flags = wxPGPropValFormatFlags::Null) const override;
-#if WXWIN_COMPATIBILITY_3_2
- wxDEPRECATED_BUT_USED_INTERNALLY_MSG("use StringToValue with 'flags' argument as wxPGPropValFormatFlags")
- virtual bool StringToValue(wxVariant& variant, const wxString& text,
- int flags) const override
- {
- m_oldStringToValueCalled = true;
- return StringToValue(variant, text, static_cast<wxPGPropValFormatFlags>(flags));
- }
-#endif // WXWIN_COMPATIBILITY_3_2
virtual bool StringToValue(wxVariant& variant, const wxString& text,
wxPGPropValFormatFlags flags = wxPGPropValFormatFlags::Null) const override;
virtual bool ValidateValue( wxVariant& value,
@@ -530,14 +433,6 @@ public:
// If wxPGPropValFormatFlags::FullValue is not set in flags, then the value is interpreted
// as index to choices list. Otherwise, it is actual value.
-#if WXWIN_COMPATIBILITY_3_2
- wxDEPRECATED_BUT_USED_INTERNALLY_MSG("use IntToValue with 'flags' argument as wxPGPropValFormatFlags")
- virtual bool IntToValue(wxVariant& variant, int number, int flags) const override
- {
- m_oldIntToValueCalled = true;
- return IntToValue(variant, number, static_cast<wxPGPropValFormatFlags>(flags));
- }
-#endif // WXWIN_COMPATIBILITY_3_2
virtual bool IntToValue(wxVariant& variant, int number,
wxPGPropValFormatFlags flags = wxPGPropValFormatFlags::Null) const override;
@@ -552,6 +447,12 @@ public:
// this take advantage of it.
virtual int GetChoiceSelection() const override { return m_index; }
+#if WXWIN_COMPATIBILITY_3_2
+ using wxPGProperty::IntToValue;
+ using wxPGProperty::StringToValue;
+ using wxPGProperty::ValueToString;
+#endif // WXWIN_COMPATIBILITY_3_2
+
protected:
int GetIndex() const;
@@ -636,20 +537,15 @@ public:
virtual ~wxEditEnumProperty() = default;
void OnSetValue() override;
-#if WXWIN_COMPATIBILITY_3_2
- wxDEPRECATED_MSG("use StringToValue with 'flags' argument as wxPGPropValFormatFlags")
- bool StringToValue(wxVariant& variant, const wxString& text,
- int flags) const override
- {
- m_oldStringToValueCalled = true;
- return StringToValue(variant, text, static_cast<wxPGPropValFormatFlags>(flags));
- }
-#endif // WXWIN_COMPATIBILITY_3_2
bool StringToValue(wxVariant& variant, const wxString& text,
wxPGPropValFormatFlags flags = wxPGPropValFormatFlags::Null) const override;
bool ValidateValue(wxVariant& value,
wxPGValidationInfo& validationInfo) const override;
+#if WXWIN_COMPATIBILITY_3_2
+ using wxPGProperty::StringToValue;
+#endif // WXWIN_COMPATIBILITY_3_2
+
protected:
};
@@ -686,25 +582,8 @@ public:
virtual ~wxFlagsProperty () = default;
virtual void OnSetValue() override;
-#if WXWIN_COMPATIBILITY_3_2
- wxDEPRECATED_MSG("use ValueToString with 'flags' argument as wxPGPropValFormatFlags")
- virtual wxString ValueToString(wxVariant& value, int flags) const override
- {
- m_oldValueToStringCalled = true;
- return ValueToString(value, static_cast<wxPGPropValFormatFlags>(flags));
- }
-#endif // WXWIN_COMPATIBILITY_3_2
virtual wxString ValueToString(wxVariant& value,
wxPGPropValFormatFlags flags = wxPGPropValFormatFlags::Null) const override;
-#if WXWIN_COMPATIBILITY_3_2
- wxDEPRECATED_MSG("use StringToValue with 'flags' argument as wxPGPropValFormatFlags")
- virtual bool StringToValue(wxVariant& variant, const wxString& text,
- int flags) const override
- {
- m_oldStringToValueCalled = true;
- return StringToValue(variant, text, static_cast<wxPGPropValFormatFlags>(flags));
- }
-#endif // WXWIN_COMPATIBILITY_3_2
virtual bool StringToValue(wxVariant& variant, const wxString& text,
wxPGPropValFormatFlags flags) const override;
virtual wxVariant ChildChanged( wxVariant& thisValue,
@@ -722,6 +601,11 @@ public:
const wxString& GetLabel( size_t ind ) const
{ return m_choices.GetLabel(static_cast<unsigned int>(ind)); }
+#if WXWIN_COMPATIBILITY_3_2
+ using wxPGProperty::StringToValue;
+ using wxPGProperty::ValueToString;
+#endif // WXWIN_COMPATIBILITY_3_2
+
protected:
// Needed to properly mark changed sub-properties
long m_oldValue;
@@ -774,24 +658,7 @@ public:
virtual ~wxFileProperty() = default;
virtual void OnSetValue() override;
-#if WXWIN_COMPATIBILITY_3_2
- wxDEPRECATED_MSG("use ValueToString with 'flags' argument as wxPGPropValFormatFlags")
- virtual wxString ValueToString(wxVariant& value, int flags) const override
- {
- m_oldValueToStringCalled = true;
- return ValueToString(value, static_cast<wxPGPropValFormatFlags>(flags));
- }
-#endif // WXWIN_COMPATIBILITY_3_2
virtual wxString ValueToString(wxVariant& value, wxPGPropValFormatFlags flags = wxPGPropValFormatFlags::Null) const override;
-#if WXWIN_COMPATIBILITY_3_2
- wxDEPRECATED_MSG("use StringToValue with 'flags' argument as wxPGPropValFormatFlags")
- virtual bool StringToValue(wxVariant& variant, const wxString& text,
- int flags) const override
- {
- m_oldStringToValueCalled = true;
- return StringToValue(variant, text, static_cast<wxPGPropValFormatFlags>(flags));
- }
-#endif // WXWIN_COMPATIBILITY_3_2
virtual bool StringToValue(wxVariant& variant, const wxString& text,
wxPGPropValFormatFlags flags = wxPGPropValFormatFlags::Null) const override;
virtual bool DoSetAttribute( const wxString& name, wxVariant& value ) override;
@@ -802,6 +669,11 @@ public:
// Returns filename to file represented by current value.
wxFileName GetFileName() const;
+#if WXWIN_COMPATIBILITY_3_2
+ using wxEditorDialogProperty::StringToValue;
+ using wxEditorDialogProperty::ValueToString;
+#endif // WXWIN_COMPATIBILITY_3_2
+
protected:
virtual bool DisplayEditorDialog(wxPropertyGrid* pg, wxVariant& value) override;
@@ -831,28 +703,16 @@ public:
const wxString& value = wxString() );
virtual ~wxLongStringProperty() = default;
-#if WXWIN_COMPATIBILITY_3_2
- wxDEPRECATED_MSG("use ValueToString with 'flags' argument as wxPGPropValFormatFlags")
- virtual wxString ValueToString(wxVariant& value, int flags) const override
- {
- m_oldValueToStringCalled = true;
- return ValueToString(value, static_cast<wxPGPropValFormatFlags>(flags));
- }
-#endif // WXWIN_COMPATIBILITY_3_2
virtual wxString ValueToString(wxVariant& value,
wxPGPropValFormatFlags flags = wxPGPropValFormatFlags::Null) const override;
-#if WXWIN_COMPATIBILITY_3_2
- wxDEPRECATED_MSG("use StringToValue with 'flags' argument as wxPGPropValFormatFlags")
- virtual bool StringToValue(wxVariant& variant, const wxString& text,
- int flags) const override
- {
- m_oldStringToValueCalled = true;
- return StringToValue(variant, text, static_cast<wxPGPropValFormatFlags>(flags));
- }
-#endif // WXWIN_COMPATIBILITY_3_2
virtual bool StringToValue(wxVariant& variant, const wxString& text,
wxPGPropValFormatFlags flags = wxPGPropValFormatFlags::Null) const override;
+#if WXWIN_COMPATIBILITY_3_2
+ using wxEditorDialogProperty::StringToValue;
+ using wxEditorDialogProperty::ValueToString;
+#endif // WXWIN_COMPATIBILITY_3_2
+
protected:
virtual bool DisplayEditorDialog(wxPropertyGrid* pg, wxVariant& value) override;
};
@@ -870,25 +730,8 @@ public:
const wxString& value = wxString() );
virtual ~wxDirProperty() = default;
-#if WXWIN_COMPATIBILITY_3_2
- wxDEPRECATED_MSG("use ValueToString with 'flags' argument as wxPGPropValFormatFlags")
- virtual wxString ValueToString(wxVariant& value, int flags) const override
- {
- m_oldValueToStringCalled = true;
- return ValueToString(value, static_cast<wxPGPropValFormatFlags>(flags));
- }
-#endif // WXWIN_COMPATIBILITY_3_2
virtual wxString ValueToString(wxVariant& value,
wxPGPropValFormatFlags flags = wxPGPropValFormatFlags::Null) const override;
-#if WXWIN_COMPATIBILITY_3_2
- wxDEPRECATED_MSG("use StringToValue with 'flags' argument as wxPGPropValFormatFlags")
- virtual bool StringToValue(wxVariant& variant, const wxString& text,
- int flags) const override
- {
- m_oldStringToValueCalled = true;
- return StringToValue(variant, text, static_cast<wxPGPropValFormatFlags>(flags));
- }
-#endif // WXWIN_COMPATIBILITY_3_2
virtual bool StringToValue(wxVariant& variant, const wxString& text,
wxPGPropValFormatFlags flags = wxPGPropValFormatFlags::Null) const override;
#if WXWIN_COMPATIBILITY_3_0
@@ -896,6 +739,11 @@ public:
#endif // WXWIN_COMPATIBILITY_3_0
virtual wxValidator* DoGetValidator() const override;
+#if WXWIN_COMPATIBILITY_3_2
+ using wxEditorDialogProperty::StringToValue;
+ using wxEditorDialogProperty::ValueToString;
+#endif // WXWIN_COMPATIBILITY_3_2
+
protected:
virtual bool DisplayEditorDialog(wxPropertyGrid* pg, wxVariant& value) override;
};
@@ -913,25 +761,8 @@ public:
virtual ~wxArrayStringProperty() = default;
virtual void OnSetValue() override;
-#if WXWIN_COMPATIBILITY_3_2
- wxDEPRECATED_MSG("use ValueToString with 'flags' argument as wxPGPropValFormatFlags")
- virtual wxString ValueToString(wxVariant& value, int flags) const override
- {
- m_oldValueToStringCalled = true;
- return ValueToString(value, static_cast<wxPGPropValFormatFlags>(flags));
- }
-#endif // WXWIN_COMPATIBILITY_3_2
virtual wxString ValueToString(wxVariant& value,
wxPGPropValFormatFlags flags = wxPGPropValFormatFlags::Null) const override;
-#if WXWIN_COMPATIBILITY_3_2
- wxDEPRECATED_MSG("use StringToValue with 'flags' argument as wxPGPropValFormatFlags")
- virtual bool StringToValue(wxVariant& variant, const wxString& text,
- int flags) const override
- {
- m_oldStringToValueCalled = true;
- return StringToValue(variant, text, static_cast<wxPGPropValFormatFlags>(flags));
- }
-#endif // WXWIN_COMPATIBILITY_3_2
virtual bool StringToValue(wxVariant& variant, const wxString& text,
wxPGPropValFormatFlags flags = wxPGPropValFormatFlags::Null) const override;
virtual bool DoSetAttribute( const wxString& name, wxVariant& value ) override;
@@ -982,6 +813,11 @@ public:
static wxString ArrayStringToString(const wxArrayString& src,
wxUniChar delimiter, int flags);
+#if WXWIN_COMPATIBILITY_3_2
+ using wxEditorDialogProperty::StringToValue;
+ using wxEditorDialogProperty::ValueToString;
+#endif // WXWIN_COMPATIBILITY_3_2
+
protected:
virtual bool DisplayEditorDialog(wxPropertyGrid* pg, wxVariant& value) override;
=====================================
src/propgrid/props.cpp
=====================================
@@ -1780,7 +1780,7 @@ bool wxDirProperty::DisplayEditorDialog(wxPropertyGrid* pg, wxVariant& value)
#if WXWIN_COMPATIBILITY_3_0
bool wxDirProperty::DoSetAttribute(const wxString& name, wxVariant& value)
{
- if ( name == wxPG_DIR_DIALOG_MESSAGE )
+ if ( name == "DialogMessage" ) // wxPG_DIR_DIALOG_MESSAGE is deprecated
{
m_dlgTitle = value.GetString();
return true;
@@ -2026,7 +2026,7 @@ bool wxFileProperty::DoSetAttribute( const wxString& name, wxVariant& value )
return true;
}
#if WXWIN_COMPATIBILITY_3_0
- else if ( name == wxPG_FILE_DIALOG_TITLE )
+ else if ( name == "DialogTitle" ) // wxPG_FILE_DIALOG_TITLE is deprecated
{
m_dlgTitle = value.GetString();
return true;
View it on GitLab:
https://gitlab.com/wxwidgets/wxwidgets/-/compare/5bc58ae3d1a844dae30e77be3812d95c566c14f5...294a364b487a3f1cf9b0469e4dde7b82ff9bbfbe
--
View it on GitLab:
https://gitlab.com/wxwidgets/wxwidgets/-/compare/5bc58ae3d1a844dae30e77be3812d95c566c14f5...294a364b487a3f1cf9b0469e4dde7b82ff9bbfbe
You're receiving this email because of your account on
gitlab.com. Manage all notifications:
https://gitlab.com/-/profile/notifications | Help:
https://gitlab.com/help