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.
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.
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.
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.
Stop using vararg macros in wxFileTypeInfo and make ctor a template
function instead, this is simpler and more clear.
Add a unit test checking that the ctor still behaves as expected.
Assume they are always 1 now, there is no good reason to ever set them
to 0 any more.
Note that we still keep wxUSE_STD_IOSTREAM for now, but we can drop
wxUSE_STD_DEFAULT as it's not worth having it just for this single
option (previously it was used as the default value for 3 of them).
This function is currently only implemented in wxMSW and wxUniv and just
asserts under the other platforms.
Also add a helper GetTabOrientation().
Update the documentation and add a minimal test case for the new
function.
Closes#22941.
Always use thread_local as we can rely on compiler TLS support working
under Windows 7 and later.
There are some known problems in MinGW thread local variable support,
but they only affect (obsolete) 32-bit builds and will hopefully be
fixed in this compiler soon.
See #22917.
Some wxString functions using wide strings still took wxMBConv just for
consistency with the same functions taking narrow strings in ANSI build,
but this doesn't really make sense any longer because the same code
can't be compiled with different values of wxChar -- it is always the
same thing as wchar_t now, and so we shouldn't pass unused conversion
objects to these functions any more.
So give deprecation warning when these functions are used (but without
formally deprecating them, as it doesn't cost much to keep them) and
avoid using them in the library code.
It might be unnecessary to define it on command line at all, as it's
done in wx/setup.h, but keep doing it for now.
However stop using a variable for this, as setting wxUSE_UNICODE to 0 is
not supported any longer.
Still use wxTHREAD_SPECIFIC_DECL as it is defined as nothing when
wxUSE_THREADS==0, but get rid of wxTLS_VALUE and friends.
Also enable wxUSE_STRING_POS_CACHE when wxUSE_UNICODE_UTF8 because the
issues described in the (now also removed) comment shouldn't occur with
the compiler implementation of the thread-specific variables.
Use Catch2 public header instead of using internal Catch v1 headers: we
can do this now because Catch2 supports (albeit in a rather ugly way)
being used with PCH.
This function doesn't exist in Catch2 any longer, so prepare for the
upgrade by stopping to use it and converting things to string more
explicitly.
No real changes yet.
This is a combination of running clang-tidy with modernize-use-nullptr
check for some ports (GTK, X11, OSX) and manual changes to the ports for
which it couldn't be used easily (MSW, DFB) and also manually updating
the docs.
Also replace NULL with null or nullptr in the comments as this is more
consistent with the use of nullptr in the code and makes it simpler to
grep for the remaining occurrences of NULL itself.
And also use null in the assert messages.
Only a few occurrences of "NULL" are still left in non-C files, mostly
corresponding to unclear comments or string output which it might not be
safe to change.
Remove the port files and references to it from the common headers and
elsewhere.
Also remove GPE (GNOME PDA Environment) support as libgpewidget is
unmaintained since 2006 or so and has never been really used.
Use __WXGTK__ to test for any version of wxGTK now. Still define
__WXGTK20__ for compatibility, but always define it now and don't test
for it in the library code.
This port hasn't been updated for ages and is not used by anybody any
longer, so remove its code to facilitate maintenance.
Also remove references to this port from the documentation and most of
the other places (VMS-specific descrip.vms files still check for it
because it's not clear how to update them all), including configure.
Regenerate the latter and rebake all makefiles.
Finally document that this port is not available any longer.
Testing this class doesn't make much sense any more as it's just a
typedef for std::vector and we can presumably rely on the standard class
working as expected.
Simplify the code checking for _MSC_VER or __VISUALC__ or using
wxCHECK_VISUALC_VERSION() macro (which is not very useful any longer,
but keep it in case we need it again in the future).
Member template functions are supported by all current compilers as they
are already used in other places without any problems, so there is no
need to test for this.
Don't bother checking for various C++11 features that are available in
all C++11 compilers.
Also assume that std::exception_ptr is available in all still supported
MinGW versions and remove checks for it too (see #16634).
Further simplifications remain possible, this is just the first step.