Commit Graph

69350 Commits

Author SHA1 Message Date
Maarten Bent
badf0eb64e CMake: add image test files 2020-10-20 21:11:17 +02:00
Maarten Bent
b1653024d6 CMake: remove HAVE_VARIADIC_MACROS check 2020-10-20 20:39:05 +02:00
Maarten Bent
1d6a6b934f Remove a borland check 2020-10-20 20:38:30 +02:00
Maarten Bent
2e56f1a8d3 Remove more BCC-specific hdrstop pragma 2020-10-20 20:38:01 +02:00
Vadim Zeitlin
a3ea09d3e3 Revert "Increase LSAN verbosity in Travis CI builds"
This reverts commit 7ec39330d2 because
enabling verbose ASAN output results in too much output for Travis to
handle (and, to be fair, for it to be useful).
2020-10-20 18:41:40 +02:00
Vadim Zeitlin
7ec39330d2 Increase LSAN verbosity in Travis CI builds
Its own error message recommends using these options if it fails (as it
did in one of the builds with an irreproducible crash), so try doing it.
2020-10-20 15:57:09 +02:00
Bill Su
7e9afad53a Add real support for monochrome bitmaps to wxMSW
In order to be able to use monochrome bitmaps as wxMask, improve support
for them in various ways:

1. Implement loading and saving of monochrome BMP files.
2. Add wxMonoPixelData for direct access to monochrome bitmap pixels.
3. Implement conversion from wxImage to monochrome wxBitmap.

Closes https://github.com/wxWidgets/wxWidgets/pull/2032
2020-10-20 15:52:55 +02:00
Vadim Zeitlin
c0e3bdaab9 Merge branch 'remove-outdated-gcc-checks'
Remove vestiges of support for gcc < 4 and related checks.

See https://github.com/wxWidgets/wxWidgets/pull/2096
2020-10-20 15:49:20 +02:00
Tobias Taschner
038782a684 Update WebView Edge min required version to 1.0.622.22
While technically it still builds with older versions,
version 1.0.622.22 ist the first non preview release which should
make the included webview loader DLL the most compatible for the
forseable future.
2020-10-20 15:12:09 +02:00
Vadim Zeitlin
da3aef753e Remove variadic macros test from configure
This is useless, all still supported compilers except ancient MSVS
versions (for which configure is not used anyhow) support variadic
macros, so don't waste time testing for them.

Note that the checks for HAVE_VARIADIC_MACROS in the sources are still
left because it is still possible to explicitly disable variadic macros
support using --disable-vararg_macros for strict C++98 compatibility.
2020-10-20 01:59:00 +02:00
Vadim Zeitlin
426a0ed527 Remove HAVE_W32API_H definition and checks
All still supported versions of MinGW/Cygwin provide w32api.h file, so
there is no need to test for it.

This allows to simplify the code, but also remove the definition of
HAVE_W32API_H from bake- and makefiles and this, in turn, allows to get
rid of extra flags in MinGW format entirely, as we don't support gcc
2.95 for which they were originally needed neither.
2020-10-20 01:47:47 +02:00
Vadim Zeitlin
4abb816f70 Merge branch 'fix-and-run-tests-with-asan'
Fix issues found by address/leak sanitizers in the unit tests and add
Travis CI build running tests built with ASAN to ensure they don't
reappear in the future.

See https://github.com/wxWidgets/wxWidgets/pull/2086
2020-10-19 21:16:27 +02:00
Vadim Zeitlin
fec33079ed Relax French date/time locale unit test to ignore trailing "%Z"
The version of glibc used under Ubuntu 20.04 doesn't have "%Z" in the
French date-time locale, which broke the test there.

