Commit Graph

70478 Commits

Author SHA1 Message Date
Vadim Zeitlin
a1dd894c77 Merge branch 'appveyor-webrequest' of https://github.com/MaartenBent/wxWidgets
Fix bug in wxWebRequest data upload code in WinHTTP implementation.

See https://github.com/wxWidgets/wxWidgets/pull/2199
2021-01-31 14:08:48 +01:00
Vadim Zeitlin
4da635e2dc Simplify WaitForPaint::YieldUntilPainted()
Don't return anything from it, just warn directly -- this is what all
the existing callers did, so it's simpler if the function just does it
itself instead of forcing them to check its return value.

Also reset m_painted after yielding, so that YieldUntilPainted() could
be called again, if necessary.
2021-01-31 01:33:30 +01:00
Vadim Zeitlin
e0a927af94 Wait for wxDataViewCtrl relayout under GTK in the unit test
A single wxYield() doesn't seem to be enough, at least not when running
in GitHub Actions environment, so wait for a longer time.
2021-01-31 01:33:30 +01:00
Vadim Zeitlin
367930f57d Fix setting LSAN_OPTIONS
Export them in the step running the test, not when configuring.
2021-01-31 01:33:30 +01:00
Vadim Zeitlin
07dfc18cc0 Disable wxWebView in ASAN CI build
Running wxWebView tests with ASAN results in "ASan runtime does not come
first in initial library list" warnings and doesn't work currently, so
disable wxWebView in this build for now to have a chance of passing the
tests.

It would be better to actually fix this, of course, but this will have
to wait until later.
2021-01-31 00:11:07 +01:00
Vadim Zeitlin
fd3897c2ab Enable GUI tests for the selected builds 2021-01-30 23:16:06 +01:00
Vadim Zeitlin
f2188be471 Recognize GitHub Actions as a CI environment in the test
This is necessary to activate the existing workarounds in the GUI tests.
2021-01-30 23:16:06 +01:00
Vadim Zeitlin
bde95c388c Fix linking of the GUI test when using static libraries
We need to explicitly link with the system libraries required in this
case, as static wxwebview library doesn't pull them in (it's also better
to link with them explicitly even when using shared libraries, but in
this case linking at least still worked due to transitive dependencies).
2021-01-30 22:49:24 +01:00
Vadim Zeitlin
29030d0c05 Reformat the job names
Try to make them appear more consistently in the Actions UI.

No real changes.
2021-01-30 22:40:10 +01:00
Maarten Bent
53a05f431f Set bytes written in callback in wxWebRequestWinHTTP 2021-01-30 22:14:19 +01:00
Maarten Bent
71a64f1d20 Get pointer to write buffer only once in wxWebRequestWinHTTP 2021-01-30 22:14:19 +01:00
Maarten Bent
6082dd9eb1 Show all wxWebRequest error descriptions in test output 2021-01-30 22:14:19 +01:00
Vadim Zeitlin
bc8f766b04 Add other Linux builds using configure to GitHub Actions CI
This is almost, although not quite, the same as we do in .travis.yml.

Note that CMake builds are not supported here yet.
2021-01-30 21:42:28 +01:00
Vadim Zeitlin
9e3079a695 Define wxUSE_XVFB for GitHub CI builds too
This is used in the test code to determine whether it's running under
Xvfb.
2021-01-30 21:42:28 +01:00
Vadim Zeitlin
ce5f135141 Fix allow_warnings check
We should disallow warnings when this flag is not defined, not when it
is.
2021-01-30 21:42:28 +01:00
Vadim Zeitlin
21fc248799 Use GTK 3 by default
Don't require defining gtk_version for all matrix elements neither.
2021-01-30 21:42:28 +01:00
Vadim Zeitlin
c58dc66056 Assume gcc compiler by default
Don't require defining gcc key in all matrix elements.
2021-01-30 21:42:28 +01:00
Vadim Zeitlin
7cba593a85 Fix ignoring paths for the GitHub CI builds
This was broken in 52d63eedd2 (Don't rerun CI builds for docs-only
changes, 2021-01-28) and no builds were run at all as the result.
2021-01-30 21:42:28 +01:00
Vadim Zeitlin
0d04792116 Show full text in single line MSW wxTextCtrl if possible
A single line MSW wxTextCtrl created with a value too long to fit into
it continued showing the value only partially even if its size was
subsequently increased to allow the entire value to be shown.

This apparently happens because changing the native EDIT control size
doesn't affect its (horizontal) scroll offset. Moreover, there doesn't
seem to be any way to explicitly tell the control to update it neither,
except for changing its text.

