Merge branch 'explicit-image-from-xpm'

Make wxImage ctor from XPM data explicit to avoid surprising behaviour.

See https://github.com/wxWidgets/wxWidgets/pull/2332

Closes #19149.
This commit is contained in:
Vadim Zeitlin
2021-04-20 00:19:24 +01:00
19 changed files with 150 additions and 15 deletions

View File

@@ -190,6 +190,17 @@ public:
*/
wxCursor(const wxImage& image);
/**
Constructs a cursor from XPM data.
In versions of wxWidgets until 3.1.6 constructing wxCursor from XPM
data implicitly used wxImage constructor from XPM data and wxCursor
constructor from wxImage. Since 3.1.6 this constructor overload is
available to allow constructing wxCursor from XPM to still work, even
though wxImage constructor from XPM is now @c explicit.
*/
wxCursor(const char* const* xpmData);
/**
Copy constructor, uses @ref overview_refcount "reference counting".

View File

@@ -611,8 +611,10 @@ public:
@beginWxPerlOnly
Not supported by wxPerl.
@endWxPerlOnly
This constructor has become @c explicit in wxWidgets 3.1.6.
*/
wxImage(const char* const* xpmData);
explicit wxImage(const char* const* xpmData);
/**
Creates an image from a file.