Instead of adding even more tests for glibc version, just ignore "%Z" if
it's present, we don't really care about it, we just want to check that
wxLocale::GetInfo() returns something recognizably different from C and
English locale here.
2020-10-19 21:14:27 +02:00
PB
6fbacb20d8 Remove checks for wxNEEDS_CHARPP
wxNEEDS_CHARPP was needed only for now unsupported GCC versions.
2020-10-19 20:07:16 +02:00
PB
a7df23d43c Remove checks for outdated GCC versions
wxWidgets now supports only GCC 4 and newer, so there is no reason
to keep code specific for older GCC versions.
2020-10-19 19:38:53 +02:00
Vadim Zeitlin
a2923a6fad Select GTK version explicitly when configuring Travis CI builds
Don't rely on just a single GTK version being installed on the system,
as we do now, but select the version we want explicitly, just to avoid
bad surprises in the future (even if it doesn't change anything for
now).
2020-10-19 16:51:36 +02:00
Vadim Zeitlin
7859163e66 Require specifying wxGTK_VERSION for wxGTK builds on Travis CI
This avoids accidentally using a wrong GTK version, as it happened for
e.g. ARM64 build.
2020-10-19 16:50:56 +02:00
Vadim Zeitlin
5e7e07dcd1 Specify wxGTK_VERSION explicitly for all Travis CI builds
It default to 2 currently, which is rather surprising, so prepare for
requiring specifying it explicitly by adding wxGTK_VERSION to all wxGTK
builds environments.
2020-10-19 16:45:57 +02:00
Vadim Zeitlin
3d282aa380 Remove useless --disable-optimise option from ANSI Travis build
This is already added unconditionally in build/tools/travis-ci.sh
anyhow, so there is no need to specify it here.
2020-10-19 14:03:33 +02:00
Ilya Sinitsyn
0310347dc4 Add wxGTK build with ASAN to Travis CI
Compile and link with `-fsanitize=address` options to find memory related
errors.
2020-10-19 14:03:24 +02:00
Ilya Sinitsyn
fe7230e19c Suppress spurious accessibility bus errors in Travis CI builds
These errors don't matter, so just avoid them in the build logs by
setting NO_AT_BRIDGE environment variable.
2020-10-19 13:54:19 +02:00
Ilya Sinitsyn
b95a79d74e Fix global read overrun error in MBConvTestCase
Use null-terminated copy of the input buffer to create the formatted
message instead of "multiBuffer" itself, which isn't.
2020-10-19 13:54:19 +02:00
Ilya Sinitsyn
bea13d68c0 Fix memory leak in wxWebKitJavascriptResult
We need to unref the result wrapped by this object in its dtor.
2020-10-19 13:54:19 +02:00
Ilya Sinitsyn
f7c4677cb2 Fix list contents memory leak in wxAny unit test
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.
2020-10-19 13:54:19 +02:00
Ilya Sinitsyn
10c68e9973 Fix wxMemoryFSHandler memory leaks in wxFileSystem unit test
Use wxScopedPtr<> to ensure the handlers we use get freed.
2020-10-19 13:54:19 +02:00
Vadim Zeitlin
987758eb97 Add a suppression file for FontConfig leaks occurring under wxGTK
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.
2020-10-19 13:54:19 +02:00
Ilya Sinitsyn
3dec092dff Fix memory leak in wxGridSizer::Insert() if an assert in it fails
This avoids another memory leak in the test suite, which intentionally
triggers an assert in this function.
2020-10-19 13:54:19 +02:00
Ilya Sinitsyn
02f697d0c0 Fix memory leaks in wxHtmlParser unit test
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.
2020-10-19 13:54:19 +02:00
Ilya Sinitsyn
413c05ea85 Fix wxAcceleratorEntry memory leaks in the menu test
Use wxScopedPtr to ensure that all the test accelerator entries are
destroyed instead of just being leaked.
2020-10-19 13:53:52 +02:00
Ilya Sinitsyn
18d56818f5 Fix possible use of dangling window pointer in wxSizer::Insert()
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.
2020-10-19 13:34:49 +02:00
Vadim Zeitlin
035fc5eb37 Merge branch 'travis-ansi'
Add ANSI build to Travis CI and make it pass.

