Commit graph

73103 commits

Author SHA1 Message Date
Vadim Zeitlin
9adc030808 Add a note about updating submodules to Git README too
For people unfamiliar with submodules, it may be useful to know how to
update them and not only how to get them initially.

Closes #22695.
2022-08-04 02:30:25 +02:00
David Connet
f94676f0cb Support linking with static runtime when using MSBuild
Add wxRuntimeLibs property which is set to "dynamic" by default, but can
also be set to "static" (e.g. with "msbuild /p:wxRuntimeLibs=static") to
build the libraries using static CRT libraries.

Closes #22693.
2022-08-04 02:27:01 +02:00
Vadim Zeitlin
512b8033fe Determine location of libc dynamically in wxDynamicLibrary test
Don't hard code the path to it, even different Linux versions use
different paths, e.g. /lib/x86_64-linux-gnu under Debian and /lib64
under Fedora, so just try all the possibilities until we find something.
2022-08-04 01:07:35 +02:00
Vadim Zeitlin
f27acce6cd Avoid using invalid addresses in ListsTestCase too
This is similar to the previous commit, but done in a slightly different
way to avoid changing too much of the existing code: just make "i" an
alias for the first array element to ensure that "&i + 4" is a valid
pointer.
2022-08-04 00:22:41 +02:00
Vadim Zeitlin
6efb8e810b Avoid using invalid addresses in HashesTestCase
Using "&o + N" results in an invalid address, and a perfectly reasonable
-Warray-bounds from gcc 12, so use an array of objects of sufficiently
big size for all values of N to be valid.
2022-08-04 00:19:31 +02:00
Vadim Zeitlin
cc0c55af7b Merge branch 'gcc-12-opt-warns'
Fix warnings in gcc 12 optimized build.

See #22697.
2022-08-03 21:49:10 +02:00
Vadim Zeitlin
87836e0b97 Avoid bogus -Wuse-after-free in gcc 12 optimized builds
This seems to be https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104215 or
at least similar to it, i.e. a known false positive that we
unfortunately have to work around in this ugly way, by inserting a
compiler-specific barrier.

If we need such workarounds in other places, we should define a
wxCOMPILE_BARRIER macro or something similar, but for now it seems to be
only needed here.
2022-08-03 21:48:43 +02:00
Vadim Zeitlin
d8da119ea1 Remove doxygen log file if it's empty in the helper script
This allows to avoid having an untracked file in the repository, so it
doesn't need to be ignored any longer, as it shouldn't exist after a
successful run.

Also output a warning if the log file is not empty, even though the full
dump is only shown in the GitHub workflow file, as when running the
script locally it may be more convenient to examine the log file in some
other way.
2022-08-03 19:43:10 +02:00
Vadim Zeitlin
7999102295 Document wxGrid::RefreshBlock()
This function is useful and there is no reason to exclude it from public
API and it should have been done back in 00224e3f30 (Add
wxGrid::RefreshBlock() helper, 2019-07-11) when it was added.
2022-08-03 19:36:22 +02:00
Vadim Zeitlin
c0f1ecf263 Fix another unbalanced Doxygen grouping command after last commit
Add the missing section start to wxString documentation.

See #22248.
2022-08-03 19:36:22 +02:00
Vadim Zeitlin
8ac10d28f8 Fix all the other comments with Doxygen grouping commands too
This is the same thing as bd92523bc5 (Fix use of Doxygen @addtogroup
command, 2022-08-03) except it fixes comments format for all the other
occurrences of "@{" and "@}" too, not just for those used with
@addtogroup which was the problem in #22572.

This fixes many different formatting problems due to attaching various
Doxygen commands to wrong elements because of broken grouping, e.g. all
overloaded functions were documented incorrectly and there were several
problems in wxString documentation.

See #22248.
2022-08-03 18:58:47 +02:00
Vadim Zeitlin
4c46e01b14 Remove stray Doxygen end group marker
This fixes a warning given, after the changes of the last commit, by
Doxygen 1.9.1 but, amazingly, not given by the latest 1.9.4.

