Commit graph

73324 commits

Author SHA1 Message Date
Vadim Zeitlin
7ae3cf206c Remove wxVector unit test
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.
2022-10-11 00:48:00 +02:00
Vadim Zeitlin
86348a9d28 Stop testing for pre-standard hash map/set classes
Always use std::unordered_{map,set} when we use them at all, don't
bother with checking for their availability and with tr1 or even older
alternatives.
2022-10-11 00:45:30 +02:00
Vadim Zeitlin
a0ae0cd316 Use <type_traits> unconditionally
Don't use or even mention tr1/type_traits any more.
2022-10-11 00:45:30 +02:00
Vadim Zeitlin
583a426a37 Use std::string::compare() unconditionally
Don't test for it in configure/CMake and just always use it.
2022-10-11 00:45:30 +02:00
Vadim Zeitlin
0a387693c6 Use std::wstring unconditionally
Don't test for its existence in configure and CMake and don't use
wxStdWideString in the code.
2022-10-11 00:45:30 +02:00
Vadim Zeitlin
eb97bf90e4 Remove custom wxVector implementation
Always use std::vector<>, we don't support platforms not providing the
standard library classes any longer.
2022-10-11 00:45:30 +02:00
Vadim Zeitlin
f99e02267a Remove our own implementation of std::is_convertible
Just use the standard trait instead.
2022-10-11 00:25:27 +02:00
Vadim Zeitlin
d517a48c31 Require C++11 in the minimal sample CMakefile too
We could, and probably should, set target-level property on wx libraries
instead, but we'll have to increase the minimum required CMake version
to 3.8 in order to be able to do it.
2022-10-11 00:02:29 +02:00
Vadim Zeitlin
182eebdbf3 Use MSVS 2015 solutions for AppVeyor CI builds
These solutions work for MSVS 2017, 2019 and 2022 as well.
2022-10-11 00:02:29 +02:00
Vadim Zeitlin
1cf49f9909 Remove MSVS 2005 and 2008 project files
These compilers are not supported any longer.

Also disable their regeneration in Bakefiles.bkgen.
2022-10-11 00:02:29 +02:00
Vadim Zeitlin
b83178086d Use wxVector::shrink_to_fit() directly
Don't use deprecated wxShrinkToFit() as now wxVector always has this
member function because it is available even in STL build when using
C++11.
2022-10-11 00:02:29 +02:00
Vadim Zeitlin
dd404fdd77 Remove HAVE_STRTOULL and HAVE_WCSTOULL
We can assume these functions are always available now as they are part
of C++11.
2022-10-11 00:02:29 +02:00
Vadim Zeitlin
924db833f4 Require MSVS 2015+ and remove checks for earlier versions
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).
2022-10-11 00:02:29 +02:00
Vadim Zeitlin
67b8ca5ef1 Remove WXARC_MEMBER_TEMPLATES and always use member templates
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.
2022-10-11 00:02:29 +02:00
Vadim Zeitlin
7ee8ea2d5b Update wxMSW-specific options in wxUniv setup.h
This section of the file wasn't updated when rerunning update-setup-h,
add the missing line to it and commit the results of rerunning it.
2022-10-11 00:02:29 +02:00
Vadim Zeitlin
824f7e63f2 Stop using obsolete wxW64 macro
Still define it for compatibility, but at least don't use it in our own
code.
2022-10-11 00:02:29 +02:00
Vadim Zeitlin
e1d63e5629 Add an explicit check for gcc version
This doesn't cost much and might be helpful to people accidentally using
an ancient compiler version.
2022-10-11 00:02:29 +02:00
Vadim Zeitlin
23a57b981f Remove checks for gcc <= 4.8 and always assume it's 4.8+
Previous versions don't provide C++11 support which is required now
anyhow and so can't be used any longer.
2022-10-11 00:02:29 +02:00
Vadim Zeitlin
1e26cbfcaf Always set wxUSE_GRAPHICS_CONTEXT to 1 by default
Don't bother with compiler and gcc version check, all compilers should
provide GDI+ headers/libraries by now.
2022-10-11 00:02:29 +02:00
Vadim Zeitlin
6bbfdb157e Check that C++11 is available and remove tests for it
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.
2022-10-11 00:02:29 +02:00
Vadim Zeitlin
73869d37fd Always use variadic macros and remove wxNO_VARIADIC_MACROS
Variadic macros are always available in C++11, which will be required
very soon, so don't bother testing for them and just always use them.
2022-10-11 00:02:29 +02:00
Vadim Zeitlin
0f2b8a2065 Move Cygwin __USE_W32_SOCKETS definition to wxMSW-specific file
Don't do this in wx/defs.h itself.
2022-10-11 00:02:29 +02:00
Vadim Zeitlin
635ec6c2af Remove 20+ years old workaround for gcc under HP-UX
This is almost surely not necessary any longer as the version of gcc
that must have needed that is no longer supported.
2022-10-11 00:02:29 +02:00
Vadim Zeitlin
7aea15dda5 Require C++11 in configure 2022-10-11 00:02:28 +02:00
Vadim Zeitlin
327d65be92 Change package version in configure to 3.3.0 2022-10-11 00:02:28 +02:00
Vadim Zeitlin
9ed1a4ea59 Use v3 of checkout action in GitHub CI builds
The previously used v2 uses node12 which is being deprecated by GitHub
and won't be any longer available soon, so switch to the currently
supported version.
2022-10-10 23:55:12 +02:00
Vadim Zeitlin
e6dfd9748f Merge branch 'ci-use-containers'
Run Ubuntu 18.04 builds in a container on GitHub CI to avoid depending
on the existence of a deprecated and soon to be discontinued runner
environment.

