Commit Graph

70987 Commits

Author SHA1 Message Date
Kvaz1r
b8d9ac9a32 Revert MSW-specific changes for wxTextCtrl tests in wxUniv 2021-08-07 11:03:03 +03:00
Kvaz1r
e3acc50fbc Improve wxTE_PROCESS_ENTER handling in wxUniv 2021-08-07 10:42:22 +03:00
Kvaz1r
5d1a936f73 Revert "Handle WM_GETDLGCODE in wxTextCtrl for wxUniv too"
This reverts commit af8b662868.
2021-08-07 09:40:26 +03:00
Kvaz1r
af8b662868 Handle WM_GETDLGCODE in wxTextCtrl for wxUniv too 2021-08-02 10:05:37 +03:00
Kvaz1r
f7f6575bfb Fix positions tests 2021-08-01 11:33:03 +03:00
Kvaz1r
335d0bec0c Skip or disable unsupported tests 2021-08-01 11:22:12 +03:00
Kvaz1r
5bc725f505 Set insertion point to 0 in SetValue for multiline 2021-07-27 10:50:24 +03:00
Kvaz1r
3e675fa75e Fix HitTestSingleLine(Scrolled) 2021-07-26 11:13:14 +03:00
Kvaz1r
a02b930596 Fix HitTestSingleLine(Beyond) 2021-07-26 11:06:51 +03:00
Vadim Zeitlin
912f4b76ac Fix wxGTK build after WXSetInitialFittingClientSize() change
This should have been part of 136574b1e0 (Make wxSizer::SetSizeHints()
work again, 2021-07-24).

See #19170.
2021-07-24 19:15:55 +02:00
Vadim Zeitlin
f58af942ef Merge branch 'github-actions-cmake' of https://github.com/MaartenBent/wxWidgets
Add CI workflow using CMake.

See https://github.com/wxWidgets/wxWidgets/pull/2440
2021-07-24 18:22:50 +02:00
Vadim Zeitlin
4186292e11 Improve wxIMPLEMENT_APP() documentation
Explain that this macro defines the application entry point.

Also document wxIMPLEMENT_WXWIN_MAIN which wasn't documented at all
previously.
2021-07-24 17:21:39 +01:00
Vadim Zeitlin
83396e54b5 Extend and improve wxSizer::SetSizeHints() documentation
Notably explicitly mention that the parameter of this method does not
need to be the window using this sizer.
2021-07-24 17:21:39 +01:00
Vadim Zeitlin
136574b1e0 Make wxSizer::SetSizeHints() work again
This function was broken when it was called for a window which was not
the window the sizer was associated with since the recent (pre-3.1.5)
changes trying to work around the problem with the initial windows size
when using GTK 3, see 9c0a8be1dc (Merge branch 'gtk-initial-size',
2021-04-13).

Fix it by passing the sizer to use for calculating the size explicitly
to WXSetInitialFittingClientSize() when we have it, and only falling
back on the window's own sizer if we don't.

Closes #19170.
2021-07-24 17:21:39 +01:00
Vadim Zeitlin
0b71b8d8eb Use simpler expression for libgcc path in MSW CI workflow
Use the gcc option which outputs this path directly, rather than
constructing it manually from pieces.

No real changes.
2021-07-24 17:21:39 +01:00
Maarten Bent
fcd9b4ba2b Add CMake builds to GitHub Actions 2021-07-24 16:39:19 +02:00
Maarten Bent
7446c64333 Add script to determine proc count in CI 2021-07-24 16:38:28 +02:00
Artur Wieczorek
d4dd61800a Skip test known to fail under macOS < 10.13 2021-07-23 18:45:23 +02:00
Artur Wieczorek
bf2771d6d7 Check if stack of graphics states is empty while attempting to reset the clip
For macOS < 10.13 there is not available any method to really reset
the clipping region so ResetClip() is implemented using hack that
works for sure only if no graphics state was stored before on the stack
with PushState(). If ResetClip() is called when some graphics states
are already stored with PushState() we can only warn that resetting the clip
may be not effective.