See #22572.
2022-08-03 18:35:45 +02:00
Vadim Zeitlin
bd92523bc5 Fix use of Doxygen @addtogroup command
Put Doxygen grouping constructs ("@{" and "@}") in Doxygen comments
rather than plain C++ ones to make them actually take effect. Some old
Doxygen versions (~1.8.5) did recognize them even in plain comments, but
the currently uses 1.9.1 one does not and @addtogroup didn't have any
effect as the result.

This fixes the problem with the "Functions by Category" pages being
empty in the resulting HTML documentation.

See #22572.
2022-08-03 18:28:06 +02:00
Vadim Zeitlin
eb1242cc1c Merge branch 'compat-32'
Remove WXWIN_COMPATIBILITY_2_8 and associated code, add
WXWIN_COMPATIBILITY_3_2.

See #22692.

Closes #22686.
2022-08-03 18:13:44 +02:00
Vadim Zeitlin
74e7f5ccc9 Fix incorrect use of strncpy() in Scintilla DMIS lexer
This strncpy() was copying a buffer to itself, justifiably resulting in
a -Wrestrict from gcc-12 when using -O2.
2022-08-03 17:45:29 +02:00
Vadim Zeitlin
6917b6b0f1 Document wxTHREAD_WAIT_DEFAULT value change
It has been a long-time coming, see b95a7c3144 (Allow wxThread::Wait()
and Delete() to block, even under wxMSW., 2011-03-14), but do still
document that it has finally changed.
2022-08-03 17:39:48 +02:00
Vadim Zeitlin
cb0c75fcc3 Remove the obsolete wxEffects files from master file list too
This should have been part of 8a64c8abdc (Remove v2.8 compatibility
flag, add v3.2 flag, 2022-08-01).
2022-08-03 17:29:54 +02:00
Vadim Zeitlin
6fcca0c275 Merge branch 'cxx20-warnings'
Fix more C++20 warnings about incompatible enums.

See #22683.
2022-08-03 17:27:26 +02:00
Artur Wieczorek
5b2991bb77 Get rid of obsolete wxPropertyGrid documentation 2022-08-02 08:28:52 +02:00
Artur Wieczorek
5e2da5a106 Get rid of v2.8 code 2022-08-02 08:26:29 +02:00
Artur Wieczorek
8a64c8abdc Remove v2.8 compatibility flag, add v3.2 flag 2022-08-02 08:26:04 +02:00
Artur Wieczorek
a3fd6cf4e6 Handle non-DIB wxBitmaps correctly in wxMenuItem
Such bitmaps can come from wxImageList but also be created directly, so
we need to handle them -- do it by converting them to DIB, if they are
not in this format yet.

This fixes black background for transparent areas in the menu bitmaps
shown for some of them.

See #22669.

Co-Authored-By: Vadim Zeitlin <vadim@wxwidgets.org>
2022-08-01 17:41:50 +01:00
k3DW
a12a2f1282 Don't use token-pasting with non-identifiers in msvc/wx/setup.h
This used to work with the non-standard preprocessor in the older MSVC
versions, but doesn't work with the new standard-compliant one in MSVS
2022 (enabled by /Zc:preprocessor).

Luckily, it seems that we don't really need it neither, as simply
expanding the macros in a /-separated strings work with both the new and
the old preprocessors and has the same effect, so just do this instead.

Also simplify the code a little by defining wxTOOLKIT_FULL and
constructing wxSETUPH_PATH once instead of twice.

See #22654, #22680.

Co-Authored-By: Vadim Zeitlin <vadim@wxwidgets.org>
2022-08-01 17:02:55 +01:00
Vadim Zeitlin
e0dd7b8522 Add a CI build using C++20
This should allow detecting C++20-specific problems, such as warnings
about combining incompatible enums.
2022-07-31 22:22:58 +02:00
Vadim Zeitlin
4b0fa10a29 Don't mix flags from different enums in wxRegEx unit test
Pass compilation and matching flags using separate parameters instead of
passing them as a single int and then separating them inside the
function.

