Reset tool position state before setting to first and/or last
Default initialize members
Avoid div by zero
Document set_colour_scheme parameter of wxRibbonMSWArtProvider Refer to discussion in https://github.com/wxWidgets/wxWidgets/pull/26644
Avoid virtual call from wxRibbonMSWArtProvider CTOR See discussion from https://github.com/wxWidgets/wxWidgets/pull/26644
Remeasure wxRibbonButtonBar button when wxEVT_UPDATE_UI changes its text Also, update sample to show this fix (and IMO make more sense in what the demo is showing off).
Fix stale small bitmap in wxRibbonButtonBar::SetButtonIcon() Mirrors what InsertButton() does. Without this, it won't the expected icon in medium size mode.
Nullify (possible) dangling pointer in gallery clear
Demonstrate removing panels in the ribbon demo Useful in the demo, and also tests an upcoming fix
Fix use-after-free when deleting a wxRibbonPanel
Fix client size computation when using overlay scrollbars in wxGTK Using overlay scrollbars is the default since GTK 3.16, but the existing code always returned wrong client size when using them because it still subtracted the scrollbar size from the total window size even though this must not be done when the overlay scrollbar are used as they overlap the client size instead of reducing it, as normal scrollbars. GTK doesn't seem to have a dedicated function for checking if the overlay scrollbars are really used, so combine several checks it is doing internally to determine if they are, and don't subtract their size from the total area if we establish that this is the case.
Test that client size correctly accounts for scrollbars Check that client size is reduced by the size of the scrollbars if it changes at all when scrollbars appear -- because it may not be the case when overlay scrollbars are used. Note that this test wouldn't pass with wxGTK3 without the changes in the parent commit.
Fix best size of wxScrolledWindow when using overlay scrollbars The size of the scrollbars shouldn't be added to the size required by the window contents when overlay scrollbars are used. This required adding new wxWindow::GetScrollbarSize() function, which returns wxSYS_VSCROLL_[XY] by default but is overridden in wxGTK to return 0 when overlay scrollbars are used. It should almost certainly be overridden in wxOSX too. Currently the new function is used in wxScrolledWindow only but all the existing occurrences of wxSYS_VSCROLL_[XY] should be reviewed to check if it shouldn't be used instead of them too.
Rename wxScrollBar::GetScrollbarSize() in wxUniv Avoid name conflict with the new wxWindow member function using the same name.
Add "micro" version parameter to wx_is_at_least_gtk3() This will allow checking for 3.24.x in the upcoming commit.
Simplify and improve check for "gtk-overlay-scrolling" property It's documented as having been added in 3.24.9, so just test for this version instead of checking if the property exists.
Make SetInitialSize() return false if it didn't change the size Allow the caller know if the size was changed or not. This is not used yet but will be in the upcoming commit.
Fix broken wxRadioBox layout if it was created with its best size If SetInitialSize() in wxRadioBox::Create() happened to not change its size, its buttons could be never positioned correctly. Add an explicit Layout() call in this case to fix this. This fixes a regression introduced in ce1ee46b0c (Use wxRadioButton in MSW wxRadioBox implementation, 2022-12-24).
Skip unnecessary layout in wxPickerBase::Create() If SetInitialSize() has already resized the control, as it typically would, there is no need to call Layout() again.
Convert simple non-GUI unit tests to use Catch directly Get rid of the CppUnit-compatible macros in these tests and use Catch TEST_CASE() and CHECK()/REQUIRE() directly instead. No real changes, except for enabling the previously mistakenly (they were clearly meant to be) not run RefUnsignedCharAssignmentOperator and RefUnsignedCharParenOperator tests in unichar.cpp. Moreover, one of them turned out to be broken and had to be fixed here as it does run now.
Convert more non-GUI unit tests to use Catch directly Replace the CppUnit test suite classes with Catch test cases, using fixtures for the tests which need them. No real changes.
Convert socket, thread, events and interactive tests to Catch Notably, the socket tests using the event loop now use Catch GENERATE() to run them both with and without the active event loop instead of the PseudoTest_SetUseEventLoop() hack. No other changes.
Convert stream unit tests to use Catch directly Replace the CppUnit test suites with Catch test cases, using WX_STREAM_TEST_CASE() to define the test cases running the tests inherited from BaseStreamTestCase. The pseudo tests used to run the same tests with different parameters are replaced with Catch GENERATE(). Also make the large file tests actually run: they were previously never executed as the suite returned by GetlargeFileSuite() was never used.
Convert archive unit tests to use Catch directly Replace CppUnit::TestCase/TestSuite with our own ArchiveTest base class, which is all that was really needed here, and run the tests from a single Catch test case per archive format. Also make the previously unused ZipPipeTestCase reachable, but keep it disabled by default as it currently fails.
Get rid of the last CppUnit macros in non-GUI tests Also update the unit tests documentation to reflect that only the GUI tests still use the old CppUnit style.
Fix C++11 build by including wx make_unique.h std::make_unique() doesn't exist in C++11 which we still support.
Convert simple GUI unit tests to use Catch directly Get rid of the CppUnit compatibility macros in the GUI test files not requiring any special handling: replace the test suite classes with Catch fixtures, setUp()/tearDown() with the ctor/dtor and CPPUNIT_ASSERT_XXX() with CHECK(). Tests using wxUIActionSimulator don't use WXUISIM_TEST() any more but check EnableUITests() at the beginning of the test itself instead. The pseudo test PseudoTest_Inversed in the wxSlider tests is replaced with GENERATE() rerunning the tests for both normal and inversed sliders. No real changes. Assisted-by: Claude Opus 5
Convert the remaining GUI unit tests to use Catch directly Get rid of CPPUNIT_TEST_SUITE() and the other CppUnit compatibility macros in all the remaining GUI tests, including the ones sharing their tests via a common base class: wxItemContainer, wxTextEntry, wxBookCtrlBase and wxPickerBase tests are now defined using the new wxXXX_TESTS() macros generating one Catch test case per test instead of being listed inside the test suite of the derived class. Replace WXUISIM_TEST() with a check for EnableUITests() at the beginning of the test itself and remove this macro from testprec.h, adding the new generic wxTEST_CASE_FOR_METHOD() helper used by all the macros above there. Get rid of the pseudo tests: wxTextCtrl tests for the multi-line controls now use a separate fixture deriving from the single-line one instead of PseudoTestSwitchToMultiLineStyle() and the owner-drawn wxListBox tests use GENERATE() instead of PseudoTest_OwnerDrawn(). No real changes. Assisted-by: Claude Opus 5
Convert wxAffineMatrix2D tests to use Catch directly These tests use several fixtures deriving from each other and running the same tests, so define the test cases for all of them using a helper macro. Also merge setUp() and tearDown() into the fixture ctor and dtor. No real changes. Assisted-by: Claude Opus 5
Remove wx/catch_cppunit.h, no longer used by anything Now that none of the tests use the CppUnit compatibility macros any more, this header can be removed entirely. Move the pieces still needed by the tests, i.e. wxINFO_FMT(), WX_ASSERT_MESSAGE(), WX_ASSERT_EQUAL_MESSAGE() and the Catch::StringMaker specializations for wxString and wxUniChar[Ref], to tests/testprec.h. wxGetCurrentTestName() is now implemented using Catch itself instead of the strings set by the CppUnit macros, which means that it finally returns the correct name for all the tests and not just the CppUnit-style ones. Assisted-by: Claude Opus 5
Don't put INFO() and CHECK() on the same line in the tests This is a leftover from the automatic conversion of the CppUnit assertion macros with a message to Catch, using two separate lines is more readable. No real changes. Assisted-by: Claude Opus 5
Add checks for clipboard state to wxTextCtrl::LongPaste test Try to give better error message if the test fails because of a problem with the clipboard and not with wxTextCtrl itself.
Fix wxHtmlPrintout::Pagination test failing depending on the font DPI The test used a font with a fixed size in pixels and passed its point size to SetStandardFonts() in order to be independent of the DPI, but this only works if wxFont uses the same DPI for the pixel to point conversion as the one used when rendering the text later, which is not the case under wxGTK, where wxFontInfo(wxSize(10, 16)).GetPointSize() returns 9 and not the expected 12, resulting in smaller text and hence fewer pages than expected. Compute the point size corresponding to the desired pixel size ourselves, using the PPI of the DC the text is going to be rendered on, and also set the printer PPI to the screen one, on all platforms and not just wxGTK3, to ensure that the fonts are not scaled when rendering.
Check result of wxHtmlPrintout::SetUp() in pagination unit test It shouldn't fail, but make sure we detect it if it does.
Make the text used in wxHtmlPrintout::Pagination test more readable Use raw literal for it and strip all the quotes except the escaped ones in the text itself, which now don't need to be escaped any longer.
Update test exclusions in the CI jobs to match the new test names The changes in this branch have changed the names of many tests, update the exclusion lists to use the new names.
Replace raw pointers in tests fixtures with std::unique_ptr<> Now that we have fixtures, with ctors and dtors, instead of setUp() and tearDown(), we can use std::unique_ptr<> instead of manual memory management. No real changes.
Fix compilation of stream position checks with MSVC CHECK(pubseekoff(...) == int) failed to compile because of an ambiguity due to multiple overloaded operator==()s in MSVC CRT. Add a global operator==() overload matching the actual types to help this compiler to do the right thing. This should be reverted when support for MSVS 2015 is dropped.
Fix wxGrid::MakeCellVisible() with variable row heights Use the current unscrolled origin and the actual target-cell bottom when scrolling down, instead of rebuilding a position from preceding row heights. Add a grid regression test with mixed row heights. Fixes #4371. Closes #26897.
Make wxDateTime::GetAsDOS() work for dates after 2038 Compute the DOS date/time fields from wxDateTime::GetTm() instead of round-tripping through time_t. This lets representable DOS dates beyond the 32-bit time_t range, including 2079-04-08, pack correctly while still rejecting years outside the DOS 1980..2107 range. Add focused datetime coverage for the DOS minimum, the reported 2079 date, and the DOS maximum. Fixes #4393. Closes #26898.
Merge branch 'RibbonFixes2' of github.com:Blake-Madden/wxWidgets Miscellaneous fixes and improvements to wxRibbon and its sample. See #26870.
Fix crash in wxWebView Edge backend due to dangling callbacks The creation of wxWebView instances with the Edge backend involves async callbacks. If a WebView instance is created and then destroyed before the callback completes, the callback is left with a dangling pointer. Fix this by using a std::shared_ptr<bool> to indicate whether the instance is still alive. If it is not, abort the callback instead of crashing. Fixes #26491. Closes #26871. Co-authored-by: Vadim Zeitlin <va...@wxwidgets.org>
Merge branch 'gtk-overlay-sb-client-size' Fix client size computation in wxGTK when using overlay scrollbars. See #26889.
Merge branch 'msw-fix-initial-radiobox-layout' Fix initial layout for radiobox using fixed size in wxMSW. See #26893.
Respect specified best size when adding wxAUI panes Seed the initial dock size from an explicit wxAuiPaneInfo::BestSize() when no saved dock size is present. This lets AddPane() honor requested left/right or top/bottom pane sizes without making callers use MinSize() as a workaround, while preserved dock sizes from restored layouts still take precedence. Add AUI manager tests for explicit BestSize() and saved dock_size precedence. Fixes #4404. Closes #26899.
Check for wayland-protocols before using it in configure wx_cv_wayland_protocols_dir could be empty if the wayland-protocols package wasn't installed, but wxHAVE_WAYLAND_SESSION_MANAGEMENT was still being defined unconditionally in this case, resulting in wayland.cpp trying to include the never-generated xdg-shell-client-protocol.c and failing to compile. Only define wxHAVE_WAYLAND_SESSION_MANAGEMENT if xdg-shell.xml is actually found under the wayland-protocols data directory, falling back to disabling session management support otherwise, just as is already done when GTK is too old to support it. Closes #26926.
Merge branch 'drop-cppunit' Get rid of the remains of CppUnit support, replace all use of compatibility macros with direct use of Catch. See #26873.
Test split wxAuiNotebook tab event selections Add regression coverage for split wxAuiNotebook tab events. Verify that middle and right tab events report the notebook page index instead of the local tab-control index. See #9869. Closes #26906.
Emit AUI page-changed event after removing last page Send wxEVT_AUINOTEBOOK_PAGE_CHANGED when DeletePage() or RemovePage() removes the selected last wxAuiNotebook page and changes the selection to wxNOT_FOUND. Add coverage for both removal paths and keep programmatic removal from emitting page-close events. Fixes #9920. Closes #26907.
Fix use-after-free with duplicate names in archive wxFileSystem Don't remove wxArchiveEntry if another entry with the same name is encountered, still keep it in the list of all entries so it can continue to be used. This needed changing the ownership rules in wxArchiveFS code: now the entries are owned by the list and not by the hash table as before, hash table now stores non-owning pointers only. Closes #26927.
Replace "new T" with "make_unique<T>" in wxFileSystem unit test No real changes, just use make_unique<> for consistency.
—
View it on GitLab.
You're receiving this email because of your account on gitlab.com. Manage all notifications · Help