Commit graph

73369 commits

Author SHA1 Message Date
Vadim Zeitlin
9f46e67eec Merge branch 'nullptr'
Use nullptr instead of NULL in the code, comments and the documentation.

See #22881.
2022-10-18 18:34:07 +02:00
Vadim Zeitlin
c2eab06e4b Merge branch 'remove-motif-and-gtk1'
Remove obsolete and unmaintained wxMotif and wxGTK1 ports.

See #22877.
2022-10-18 18:30:58 +02:00
Vadim Zeitlin
2ebd4a6f8d Add check for obsolete macros to automatic code style checks
Avoid checking in code using wxOVERRIDE or wxNOEXCEPT again, now that
we've got rid of them.
2022-10-18 02:23:01 +02:00
Vadim Zeitlin
8afec036ee Replace wxOVERRIDE with override in Objective-C++ files too
This completes the changes of 88d526660f (Replace wxOVERRIDE and
wxNOEXCEPT with override and noexcept, 2022-10-12).
2022-10-18 02:18:43 +02:00
Vadim Zeitlin
23b0c7f9d2 Enable -Wzero-as-null-pointer-constant in wx headers
This warning shouldn't need to be disabled any longer now that we use
nullptr instead of NULL.
2022-10-18 01:25:25 +02:00
Vadim Zeitlin
4f4c5fcfdf Use nullptr instead of NULL in the code and documentation
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.
2022-10-18 01:25:25 +02:00
Vadim Zeitlin
e3cf23e945 Merge branch 'msw-composited-fixes'
Fix regressions in wxMSW after enabling WS_EX_COMPOSITED and document
this change.

See #22882.
2022-10-18 00:38:09 +02:00
Vadim Zeitlin
c9a6c55dad Merge branch 'deprecate-wxqsort'
Deprecate never used wxQsort() function.

See #22884.
2022-10-18 00:37:29 +02:00
Vadim Zeitlin
59cb83ea17 Don't use wxOVERRIDE in generated wxSTC files
This should have been done together with 88d526660f (Replace wxOVERRIDE
and wxNOEXCEPT with override and noexcept, 2022-10-12).
2022-10-18 00:29:29 +02:00
Vadim Zeitlin
ec830fffec Deprecate wxQsort()
This function is not really useful and doesn't seem to be used anywhere.
2022-10-17 18:51:20 +02:00
Vadim Zeitlin
7e73d4e198 Remove commented out code from wxGTK wxDataViewCtrl
This code has been unused since 2009, so it's probably not very useful
to keep it there.

No real changes.
2022-10-17 18:48:02 +02:00
Vadim Zeitlin
a482a310a3 Remove documentation of wxPostDelete()
This function not only doesn't exist, but seems to never have existed at
all.

Not really sure what happened here, but we definitely don't need to
document it any more.
2022-10-17 18:45:52 +02:00
Vadim Zeitlin
e5d999963d Remove wxQSORT_DECLARED hack
This is not needed any longer since we don't need wxQsort() in
wx/vector.h any more after eb97bf90e4 (Remove custom wxVector
implementation, 2022-10-11).
2022-10-17 18:38:15 +02:00
Vadim Zeitlin
b0ed71658d Document WS_EX_COMPOSITED impact on wxClientDC
This is a big and incompatible change but, arguably, is still worth
making because it makes wxMSW behaviour similar to that of wxOSX and
wxGTK when using Wayland.

Do document it prominently and also document MSWDisableComposited() as
it will probably end up being used in quite a lot of existing code.
2022-10-17 17:22:43 +01:00
Vadim Zeitlin
3a7394fe08 Disable use of composition in forty demo under MSW
This is ugly but allows the carts to be visible while they're being
dragged again under MSW.

The game still doesn't work at all under GTK/Wayland (and probably
macOS).
2022-10-17 15:42:56 +01:00
Vadim Zeitlin
9261816feb Disable compositing when using wxDragImage
ImageList_BeginDrag() doesn't seem to be compatible with the use of
WS_EX_COMPOSITED, so turn it off when using it.

We probably could turn it back on again in EndDrag(), but for now keep
things simple and just fix the regression which resulted in wxDragImage
not working at all any more since d4ced54755 (Merge branch
'msw-double-buffer', 2022-10-15).
2022-10-17 13:33:16 +01:00
Vadim Zeitlin
b5d434dc91 Move wxListCtrl::MSWResetParentComposited() to wxWindow
This function will need to be used from other places too, so make it
available in the base class itself.