This is a bit cleaner and also avoids warning about using deprecated
enum operations when using C++20.
2022-07-31 22:22:58 +02:00
Vadim Zeitlin
8a5d9295b7 Fix even more warnings about combining different enums in C++20
This completes the changes of 5477d4faa8 (Avoid warnings when combining
wxStaticText styles with C++20, 2022-07-20) which, in turn, was based on
3d278ee75f (Avoid warnings about operations on different enums in C++20
mode, 2021-04-25).

Also add a test checking that no warnings are given for all possible
enum values combinations (but this test is only useful when using
C++20).

See #22681.
2022-07-31 20:00:18 +02:00
Maarten Bent
667c5c843b CMake: Improve linking with OpenGL libraries
Don't replace OPENGL_LIBRARIES, but prepend existing targets too it.
Also add OPENGL_EGL_INCLUDE_DIRS to OPENGL_INCLUDE_DIR.

See #22649.

Closes #22677.
2022-07-30 15:02:34 +02:00
Aldo Mazzeo
20463b2e69 Replace raw stat/lstat with wx macros
This is shorter, more clear and more portable.

No real changes.

Closes #22670.
2022-07-30 15:01:27 +02:00
Vadim Zeitlin
6ed6d97bfe Don't use system libcurl under Mac with --disable-sys-libs
It doesn't seem right that the system zlib (installed by e.g. MacPorts)
can be picked up by configure even when --disable-sys-libs is specified,
so disable its use under Mac, as libcurl is optional there.

Still use the system libcurl under Linux in the same case, however, as
it's required to have wxWebRequest at all there and dependency on it is
not really a problem in practice.

This commit is best viewed with Git --color-moved
--color-moved-ws=ignore-all-space -w options.
2022-07-30 15:00:27 +02:00
Vadim Zeitlin
57bf9c5af5 Escape all "__" in Doxygen to preserve them in the output
New version of Doxygen interprets __foo__ as Markdown markup and
consumes the underscores, which mangles the identifier.

Prevent this from happening by escaping the leading underscore for all
occurrences of "__" outside of the code blocks, this seems to be the
least intrusive fix.

See #22671.
2022-07-30 14:56:23 +02:00
valid-ptr
0e57ed1851 Fix regression in AUI floating pane positioning when dragging
Fix position updating broken since the recent changes of e777a82bfd (Fix
AUI floating position mismatch, 2022-05-25).

See #22533.

Closes #22651.
2022-07-25 15:57:06 +02:00
Vadim Zeitlin
7bfad4984c Make generic wxListCtrl lines more visible
Use wxSYS_COLOUR_GRAYTEXT, as wxSYS_COLOUR_3DLIGHT is not visible at all
on the default white background under macOS and is barely visible with
the default GTK theme.

On the flip side, it's too bright in the dark themes, but this is,
arguably, better than not being visible at all.

See #22664.
2022-07-24 19:13:21 +02:00
Vadim Zeitlin
43d0eb48c1 Merge branch 'cmake-install'
Fix problems with CMake install target: handle DESDIR and spaces in the
installation path correctly.

See #22660.
2022-07-24 17:09:32 +02:00
Maarten Bent
600bf54a06 Use DESTDIR when creating symlinks in CMake install
Prepend $ENV{DESTDIR}, sufficiently escaped to delay its expansion until
the execution of "cmake -E create_symlink" command, to the command path
arguments.

Closes #22653.

See #22610.
2022-07-24 17:06:12 +02:00
David Connet
5477d4faa8 Avoid warnings when combining wxStaticText styles with C++20
Because wxStaticText can contain arbitrary combinations of both
alignment and border flags, we need to allow using "|" on them, just as
it was done for a few other enums in 3d278ee75f (Avoid warnings about
operations on different enums in C++20 mode, 2021-04-25).