See https://github.com/wxWidgets/wxWidgets/pull/2093
2020-10-19 13:15:16 +02:00
jozef m
48d0b53c0c Update Slovak translations 2020-10-19 13:04:35 +02:00
Paul Cornett
ad73219104 Avoid -Wdeprecated-copy warning 2020-10-18 18:00:13 -07:00
Paul Cornett
2110bb2730 Remove some unnecessary ctor/operator= definitions 2020-10-18 18:00:05 -07:00
Paul Cornett
f6ee5147ae Fix integer division that should be floating point
Introduced by unintended conversion of expression from double to int in
b5a554b9a6 (Avoid -Wdouble-promotion warnings, 2020-10-14)
2020-10-18 17:59:54 -07:00
Paul Cornett
b4483e42bd Fix incorrect use of '=' instead of '==' 2020-10-18 17:53:59 -07:00
Vadim Zeitlin
9e4d51dfca Disable tests not working in ANSI build
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.
2020-10-18 23:47:29 +02:00
Vadim Zeitlin
52fdc8c97d Merge branch 'cmake-fixes' of https://github.com/MaartenBent/wxWidgets
Fix wxQt and wxGTK2 build problems.

See https://github.com/wxWidgets/wxWidgets/pull/2094
2020-10-18 23:34:12 +02:00
Vadim Zeitlin
9824d3bef3 Don't try testing wxNO_IMPLICIT_WXSTRING_ENCODING in ANSI build
This doesn't work and this won't change.
2020-10-18 20:15:14 +02:00
Vadim Zeitlin
577656a7d7 Don't build samples in ANSI Travis CI build
We don't need to waste build time on this and it's not really a problem
if some samples don't compile without Unicode anyhow.
2020-10-18 20:14:27 +02:00
Maarten Bent
62896efd70 CMake: disable wxUSE_GLCANVAS_EGL in non-GTK3 builds
Closes #18947
2020-10-18 18:53:56 +02:00
Vadim Zeitlin
7ed0d831d3 Declare variable unused in ANSI build inside #if wxUSE_UNICODE
This avoids gcc -Wunused-variable about it in the ANSI build.
2020-10-18 17:37:24 +02:00
Maarten Bent
0417dabdbd CMake: use correct media sources in WXQT build
Only check for gstreamer in Unix GTK builds.

Closes #18945
2020-10-18 15:21:31 +02:00
Vadim Zeitlin
284f5af192 Add ANSI wxGTK Travis CI build
Make sure this build is not broken again for as long as it's still
supported.
2020-10-18 13:17:37 +02:00
Vadim Zeitlin
6862cdd0cd Fix ANSI build error due to wrong gcc format attribute use
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
2020-10-18 13:12:48 +02:00
Vadim Zeitlin
fa1b1e700b Initialize variable to avoid a warning in wxCaret unit test
Always initialize the caret pointer in the test added in 88f808e303 (Add
a unit test for wxCaret::Create(), 2020-10-01) to avoid a MSVS warning.
2020-10-17 14:46:41 +02:00
Vadim Zeitlin
98ea7b49c7 Fix harmless signed/unsigned comparison warning in a test
Add a cast to avoid a warning recently added in 1f40a7e4e3 (Document
that wxDataViewCtrl::SetSelections() skips invalid items, 2020-10-12).
2020-10-17 14:45:41 +02:00
Vadim Zeitlin
123a1e3cea Fix linking stc sample when using monolithic static library
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/1852

Closes #18776.
2020-10-16 02:36:46 +02:00
Vadim Zeitlin
27ca075d4c Document return values of various close-related docview functions
Make it explicit that they all return true if the view or document was
effectively closed or false if closing it was vetoed.
2020-10-16 02:07:10 +02:00
Vadim Zeitlin
fcc0e48ade Deprecate wxTransformMatrix to prepare for its removal later
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/2083

Closes #13114.
2020-10-16 02:03:38 +02:00