ParseDateTime() currently fails if there is a 'T' separator in front of
time component. FormatISOCombined() uses this separator as the default,
so wxDateTime can't parse its own formatted results by default.
This commit fixes that issue by allowing an optional 'T' between the
date and time parts.
Closes#22999.
This restores a modified form of the original commit 893ebbab0c (Disable
use of build system pkg-config files when cross-compiling, 2020-12-13),
thus mostly reverting 6dbf59f34f (Revert "Disable use of build system
pkg-config files when cross-compiling", 2022-10-25) and now disables the
use of build system pkg-config files only when cross-compiling for
non-Linux hosts.
This seems like the best behaviour by default because it avoids
unexpected problems when cross-compiling for MSW or iOS where build
system .pc files should never be used, but still uses these files, if
they are available, when cross-compiling for other Linux systems.
This is Linux-specific currently but should probably be extended to
other Unix systems too. In any case, the default behaviour can always be
overridden by setting PKG_CONFIG_LIBDIR manually.
See #22886.
Adjust scrolled contents for screen drawing directly in EVT_PAINT
handler instead of doing so conditionally for generic wxDC.
This also helps demonstrating if wxPaintDC transformations
are transferred properly to wxGCDC.
Use sensible variable names instead of auto-generated itemNN and
wxSizerFlags-based API.
This makes the code simpler to read and modify and also avoids tons of
asserts due to using meaningless sizer styles.
No real changes, just let wxStaticBoxSizer create wxStaticBox on its own
instead of creating it explicitly just to give it to the sizer.
This makes the code shorter and simpler.
Block while waiting for "lpstat -v" to execute: it shouldn't take a long
time to run it and dispatching events from inside this dialog ctor was
really unexpected.
Set the ID before calling InsertItem(), otherwise it just fails
(inserting an item without ID used to work in the generic version but
never worked in the MSW one and was changed back in 2.9 to not work in
the generic version neither for consistency).
Some of wxImageList methods asserted when called on an invalid image
list while others just failed silently.
Assert in all of them now for consistency and to help detecting problems
in the code using invalid wxImageList objects.
Extend the documentation and the tests.
The changes of fb4f0b590c (Remove wxGTK1 port and GPE support,
2022-10-16) accidentally disabled several checks that were supposed to
be done when using wxGTK, notably for GTK print library.
This was due to WXGTK2 not being defined any longer and is fixed now by
replacing the tests for it with tests for wxUSE_GTK (as WXGTK2 used to
mean "any GTK version other than 1", and not "GTK version 2").
Closes#22994.
This is not done by default by Qt, but wxWidgets expects to always have
exactly one selected radio button in each radio button group.
Fixing this allows the related unit test to pass for wxQt now.
Closes#22991.
Use SUCCEED() in it so passing tests are actually counted (before
running a test using this macro resulted in misleading output saying
that 0 asserts passed) and also use FAIL_CHECK(), instead of FAIL(), to
which CPPUNIT_FAIL() expanded before, to allow the rest of the test to
run even if this check fails, as missing assertions shouldn't be fatal.
Also remove a very old and outdated comment mentioning CppUnit.
Closes#22984.
Cairo surface works properly if origin of the clipping region of CGContext
is (0,0) so if it's not the case we need to apply a transformation to move
it to (0,0).
This shift needs to be applied as an offset added to the device coordinates
when drawing to surface.
Closes#22990.
HDC with negative x- or y-coordinate of the origin of the clipping region
is not supported by Cairo - either due to the Cairo bug
(prior to Cairo 1.15.12 - bug 96482) or by design (Cairo >= 1.15.12 -
4d07b57c16).
For such HDC we need to shift clipping region origin so that its coordinates
become >=0 and then pass this transformed HDC to Cairo surface.
To compensate this shift its value needs to be applied as an offset
added to the device coordinates when drawing to the surface.
See #22990.
Although there is no official Qt documentation about supporting hyphenated
shortcuts or not, using them doesn't currently work (at least under Linux).
So make sure that we always pass a non hyphenated shortcut to Qt to work
correctly, and to display consistent shortcuts if there is a mix of standard
shortcuts and user supplied ones.
We now assert if not enough arguments are given to a vararg function, as
we can actually do it when checking it all at once, unlike before when
we only checked for the matching format specifier for each argument, so
add a test verifying that this works as expected.
This header contains a lot of stuff which is better left unchanged, as
updating application code using it would be quite non-trivial if we
removed it, but at least mention that it's unused and should be ignored.
Use variadic templates for them too, this is slightly more verbose, but
much more clear and simpler to read, debug etc.
We can now also easily combine the wxS[n]printf() overloads for char and
wchar_t buffers into a single template function.
Check the item in toggle() signal and send the event in triggered() signal
which emitted after.
We need this separation because triggered() is not emitted when setChecked()
or toggle() is called. The wxQtActionGroup (will be added in the next commit)
uses one of them to synchronize QActions with their wx wrappers and the menu
test will eventually pass.