Also document the need for using WX_CLEAR_LIST() when converting a
list-valued wxVariant to wxAny.
Note that we intentionally don't fix the problem by clearing the list
automatically, even if it could be done, because this would silently
break the existing code which does already clear the list -- and now
would attempt to clear it twice, with fatal consequences. Instead
document the existing behaviour and explain how to avoid memory leaks.
We're not interested in these (one off) leaks and can't do anything
about them anyhow, so just provide a way too suppress leak sanitizer
errors about them.
Remove the unnecessary, and actually harmful, overridden GetProduct(),
as we must delete the pointer returned by the base class version to
avoid leaking it.
Also use wxScopedPtr to avoid leaking a test wxHtmlContainerCell.
Add the sizer item to the sizers items list only after calling of
wxWindowBase::SetContainingSizer() because it can throw (if it asserts
and the assert handler throws an exception, as happens in our own unit
tests) and then the sizer item would be kept in the sizers items list
but m_containingSizer wouldn't be set for the window.
This reverts the changes of 4dc78a33e0 (Fix adding items to a never
opened branch of generic wxDataViewCtrl, 2018-01-17) which was supposed
to fix a problem which doesn't seem to be reproducible any longer (and,
unfortunately, wasn't recorded in the commit message back then), but
introduced another problem instead: postponing adding the node to the
tree didn't work correctly in case of depth-first model traversal in the
user code calling ItemAdded() for all the items, as in this case the
next call to ItemAdded() for a child of the item that wasn't added to
the tree because its parent hadn't been opened yet, would result in
adding this item and all its siblings to the tree when FindNode(parent)
would be called. And this, in turn, would result in the siblings of this
item being added to the tree twice.
Adding a test reproducing this problem is difficult, as we don't have
any way to check the internal state of wxDataViewMainWindow from the
outside, so this commit still doesn't do this, unfortunately.
Closes#18405.
GetItemByRow() returned a valid row even for an item which was collapsed
which is clearly inappropriate for its use in GetItemRect(), which is
supposed return an invalid rectangle if the item is not visible. It also
might be inappropriate in other cases, but this is not totally clear and
it seems like it is supposed to return a valid row even for collapsed
items at least sometimes, so just make its behaviour conditional by
adding a new flags parameter to GetItemRect() and to Walker() helper
used by it itself, so that it could skip over collapsed items.
Update the test to show that it succeeds now even when the item is
present in the tree, as it only passed before because the item had never
been expanded at all, and so wasn't really present in the tree
structure and the updated test would have failed without the changes to
the code in this commit.
Most of them can't be expected to work, e.g. non-ASCII file names can't
be supported without Unicode support.
Some others, e.g. test for NULs in wxDataOutputStream, are questionable,
as it seems that it might be possible to fix them in ANSI build too, but
for now just do the simplest thing to make the tests pass on Travis.
This reverts WX_ATTRIBUTE_FORMAT() added in 36c5884acb (Generalize
WX_ATTRIBUTE_PRINTF to WX_ATTRIBUTE_FORMAT, 2020-08-30) as it can't be
used with the format parameter of "const wxString&" type.
Closes https://github.com/wxWidgets/wxWidgets/pull/2091
Append "-limm32" after the monolithic library, otherwise it's not taken
into account when the linker encounters it because there is no
dependency on it yet.
This should finally complete 68feb3e7ff (Fix linking monolithic wxMSW
DLL after STC IME changes, 2020-05-31).
See https://github.com/wxWidgets/wxWidgets/pull/1852Closes#18776.
This class is redundant with wxAffineMatrix2D, which is actually used by
the library itself and documented, so it gets to stay, while this one is
scheduled for removal.
Closes https://github.com/wxWidgets/wxWidgets/pull/2083Closes#13114.
Remove support for Borland C++ compiler, it wasn't tested since a long
time and probably didn't work anyhow and there was no interest in
keeping support for it since many years.
See https://github.com/wxWidgets/wxWidgets/pull/2087
This fixes a regression introduced in f646532889 (Call
wxAuiManager::UnInit() if associated frame is destroyed, 2020-07-18)
since when children of a window managed by wxAuiManager didn't receive
wxEVT_DESTROY any more because the manager intercepted it for its own
needs.
Closes#18938.
Just fix a warning about assigning -1 to a size_t variable introduced in
the recent commit 1e435d2347 (Fix wxTextInputStream incorrectly decoding
multibyte fallback encodings, 2020-09-28).
No real changes.