See #22856.
2022-10-10 23:53:28 +02:00
Vadim Zeitlin
cccf2ba263 Try ignoring the first test failure in clang/Ubuntu 20.04 build
For unknown reason this test fails when run for the first time on this
system, but succeeds during the subsequent runs.
2022-10-10 23:50:11 +02:00
Vadim Zeitlin
9758c63a1d Regenerate wxStyledTextCtrl documentation
Rerun src/stc/gen_iface.py to update the generated part of the interface
header.

This should have been part of 8ac10d28f8 (Fix all the other comments
with Doxygen grouping commands too, 2022-08-03) but was forgotten there.

See #22248.
2022-10-10 00:24:32 +02:00
Lauri Nurmi
fc499810ce Use wxChoice for month selection in wxGenericCalendarCtrl
For no obvious reason the generic calendar control used
a read-only wxComboBox until now.

While this is more or less identical to a wxChoice on MSW,
it is somewhat different on OSX and Gtk: Whereas a wxChoice
can be opened by clicking anywhere on it, a wxComboBox requires
clicking on the arrows on the right edge. A wxComboBox
allows selecting and copying the current value, but this is
probably not terribly useful in a calendar.

See #22853.
2022-10-09 23:57:57 +02:00
Vadim Zeitlin
a1c42b1ceb Fix copy-paste errors in wxUILocale documentation
Simply remove the parts that made sense in wxLocale context, but not
here.
2022-10-09 23:56:40 +02:00
Vadim Zeitlin
d05e4b6616 Rebake webview sample makefiles after recent changes
This corresponds to the changes done in samples/webview/webview.bkl in
0adf31169d (Add advanced handler to webview sample, 2022-09-14).

See #22797.
2022-10-09 23:54:38 +02:00
Vadim Zeitlin
ab1c5105a0 Switch clang CI build to use Ubuntu 20.04
Running it in 18.04 container would require installing libc++-dev and
other packages, it's simpler to just write it on the GitHub-provided
runner where they're already installed.

Note that we need to explicitly choose to use clang-10, as the GitHub
runner has clang-11 and clang-12 installed as well and the default clang
version is 11, but only libc++-10-dev is installed, so using the default
clang with -stdlib=libc++ fails out of the box.
2022-10-09 16:55:25 +02:00
Vadim Zeitlin
549be66c7d Avoid warnings about deprecated functions inside glib.h
This happens when using gcc 4.8 under Ubuntu 18.04 and has to be
suppressed in the source file including the header as just doing it in
the header itself, with the usual wxGCC_WARNING_SUPPRESS/RESTORE macros,
has no effect, i.e. the warning is still given even if we bracket glib.h
inclusion with them.
2022-10-09 16:54:33 +02:00
Vadim Zeitlin
be97082425 Install the specified compiler package in container
Don't always install g++ as an existing build uses clang.