So do change its text every time its width changes, as long as it is not
visible (because visible jumps in the visible text position could be an
even worse problem than the one we're trying to solve here). This fixes
the originally reported bug at the cost of a bunch of extra calls to
DoWriteText() which should hopefully be not too expensive for single
line controls that don't typically contain that much text.

Closes #18268.
2021-01-30 20:43:14 +01:00
Vadim Zeitlin
247bb98d07 Generate Enter/Tab events even in readonly MSW wxTextCtrl
Respect wxTE_PROCESS_TAB and wxTE_PROCESS_ENTER flags even for readonly
text controls. Previously there were ignored for them due to the changes
of 080c709f70 (fix for handling TAB presses in readonly text controls,
2002-09-07), but there doesn't seem to be any good reason to do this, so
revert the changes of that commit by removing IsEditable() check from
our WM_GETDLGCODE handler.

We also need to avoid inserting TABs into readonly controls ourselves in
the default wxEVT_CHAR handler, so add a check for IsEditable() there to
compensate for the fact that these events are now received even for the
readonly controls.

This commit is best viewed ignoring whitespace-only changes.

Closes #19064.
2021-01-30 20:42:52 +01:00
Václav Slavík
8e80941183 Make refcounting actually work in wxFileSystemWatcher::Add()
The order of refcounting operations should be the opposite of what it
was: first check if the path is not watched already and only if it is
not call m_service->Add() to actually watch it. (Previously reference
count was kept track of, but m_service->Add() was always called, i.e.
the calls were repeated and unbalanced with Remove() calls.)

Remove() already has the correct order and only calls
m_service->Remove() when the path's refcount reaches zero.

This fixes a problem which was there since the original code was added
back in 76cfd1bf95 (Make wxFileSystemWatcher watch entries
reference-counted., 2012-10-15).

Closes https://github.com/wxWidgets/wxWidgets/pull/2203
2021-01-30 20:40:45 +01:00
Jouk
c65d5110aa update OpenVMS makefiles for credential dialog 2021-01-29 08:51:11 +01:00
Vadim Zeitlin
68a824da3c Fix using gethostbyxxx_r() with newer Android NDK
This might break using it with the older versions, but it's not clear
whether we still need to support them, so for now apply the simplest fix
which works with the recent NDK and we'll add configure tests later if
we really need them.

See https://github.com/wxWidgets/wxWidgets/pull/2195
2021-01-28 22:08:35 +01:00
Artur Wieczorek
914cc63d32 Fix navigating through wxPropertyGrid with wxPG_ACTION_EDIT
wxPG_ACTION_EDIT should not be considered done when wxPGProperty is
not editable (i.e. is disabled, read-only, is a wxPropertyCategory)
to prevent from blocking secondary actions (like
wxPG_ACTION_NEXT_PROPERTY) in this case.

Closes #19060.
2021-01-28 19:13:09 +01:00
Vadim Zeitlin
e7206701c5 Merge branch 'github-ci-test-webrequest'
Run wxWebRequest tests in the GitHub CI builds.

See https://github.com/wxWidgets/wxWidgets/pull/2197
2021-01-28 17:35:03 +01:00
Tobias Taschner
7532f93f7e macOS: Fix WebView print hang
At least under macOS 11 calling just runOperation: hangs, so use
runOperationModalForWindow: instead.

Closes https://github.com/wxWidgets/wxWidgets/pull/2198

Closes #19063.
2021-01-28 17:34:11 +01:00
Vadim Zeitlin
52d63eedd2 Don't rerun CI builds for docs-only changes
Avoid running the builds unnecessarily.
2021-01-28 17:33:26 +01:00
Paul Cornett
d932e89d40 Document when wxColour::IsSolid() was added 2021-01-28 07:31:36 -08:00
Paul Cornett
22349a79aa Use more accurate source for wxClientDC size with GTK3
Because GdkWindow size is updated somewhat asynchronously, it can lag behind
current window size. So get size from wxWindow instead. See #19062
2021-01-28 07:30:19 -08:00
Jouk
9d45591e15 Synchronize setup for OpenVMS with setup.h.in 2021-01-28 09:18:04 +01:00
Vadim Zeitlin
f31a064848 Install libcurl to make it available in the CI builds
It's not installed by default at least on GitHub Actions images.
2021-01-28 00:04:39 +01:00
Vadim Zeitlin
5e3464fcd6 Enable use of libcurl and test it using local httpbin instance
Libcurl was implicitly disabled by --disable-sys-libs, so enable it
explicitly to still use it.

Also install httpbin using pip to use it for wxWebRequest tests.
2021-01-27 23:58:58 +01:00
David Connet
5061a112a4 Define ~wxMSWOwnerDrawnButtonBase() for all compilers
There is no reason to only make it protected for gcc and clang, recent
MSVS versions can also give a warning (C5204, which is disabled by
default, but makes sense to enable) otherwise.

Also remove the comment about obsolete gcc 3.4.5.

Closes #19011.

Co-Authored-By: Vadim Zeitlin <vadim@wxwidgets.org>
2021-01-27 23:46:35 +01:00
Dimitri Schoolwerth
2a4c52a414 Fix recently introduced typo in a variable reference 2021-01-27 19:38:11 +01:00
Vadim Zeitlin
41afe95054 Merge branch 'qt-fixes'
Improvements to wxQt, including the addition of gesture events support.

See https://github.com/wxWidgets/wxWidgets/pull/2195

Closes #19042.
2021-01-27 19:06:43 +01:00
dsr
a3d58dadd9 Implement wxGestureEvent support for wxQt
Do it generically in wxWindow and also provide a special version for
wxGLCanvas for which the standard implementation doesn't work well.
2021-01-27 19:01:50 +01:00
dsr
7cd90e5b82 Reset stored window pointer in wxWindow dtor
This protects against orphan Qt events and signals.
2021-01-27 18:56:21 +01:00
dsr
2cf57fda36 Avoid crashes when destroying wxGLCanvas
Block signals that are not safe to process any more.
2021-01-27 18:42:16 +01:00
Vadim Zeitlin
d046a8fbc6 Remove currently unused wxGLContext::m_glContext
No real changes, just remove unused private field.
2021-01-27 18:41:06 +01:00
dsr
98e4f910a5 Implement setting wxGLCanvas attributes in wxQt
Simply remove the premature "return true" which was somehow added back
in df13791078 (Merge wxQT branch into the trunk., 2014-08-24) and add
WX_GL_MAJOR_VERSION support.
2021-01-27 18:34:54 +01:00
dsr
b692dd8aef Implement wxMenuItem::SetFont() for wxQt 2021-01-27 18:31:49 +01:00
Vadim Zeitlin
bb0f2f9768 Fix endptr output value in android_wcstoxxx()
These functions incorrectly multiplied an increment of wchar_t pointer
by sizeof(wchar_t), which made the result quite wrong, so just don't do
this.

See 744ea8a618 (For Android (wxQT), add private wcstol, wcstoul and
wcstod, 2015-02-11).
2021-01-27 18:29:57 +01:00
Vadim Zeitlin
a3b655fd60 Ensure that HAVE_GETHOSTBYADDR is defined under Android too
This is supposed to always be the same as HAVE_GETHOSTBYNAME, but
wasn't, because the latter was explicitly defined for Android after
defining the former as it.
2021-01-27 18:16:06 +01:00
dsr
7d7c43c4c3 Use localeconv() under Android, it's available there now
As of NDK21d, localeconv() is available under Android and can be used in
wxQt there.
2021-01-27 18:09:43 +01:00
Dimitri Schoolwerth
ddec29c338 Don't check for DrawThemeTextEx availability every DrawItemText()
Check for DrawThemeTextEx availability only once, which also seems to be
what ddceaab001 (Remove MSW wxUxThemeEngine class, 2017-10-27) intended
to do here by already introducing a static function pointer. Simply add
an init guard, also because the repeated check is not a cheap operation
(judging by comparing performance with drawing short texts).

Closes https://github.com/wxWidgets/wxWidgets/pull/2196
2021-01-27 17:57:19 +01:00
Vadim Zeitlin
1fed80f9b1 Merge branch 'webrequest-tests'
Make wxWebRequest CI tests more reliable by using local httpbin
instance.

See https://github.com/wxWidgets/wxWidgets/pull/2183
2021-01-27 17:55:42 +01:00
Vadim Zeitlin
97eecc1cce Merge branch 'sizerflags-center-align'
Fix combining wxSizerFlags alignment and CenterXXX().

See https://github.com/wxWidgets/wxWidgets/pull/2190
2021-01-27 17:55:18 +01:00
Vadim Zeitlin
871b928388 Merge branch 'mac-fixes'
Miscellaneous fixes for wxOSX.

See https://github.com/wxWidgets/wxWidgets/pull/2185
2021-01-27 17:54:45 +01:00
Vadim Zeitlin
78e7a966cc Revert "Fix wxSYS_COLOUR_BTNFACE value under macOS < 10.14"
This reverts commit 8e26b8d54e because it
has been superseded by 17239d5c3d (macOS add fallback for retrieving
color channels from dynamic system colors on pre 10.14 systems,
2021-01-26) in master.

See #18977.
2021-01-27 17:53:42 +01:00
Vadim Zeitlin
8e8a86aed0 Fix return code from testing script in case of error
Using type reset %errorlevel% and the errors were not detected any
longer.
2021-01-27 14:56:29 +01:00