Commit Graph

69334 Commits

Author SHA1 Message Date
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
Vadim Zeitlin
b6cff426ce Merge branch 'remove-bcc-support'
Remove support for Borland C++ compiler, it wasn't tested since a long
time and probably didn't work anyhow and there was no interest in
keeping support for it since many years.

See https://github.com/wxWidgets/wxWidgets/pull/2087
2020-10-16 01:58:13 +02:00
Vadim Zeitlin
1fb8d3621f Send wxEVT_DESTROY to children of wxAuiManager-associated window
This fixes a regression introduced in f646532889 (Call
wxAuiManager::UnInit() if associated frame is destroyed, 2020-07-18)
since when children of a window managed by wxAuiManager didn't receive
wxEVT_DESTROY any more because the manager intercepted it for its own
needs.

Closes #18938.
2020-10-15 23:53:12 +02:00
Vadim Zeitlin
a1381347c9 Fix harmless signed/unsigned warning in wxTextInputStream
Just fix a warning about assigning -1 to a size_t variable introduced in
the recent commit 1e435d2347 (Fix wxTextInputStream incorrectly decoding
multibyte fallback encodings, 2020-09-28).

No real changes.
2020-10-15 23:42:42 +02:00
PB
68a4e47e4c Remove trailing whitespace 2020-10-15 19:50:37 +02:00
Gideon van Melle
8f1523e610 Update Dutch translations 2020-10-15 17:07:45 +02:00
PB
29370cfee9 Get rid of wxCOMPILER_NO_OVERLOAD_ON_ENUM compile guard 2020-10-15 16:41:43 +02:00
Paul Cornett
d104271364 Build fix for pre-C++11 compilers
Broken by b5a554b9a6 (Avoid -Wdouble-promotion warnings, 2020-10-14)
2020-10-14 14:41:34 -07:00
Paul Cornett
896d383a4d Move some early-out code to the top of the function 2020-10-14 12:09:34 -07:00
Paul Cornett
1e474323f6 Avoid unused function warning when wxUSE_LOG_TRACE==0 2020-10-14 12:05:14 -07:00
Paul Cornett
72c002f8c5 Avoid -Wsign-compare warning 2020-10-14 12:03:51 -07:00
Paul Cornett
c7122a8c0d Add a wxRound() overload for float 2020-10-14 12:03:02 -07:00
Paul Cornett
0825b59553 lround() is available in Visual Studio 12 2020-10-14 11:44:22 -07:00
Paul Cornett
55992cc9e1 Use lround() for non-C++11 wxRound(), as with C++11 version 2020-10-14 11:42:45 -07:00
PB
caab5dda00 Resolve removal of the rest of BCC-affected
Make changes based on feedback provided by vadz.
2020-10-14 20:11:58 +02:00
PB
6ba1b8c78c Fix the bug causing GUI tests crashes 2020-10-14 20:10:30 +02:00
Paul Cornett
b5a554b9a6 Avoid -Wdouble-promotion warnings 2020-10-14 11:07:55 -07:00