Also modify another build to use g++-4.8 as this is the oldest still
supported compiler and so it's nice to have a build using it.
2022-10-09 14:23:42 +02:00
Vadim Zeitlin
256d7296b2 Install xvfb when using a container
Unlike the full GitHub environment, this package is not pre-installed in
a "plain" Ubuntu container.
2022-10-09 01:49:52 +02:00
Vadim Zeitlin
d088c61b39 Don't install latest Python when running inside container
This doesn't work because the action installs an ABI-incompatible
version of Python 3.10, resulting in errors like the following

python3: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found
(required by /__t/Python/3.10.7/x64/lib/libpython3.10.so.1.0)

so try using the system version (3.6) to avoid this.
2022-10-09 01:49:52 +02:00
Vadim Zeitlin
c93b1066c1 Run Ubuntu 18.04 builds in a container
Ubuntu 18.04 runner is being discontinued by GitHub, so switch the
builds using it to using a container.

We probably ought to actually run all of the builds in containers to
make them independent of changes to GitHub environment.
2022-10-09 01:49:22 +02:00
Stefan Csomor
f6d150ab9b fixing native coordinate system within wxStaticBox on macOS
see #22837
2022-10-07 20:29:23 +02:00
Stefan Csomor
3d478cedd0 fixing native coordinate system within wxStaticBox on macOS
see @22837
2022-10-07 20:17:33 +02:00
Vadim Zeitlin
2c206e7b6e Always require C++11 for CMake builds 2022-10-07 02:34:45 +02:00
Vadim Zeitlin
04f30658cd Remove CI builds not using C++11
Also add MSVS 2019 and 2022 builds to AppVeyor.
2022-10-07 02:34:11 +02:00
Vadim Zeitlin
8a77fae68b Merge branch 'bmpcombo-enter-event'
Fix getting wxEVT_TEXT_ENTER and other events from wxBitmapComboBox.

See #16318, #22850.
2022-10-07 02:07:03 +02:00
Vadim Zeitlin
a1d04dedf6 Apply fix for CVE-2022-40674 to Expat submodule
Update the submodule to include the upstream commit 4a32da87 (Ensure raw
tagnames are safe exiting internalEntityParser, 2022-08-17).
2022-10-07 02:02:33 +02:00
Vadim Zeitlin
2466acb0da Fix not getting some wxComboBox events after recreating it
Subclass the new EDIT control recreated together with the COMBOBOX
itself to make sure we still process the messages from it correctly.

This notably ensures that we still get wxEVT_TEXT_ENTER events in
wxBitmapComboBox under MSW after adding some items with images to it, as
this recreates the combobox internally.
2022-10-05 23:55:20 +01:00
Vadim Zeitlin
30f30ff946 Add wxComboBox::MSWRecreate() and use it from wxBitmapComboBox
No real changes, this is just a refactoring moving the code recreating
the native MSW combobox into wxComboBox itself, as it seems better to do
this in this class itself rather than outside of it.

This commit is best viewed with Git --color-moved option.
2022-10-05 23:47:09 +01:00
Vadim Zeitlin
aa06e0cbf9 Add serial number to wxwin.m4
This is a common convention and is helpful when installing this file,
see https://www.gnu.org/software/automake/manual/html_node/Serials.html

The serial value of 42 corresponds to the number of commits to this file
so far (and is also the right answer to the question of "what should the
serial be", of course, just as to any other question).

See #22848.
2022-10-06 00:16:55 +02:00
Vadim Zeitlin
a818e505c4 Add "Process Enter" checkbox to bitmap combo widgets sample page
Allow toggling wxTE_PROCESS_ENTER and even set it by default -- and turn
off wxCB_READONLY which was set by default for some reason.
2022-10-05 19:44:09 +01:00
Vadim Zeitlin
b03cb010ca Merge branch 'ThreadCleanUp' of https://github.com/nietsu/wxWidgets
Fix memory leak when creating new wxThreads.

See #22840.
2022-10-05 00:39:59 +02:00
Vadim Zeitlin
f3d2288aa2 Merge branch 'mac-dvc-header'
Fixes for wxDataViewCtrl header-related issues in wxOSX.

See #22839.
2022-10-05 00:37:13 +02:00