"%T" was only handled when strftime() could be used but not by our own
implementation, resulting in failing to handle it for format string
including both "%T" and one of the specifiers not supported by the
standard function, such as "%l" or several others when using MinGW.
Closes#26179.
Override DoGetValue() in wxMSW wxTextCtrl and not GetValue() itself as
the base class version correctly takes the manually managed hints into
account, unlike the overridden version which only did this for plain
edit controls but not the rich edit ones.
Add a unit test to ensure that this bug remains fixed.
See #26176.
Create file tests/tests.props which adds the DLL build directory
to MSVS PATH in <LocalDebuggerEnvironment> property and add the
file to test.vcxproj and test_gui.vcxproj MSVC projects.
See also eba106431a (Allow running samples from MSVS in DLL
configurations, 2024-11-14).
Closes#26171.
This doesn't cost anything but allows the old code which relied on
compatibility_iterator being implicitly convertible to a pointer (and
hence comparable with nullptr) continue to compile and work.
Add a unit test checking that this works as expected.
Restore compatibility with all the previous wxWidgets versions that had
this assert and make sure that errors in the code using this operator
don't go unnoticed, as it happened with #26148.
Closes#26149.
Due to a regression introduced in 3e32a9abe1 (Don't bother resetting
wxStaticBitmap image when destroying it, 2025-06-12), which was part
of #25518, the handle of wxBitmap passed to wxStaticBitmap::SetBitmap()
was destroyed when another bitmap was passed to SetBitmap() later.
Fix this by ensuring that we don't overwrite the value of the current
handle (to be deleted) prematurely in DoUpdateImage().
Add a simple unit test for wxStaticBitmap checking that the problem is
really fixed and, under MSW, also that it doesn't leak bitmap handles.
Closes#26106.
Allow getting detailed information about the operations performed by
wxWebRequest, at least when using libcurl-based backend, which provides
good built-in support for this, and partially when using WinHTTP.
Note that the debug logger is set at the session level and not for each
request: this is less flexible, but more convenient and is probably how
it will always be used in practice.
See #26086.
The definitions of overloads used for printing date types when
assertions involving them fail must occur before the main Catch header
inclusion, so move them to asserthelper.h which was already explicitly
included before Catch and remove the redundant (because it was always
included from testprec.h) inclusions of testdate.h from elsewhere.
No real changes.
Add UseBasicAuth() which allows to avoid an extra round trip to the
server due to trying to access a protected URL without providing the
credentials first and only sending them in response to 401 response.
For libcurl, simply set authentication method to CURLAUTH_BASIC and let
the library handle everything. For the other backends, add the required
"Authorization" header ourselves, as they don't seem to have any support
for doing preemptive authentication on their own.
Set seek callback to allow libcurl to reuse the data being uploaded when
it has to redo the HTTP request, e.g. because of redirection after a 301
or resubmitting it with correct authentication data after a 401.
Add a test checking that this works correctly, although it has to be
disabled for WinHTTP for now as it doesn't handle 307/308 redirects
automatically (see #26046).
wxMSW is the only port in which the header is really native and its
behaviour may/does differ from the generic one and so these tests are
valuable there, but not with the other ports.
This commit added in 2025-04-24 (Use wxUIActionSimulator to test event
propagation order DocView test) is no longer needed under wxQt because
the problem preventing wxMenu::SendEvent() from working correctly under
wxQt is fixed in the parent commit.
Due to rounding errors, this test would fail under wxMSW if the region started
at x=2*n, and would fail under wxQt if it started at x=2*n+1. So relax the check
by using 1 as a position tolerance.
The functions InformFirstDirection() in wxWindow and wxSizer forced the
code overriding it to be written in unnatural way, by storing the
parameters passed to this function and then using them in other
functions later.
Add new functions wxWindow::GetMinSizeFromKnownDirection() and
wxSizer::CalcMinSizeFromKnownDirection() taking the same parameters as
InformFirstDirection() but which can use them directly to return the
desired result.
Change wxStaticText and wxWrapSizer to use them instead of the old
function to simplify their code (that of wxWrapSizer could probably be
still simplified further, as it doesn't seem necessary to store these
values at all any longer, but for now keep it as is).
This allows wxWrapSizer to just override the new function instead of
using m_lastUsed variable to distinguish between calculating min size
during the first and second layout passes.
Also add wxWindow::GetMinSizeUsingLayoutDirection() following similar
logic. This is not used yet but will be in the upcoming commit.
Co-authored-by: Vadim Zeitlin <vadim@wxwidgets.org>
After experimenting with this code in the sample, move it to its
permanent place in the library.
This commit is best viewed using Git --color-moved option and ignoring
whitespace changes.
On some Windows platforms locale information used in the number
formatting tests is not reported correctly.
Adjust CanRunTest() to skip running the tests on such platforms.
See #25675.
Closes#25878.
Add support for currency amounts, including functions for retrieving
currency symbol and currency code for the current locale and the
possibility to format such amounts according to the locale rules.
Allow retrieving more information about numeric values formatting, for
both numbers and currency amounts, including grouping information when
group separator is used and number of digits after decimal separator and
also use them when formatting numbers.
Finally add function to retrieve the measurement system (metric or
imperial) used by the current locale.
See #1781.
Closes#25765.
Something has changed in Qt 6.8 installed in GitHub Actions CI build
recently and broke this test, which now fails because we get 2 changed
events instead of the expected one.
Disable it for now, until this can be really fixed.