This shouldn't be done unconditionally, trace mask can always be enabled
using WXTRACE environment variable from outside the test.
Also remove a useless tracing message.
The solution with specializing std::iter_swap() for wxString::iterator
was not conforming as the iterator was still not swappable, as it is
required to be.
Fix this by providing std::swap() overload for wxString::iterator, which
is correct and even simpler.
This allows std::reverse(s.begin(), s.end()) work with clang too and
incidentally avoids warnings about the code relying on non-conforming
extensions with MSVS 2017 which were due to the fact that iter_swap()
workaround wasn't enabled for it, while the new swap() overload is.
These functions were never used anywhere and their meaning was not
clear, so just drop them.
Also remove the now unused "tested" member and "WAIT_DURATION" constant.
Use CallAfter() to perform idle-time initialization, this is shorter and
simpler than dealing with the idle events explicitly.
Unfortunately the remaining use of idle events can't be avoided, explain
the reasons for this in a comment.
Just bind the idle events we want to execute dynamically instead.
This is already more clear and robust than the old version, but will be
simplified event further in the next commit.
This reverts commit a05ae051d8 and allows
to correctly decode UTF-8 output of child processes again.
Also add a (disabled by default) test allowing to verify that this does
work now.
Closes#14720, #18382.
Don't assert in wxBoxSizer when both alignment flags and wxEXPAND are
used together if wxSHAPED is also used, as such flag combinations may
make sense and so shouldn't be forbidden.
Add a unit test checking that this is allowed.
Resetting the insertion point position to 0 after calling
wxTextCtrl::SetValue() or ChangeValue() which didn't really change the
control contents was unexpected, as such calls are supposed to be
"optimized away", and this was indeed the case under wxMSW and wxOSX,
but not in wxGTK.
So change wxGTK to follow the other ports, add a unit test checking for
this behaviour and officially document it.
As a side effect, this ensures that the numeric validator classes don't
reset the insertion point position to 0 on every focus loss under wxGTK,
as happened before.
With wxSTC, popup autocompletion lists and call tips need to be able to
show their information and respond to mouse clicks, but should never
take focus from their parent STC. This test verifies that these popups
function in this manner.
In wxMSW, a focused wxRadioButton is always checked, which meant that
checking a wxRadioButton while focus was not in the window containing it
and later giving the focus to that window could uncheck it by giving
focus to another wxRadioButton that had had it previously.
Fix this by adding WXSetPendingFocus() to wxMSW wxWindow and calling it
from wxRadioButton::SetValue() to ensure that when the focus is
regained, it goes to the newly checked radio button and not some other
one.
This replaces the previously used, for the same purpose, wxMSW-specific
wxTopLevelWindow::SetLastFocus(), so while this solution is not exactly
pretty, it's not worse than we had before, while being more generic.
Also add a unit test checking that things work correctly in the scenario
described above.
Closes https://github.com/wxWidgets/wxWidgets/pull/1257Closes#18341.
Add a unit test for a special case of a wrap sizer min size caclulation.
Test wxWrapSizer::CalcMinFromMinor function for this case, when a wrap
sizer used inside a sizer with the same alignment.
Don't recognize the "path" following the port number without a slash as
a path, this is invalid according to the RFC.
Also require two leading slashes for URIs without the authority part.
This allows the subsequent tests to still run even if one of the tests
fails, which is more useful in this test than CPPUNIT_ASSERT_EQUAL(),
which maps to REQUIRE() and so stops the test execution as soon as any
check fails, because the tests are independent.
Don't let wxNotebook created in the recently added test for the events
generated when adding pages to it continue to live after the test end as
this breaks the subsequent tests using wxUIActionSimulator (but only
when using MinGW, for some reason).
There were many dozens of such warnings given for the various arrays
used in the tests and it just doesn't seem feasible nor desirable to fix
them all, so just suppress the warnings for all these arrays to get rid
of them with recent (7+?) versions of gcc.
Harmonize events sent by wxNotebook::AddPage(): they are now sent only
when adding any page except the first one if it is selected in all
ports.
See https://github.com/wxWidgets/wxWidgets/pull/1192
No real changes, just clean up sources by removing trailing spaces from
all the non-generated files.
This should hopefully avoid future commits mixing significant changes
with insignificant whitespace ones.
After the addition of EventCounter::WaitEvent() call in the previous
commit these checks pass as well (with another WaitEvent() added to wait
for deactivation event as well).
We already had WX_ASSERT_EVENT_OCCURS_IN macro and a recent commit also
added code doing almost the same thing manually in wxTopLevelWindow unit
test, which was one version too many.
Replace both of them with the new EventCounter::WaitEvent().
No real changes, this is just a refactoring.