See #22656.

Closes #22657.
2022-07-24 15:56:12 +01:00
Vadim Zeitlin
8e2c683bf7 Merge branch 'grid-message'
Improve wxGrid messages documentation and safety.

See #22652.
2022-07-24 15:52:15 +01:00
Thomas Klausner
770bcaf378 Handle NetBSD like other BSDs for ping in wxDialUpManager
NetBSD does not define __BSD__, use __NetBSD__.

See #22645.
2022-07-24 16:51:16 +02:00
Thomas Klausner
9efe21b55a Fix dlopen() detection in CMake under non-Linux systems.
Linux (until recently) defined dlopen() in libdl, but some other
operating systems (such as NetBSD) have it in libc.

Use CMake-provided variable for the name of the library to use for
dlopen() to fix NetBSD build.

See #22644.
2022-07-24 16:48:38 +02:00
Vadim Zeitlin
556868390f Merge branch 'statvfs'
Fix statvfs() detection in CMake under NetBSD and prefer statvfs() to
non-portable statfs() more generally.

See #22643.
2022-07-24 16:44:06 +02:00
Vadim Zeitlin
e62e7a6d62 Check for statvfs() first in configure
This POSIX function should be preferred to Linux/BSD-specific statfs()
if it's available (as should always be the case nowadays).

This commit is best viewed with Git --color-moved
--color-moved-ws=ignore-all-space -w options.
2022-07-24 16:43:04 +02:00
Vadim Zeitlin
3cdcee26c2 Merge branch 'tdmgcc-textctrl-fix'
Fix crash when using wxTextCtrl with TDM-GCC.

See #22641.
2022-07-24 15:29:00 +01:00
Vadim Zeitlin
1f5ccdfb65 Update expat submodule to fix rand_s() warning
No real changes, just avoid a warning about using an undeclared function
during the build.

Closes #22640.
2022-07-24 15:28:02 +01:00
Tim Stahlhut
c69ee439d9 Stop using wxWidgets 1.xx wxString compatibility functions
Replace them with std::string-like equivalents when possible (i.e.
replace Length() with length(), IsNull() with empty()) or, at least,
with wx 2 functions if not (e.g. Remove() with Truncate(), First() with
Find(), LowerCase() with MakeLower() etc).

Closes #22638.
2022-07-24 16:25:29 +02:00
Vadim Zeitlin
541be26e78 Mention that changes in 3.2.x should also be part of 3.3.0
It's a bit wasteful to also mention these changes in the Git notes, so
don't do it and just leave a reminder to copy the existing change log
entries from 3.2 branch instead when it's time to release 3.3.0.
2022-07-24 16:24:33 +02:00
Vadim Zeitlin
5b89e53bc3 Merge branch 'macos_webview_fullscreen_fix' of https://github.com/TcT2k/wxWidgets
Improve wxWebView full screen support under macOS.

See #22637.
2022-07-24 16:12:41 +02:00
Vadim Zeitlin
6fdfe98157 Merge branch 'filedialog-add-dir'
Add wxFileDialog::AddShortcut().

See #22543.

See #22635.
2022-07-24 15:11:13 +01:00
Tim Stahlhut
7626f53788 Use wxGetDisplayInfo() only when using wxGTK under Unix
Fix wxGTK build under MSW.

See #22633.
2022-07-24 16:06:05 +02:00
Vadim Zeitlin
7667bf30eb Merge branch 'version-3.3'
Update version of the libraries to 3.3 in master.
2022-07-24 16:05:21 +02:00
Maarten Bent
e4f230a3e1
CMake: Support spaces in install path with symlinks
Add quotes around the paths so they are treated as one argument.
2022-07-22 00:22:28 +02:00
Tobias Taschner
bfce3d2b87
macOS: wxWebView expand fullscreen element
Expand the fullscreen element via CSS styles to
enhance the emulation of native safari behaviour.
2022-07-21 15:25:58 +02:00