See #19231.
2021-07-23 18:38:55 +02:00
Artur Wieczorek
7349f138e7 Keep track of graphics state stack depth
To avoid restoring graphics state from the empty stack. This
could also help in diagnosing potential problems with unbalanced
PushState()/PopState() calls.
2021-07-23 18:10:59 +02:00
Vadim Zeitlin
3e7ad82016 Merge branch 'more-tests-fixes'
Miscellaneous minor tests fixes/improvements.

See https://github.com/wxWidgets/wxWidgets/pull/2442
2021-07-23 00:17:11 +02:00
Vadim Zeitlin
f417705e97 Try better workaround for the ASAN CI build failures
Try excluding RichTextCtrlTestCase in the CI build using ASAN, as the
test can still be killed while running the Table sub-test of this test
case even when running only a subset of all tests, so try skipping this
one instead.
2021-07-22 22:01:41 +02:00
Vadim Zeitlin
9dbf063a75 Fix ProcessEnter unit tests when running it on its own with wxGTK
Apparently setting focus doesn't work until a mouse click is simulated
to bring up the main test window to the front. This happened implicitly
when running the full test suite, due to e.g. doing it in wxButton unit
tests, which come before wxComboBox::ProcessEnter test, but not when
running just this test (or wxTextCtrl::ProcessEnter) on its own.

Make the test self-contained by simulating a mouse click before
simulating pressing "Enter".
2021-07-22 19:15:50 +02:00
Vadim Zeitlin
e6bac095ca Get rid of CppUnit boilerplate in wxButton unit tests
No real changes, just simplify the code by using CATCH directly.
2021-07-22 19:15:07 +02:00
Vadim Zeitlin
05f36c4819 Merge branch 'ci-asan-fixes'
Work around test failures in the ASAN build on GitHub CI.

See https://github.com/wxWidgets/wxWidgets/pull/2439
2021-07-22 17:34:34 +02:00
Vadim Zeitlin
f982f15a65 Temporary work around for a problem in ProcessEnter() unit test
Running this test on its own doesn't work currently, so run
ButtonTestCase, which uses wxUIActionSimulator::Click(), which somehow
fixes the problem in ProcessEnter test (by giving focus to the correct
window, probably), before it to avoid failures in this test now that we
run "wx*" tests separately.
2021-07-22 17:32:40 +02:00
Vadim Zeitlin
6af7c3da82 Work around GUI tests failure in ASAN build on GitHub CI
It seems like running the full test suite runs out of memory, as the
test is simply killed, without any more details, after running a certain
number of tests.

Split the tests into 2 parts and run them separately to work around this
problem.
2021-07-22 17:31:21 +02:00
Vadim Zeitlin
1154689322 Show the GUI tests being executed in the CI workflow
This is useful to check where the test dies when it does it.
2021-07-22 17:27:43 +02:00
Maarten Bent
8fe396d890 Fix -Wundef warnings in iOS build
Make sure <Availability.h> is always included in macOS/iOS build.
2021-07-21 22:32:28 +02:00
Artur Wieczorek
c175b31630 Suppress "parameter unused" error in some builds 2021-07-21 07:21:29 +02:00
Artur Wieczorek
7ce588afab Don't use wxDC to get clipping box in wxGCDC
We shouldn't call wxDCImpl::DoGetClippingRect() from
wxGCDCImpl::DoGetClippingRect() because it wouldn't return the correct
result if there is an affine transformation applied to this DC,
as wxDCImpl is not aware of such transformations.
2021-07-20 23:10:26 +02:00
Artur Wieczorek
9e5c3a1152 Fix destroying clipping region for wxGCDC with applied affine transformation
We need to take into account all aplied transformations (including affine
transformations set with SetTransformMatrix()) while resetting clipping
box to its initial size.
2021-07-20 22:57:27 +02:00
Artur Wieczorek
42ee966b63 Add tests of clipping region functions for wxDC with transform matrix 2021-07-20 22:56:56 +02:00
Artur Wieczorek
902f4c61a4 Reimplement unit tests for clipping region functions with Catch
Use Catch instead of CppUnit for all unit tests here.
2021-07-20 22:42:02 +02:00
Artur Wieczorek
ce5e6cfc10 Fix setting clipping region for wxDC with rotated coordinate system (wxMSW)
We cannot assume that axis-aligned clipping box in local coordinates will
remain axis-aligned box in device coordinates so we need to take into
account all 4 corners of the clipping rectangle to create a polygonal
clipping region in device space.