Also disable WS_EX_COMPOSITED for this window itself too.
2022-10-17 13:31:28 +01:00
Vadim Zeitlin
39ea524943 Replace a reference to a very old SourceForge ticket number
Not sure if it's the exact same ticket or if it's even relevant 18 years
later, but it seems to be close.
2022-10-16 23:40:34 +02:00
Vadim Zeitlin
ff629f3853 Fix drawing wxListCtrl since enabling double buffering by default
We need to avoid using WS_EX_COMPOSITED for any of the parents of this
native control and not just for the control itself.
2022-10-16 21:26:33 +01:00
Vadim Zeitlin
cd637663c8 Add wxWindow::MSWAfterReparent() virtual function
Refactor the existing code to extract the part of Reparent() updating
the new parent style to an overridable virtual function.

No real changes yet.
2022-10-16 21:16:13 +01:00
Vadim Zeitlin
fb4f0b590c Remove wxGTK1 port and GPE support
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.
2022-10-16 22:01:02 +02:00
Vadim Zeitlin
0ef1cdcc21 Remove support for wxMotif
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.
2022-10-16 16:39:56 +02:00
Vadim Zeitlin
041060d0de Remove a very obsolete and unused "publicity" document
Its contents has become embarrassingly obsolete by now.
2022-10-16 15:30:29 +02:00
Vadim Zeitlin
bc07c9a309 Document C++11 requirement in the main README
This should have been part of ecf321924e (Merge branch 'cxx11',
2022-10-15), see #22854.
2022-10-16 01:10:06 +02:00
Vadim Zeitlin
88273a944e Merge branch 'linux-stack-walk'
Fix line numbers for the frames not in the main process in wxStackWalker
under Linux.

See #22873.
2022-10-16 01:01:24 +02:00
Loïc Bartoletti
99919a8d1f Fix compilation when including wx/propgrid/editors.h early
This header uses wxBitmapBundle but didn't declare it, resulting in
compilation errors if wx/bmpbndl.h hadn't been included before it.

Add a forward declaration of wxBitmapBundle to this header to fix this.

Closes #22875.
2022-10-16 00:57:50 +02:00
Vadim Zeitlin
9de05fa6fa Stop immediately updating wxAuiToolBar in its wxEVT_SIZE handler
It seems wrong to request an immediate update here and this results in a
problem since the changes of d4ced54755 (Merge branch
'msw-double-buffer', 2022-10-15) as OnPaint() was called before the
background style was set to wxBG_STYLE_PAINT in Create(), resulting in a
fatal assert failure.

See #22876.
2022-10-15 23:55:00 +01:00
Vadim Zeitlin
b1774e97de Improve parsing of line numbers in addr2line output
Take into account possible presence of more output after them.
2022-10-15 19:10:25 +02:00
Vadim Zeitlin
5b0b6313d3 Fix using addr2line under Linux
Pass the correct module path, i.e. the path to a shared library and not
the main executable, if this is where the address is located, and adjust
it by the module offset to make addr2line actually work for us instead
of just always returning "??:0".
2022-10-15 19:10:25 +02:00
Vadim Zeitlin
ecf321924e Merge branch 'cxx11'
Require C++11 compiler and start using some C++ features in the code.

See #22684, #22854.
2022-10-15 18:14:55 +02:00
Vadim Zeitlin
d4ced54755 Merge branch 'msw-double-buffer'
Enable double buffering by default for all windows in wxMSW.

See #22851.
2022-10-15 17:12:11 +01:00
PB
88d526660f Replace wxOVERRIDE and wxNOEXCEPT with override and noexcept
Don't use deprecated macros in wxWidgets itself.
2022-10-15 18:10:45 +02:00
Vadim Zeitlin
be5095acdd Update documentation of deprecated C++11-related macros
Still document them for completeness, but mention that they are
deprecated and shouldn't be used.
2022-10-15 18:01:34 +02:00
PB
333a663c70 Update MSVS debug visualisers
Remove autoexp.inc, this format is no longer supported by MSVC.

Merge wxWidgets.2013.natvis with wxWidgets.natvis.

Remove wxVector<> visualizer as it's not used any more and is just a
synonym for std::vector<> now.
2022-10-11 21:33:33 +02:00
Vadim Zeitlin
5cfc89c10b Give more details in wxMSVC_VERSION_AUTO documentation
Explicitly list all the prefixes used with it currently.
2022-10-11 21:33:33 +02:00
PB
a2b84d40a0 Prune mentions of no longer supported compilers from the docs
Remove mentions of older MSVC versions and very old gcc versions.
2022-10-11 21:32:27 +02:00
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