Closes #19228.
2021-07-20 22:30:56 +02:00
James Pan
a35d8b932c Fix errors and inconsistent terms in zh_TW translations 2021-07-19 14:46:51 +02:00
Vadim Zeitlin
8b0decdf9d Merge branch 'univ_listbox_fixtest' of https://github.com/Kvaz1r/wxWidgets
Fix wxListBox in wxUniv to pass HitTest and ClickNotOnItem unit tests.

See https://github.com/wxWidgets/wxWidgets/pull/2432
2021-07-17 20:41:50 +02:00
Vadim Zeitlin
d81d7b1563 Exclude .gitmodules from whitespace code style checks
This file uses TABs and can keep using them.
2021-07-17 20:41:18 +02:00
Kvaz1r
1e680157a9 Send event on toggle deselecting 2021-07-17 20:48:31 +03:00
Vadim Zeitlin
3489a07ad6 Avoid harmless MSVS 2019 variable shadowing warning
Rename a local variable to avoid clashing with the same name in an outer
scope, fixing a warning introduced in f41564a3e2 (Add
wxRegEx::ConvertFromBasic() helper, 2021-06-18).
2021-07-17 18:17:26 +02:00
Vadim Zeitlin
71d1ced5b8 Fix recently broken wxRegEx build in UTF-8 mode
Restore the use of c_str() replaced with wx_str() in 4dd77dabe8 (Check
for WXREGEX_CONVERT_TO_MB when calling regcomp() too, 2021-07-16), as
it's still necessary when wxUSE_UNICODE_UTF8==1.
2021-07-17 17:59:05 +02:00
Vadim Zeitlin
304d5e6c59 Merge branch 'regex-prepare-pcre'
Cleanup and simplify wxRegEx code.

See https://github.com/wxWidgets/wxWidgets/pull/2437
2021-07-17 17:13:38 +02:00
Vadim Zeitlin
fa1f7e74ce Merge branch 'deprecate-filename-normalize'
Deprecate wxFilename::Normalize() without flags and add convenient
GetAbsolutePath() to be used instead.

See https://github.com/wxWidgets/wxWidgets/pull/2428
2021-07-17 17:10:40 +02:00
Vadim Zeitlin
7ebb20fb04 Merge branch 'combo-simplify'
Simplify wxComboCtrl code by always using wxPopupTransientWindow if it's
available instead of various platform-specific workarounds that
shouldn't be needed any longer.

See https://github.com/wxWidgets/wxWidgets/pull/2423
2021-07-17 17:08:29 +02:00
Vadim Zeitlin
11d89a2233 Show "sys" when system liblzma is detected by configure
This is just a cosmetic change to make the lzma line in the summary
shown by configure at the end consistent with the other libraries.
2021-07-17 17:04:21 +02:00
Vadim Zeitlin
4dd77dabe8 Check for WXREGEX_CONVERT_TO_MB when calling regcomp() too
Make code more consistent by using the same approach as in the other
places where conversion is necessary in some builds and define temporary
variables for clarity.

Also use wx_str() when the conversion is not necessary rather than
c_str() as this is more efficient and allows to address an existing
FIXME comment.
2021-07-16 11:23:17 +02:00
Vadim Zeitlin
fb21f556a7 Use wxCharBuffer instead of manual allocations in GetErrorMsg()
Replace new[]/delete[] with a wxCharBuffer object.

Also check for conversion failure when converting the error message to
wide char string.
2021-07-16 11:17:32 +02:00
Vadim Zeitlin
d83368664c Remove unnecessary call to clear() in Replace()
There doesn't seem to be any need to clear the string in
WXREGEX_CONVERT_TO_MB case.
2021-07-16 11:02:48 +02:00
Vadim Zeitlin
838b693b46 Fix wxRegEx::GetMatch() to work in WXREGEX_CONVERT_TO_MB case
Using the offset into the wide string doesn't work for non-ASCII
characters, it must be converted to UTF-8 first.
2021-07-16 00:06:31 +02:00
Vadim Zeitlin
3a52523f96 Simplify code in wxRegExImpl::Replace()
Check for WXREGEX_CONVERT_TO_MB once and define textstr variable
pointing to the string data instead of using it several times.

No real changes.
2021-07-16 00:06:31 +02:00