[Git][wxwidgets/wxwidgets][master] 4 commits: Remove unnecessary checks for ABI compatibility with 3.2

1 view
Skip to first unread message

Vadim Zeitlin (@_VZ_)

unread,
May 20, 2025, 12:43:51 PMMay 20
to wx-commi...@googlegroups.com

Vadim Zeitlin pushed to branch master at wxWidgets / wxWidgets

Commits:

  • d6619739
    by Vadim Zeitlin at 2025-05-20T15:56:20+02:00
    Remove unnecessary checks for ABI compatibility with 3.2
    
    wxEvtHandler in master doesn't need to be ABI-compatible with 3.2, so
    don't bother checking that it is and remove the static asserts added in
    c8ef488973 (SearchDynamicEventTable():  handle recursion, 2025-04-16)
    
    See #25336.
    
  • de68f5be
    by Lauri Nurmi at 2025-05-20T15:59:01+02:00
    Add missing 'override' to wxCursorBundle code
    
    Fix compilation with -Werror=suggest-override.
    
    Closes #25432.
    
  • 813d36f0
    by Vadim Zeitlin at 2025-05-20T17:39:59+02:00
    Try using -Wsuggest-override in the CI builds
    
    This is a useful warning and we want to ensure that wx compiles cleanly
    with it.
    
    Note that it can't be used for gcc < 11 (it is supported by it since 5.1
    but there are tons of false positives for the macros from wx/rtti.h with
    the older versions) and only relatively recent clang supports this
    gcc-compatible option.
    
  • 192477be
    by Vadim Zeitlin at 2025-05-20T18:14:41+02:00
    Hide separator window from screen readers in wxGenericAboutDialog
    
    This window is only used for decorative purposes and shouldn't be taken
    into account when TAB-bing around the dialog or using screen readers,
    but it was. Fix this by disabling it.
    
    Closes #25433.
    

6 changed files:

Changes:

  • .github/workflows/ci.yml
    ... ... @@ -105,21 +105,25 @@ jobs:
    105 105
                 container: ubuntu:20.04
    
    106 106
                 compiler: clang++-10
    
    107 107
                 configure_flags: --disable-sys-libs
    
    108
    +            extra_warnings: -Winconsistent-missing-override
    
    108 109
                 use_xvfb: true
    
    109 110
               - name: Ubuntu 22.04 wxGTK with wx containers
    
    110 111
                 runner: ubuntu-22.04
    
    111 112
                 configure_flags: --enable-compat30 --disable-std_containers
    
    113
    +            extra_warnings: -Wsuggest-override
    
    112 114
                 use_xvfb: true
    
    113 115
                 check_headers: true
    
    114 116
               - name: Ubuntu 24.04 wxGTK with ASAN
    
    115 117
                 runner: ubuntu-24.04
    
    116 118
                 configure_flags: --disable-compat32 --disable-sys-libs
    
    119
    +            extra_warnings: -Wsuggest-override
    
    117 120
                 skip_samples: true
    
    118 121
                 use_asan: true
    
    119 122
                 use_xvfb: true
    
    120 123
               - name: Ubuntu 24.04 wxGTK with UBSAN
    
    121 124
                 runner: ubuntu-24.04
    
    122 125
                 configure_flags: --with-cxx=20
    
    126
    +            extra_warnings: -Wsuggest-override
    
    123 127
                 use_ubsan: true
    
    124 128
                 use_xvfb: true
    
    125 129
                 build_out_of_tree_samples: true
    
    ... ... @@ -270,7 +274,7 @@ jobs:
    270 274
     
    
    271 275
               if [ -z ${{ matrix.allow_warnings }} ]; then
    
    272 276
                 if [ -z ${{ matrix.allow_extra_warnings }} ]; then
    
    273
    -              error_opts="-Wextra"
    
    277
    +              error_opts="-Wextra ${{ matrix.extra_warnings }}"
    
    274 278
                 fi
    
    275 279
                 error_opts="$error_opts -Werror $allow_warn_opt"
    
    276 280
                 echo "wxMAKEFILE_ERROR_CXXFLAGS=$error_opts" >> $GITHUB_ENV
    

  • .github/workflows/ci_mac.yml
    ... ... @@ -141,7 +141,7 @@ jobs:
    141 141
                 ;;
    
    142 142
             esac
    
    143 143
             if [ -z ${{ matrix.allow_warnings }} ]; then
    
    144
    -          error_opts="-Werror $allow_warn_opt"
    
    144
    +          error_opts="-Werror -Wsuggest-override $allow_warn_opt"
    
    145 145
               echo "wxMAKEFILE_ERROR_CXXFLAGS=$error_opts" >> $GITHUB_ENV
    
    146 146
               echo "wxMAKEFILE_CXXFLAGS=$wxMAKEFILE_CXXFLAGS $error_opts" >> $GITHUB_ENV
    
    147 147
             fi
    

  • .github/workflows/ci_msw.yml
    ... ... @@ -176,7 +176,7 @@ jobs:
    176 176
               cmake -G "MinGW Makefiles" \
    
    177 177
                     -DCMAKE_C_COMPILER=clang.exe \
    
    178 178
                     -DCMAKE_CXX_COMPILER=clang++.exe \
    
    179
    -                -DCMAKE_CXX_FLAGS=-Werror \
    
    179
    +                -DCMAKE_CXX_FLAGS="-Werror -Wsuggest-override" \
    
    180 180
                     -DCMAKE_BUILD_TYPE=Release \
    
    181 181
                     -DwxBUILD_SAMPLES=ALL \
    
    182 182
                     -DwxBUILD_TESTS=ALL \
    

  • include/wx/event.h
    ... ... @@ -4106,9 +4106,6 @@ protected:
    4106 4106
         // instance of wxSharedPtr to extend the life of the wxRecursionGuardFlag
    
    4107 4107
         // to outlive wxRecursionGuard
    
    4108 4108
         wxSharedPtr<DynamicEvents> m_dynamicEvents;
    
    4109
    -    // ensure new m_dynamicEvents has same layout as wxWidgets 3.2 m_dynamicEvents
    
    4110
    -    static_assert(sizeof(wxSharedPtr<DynamicEvents>) == sizeof(DynamicEvents*), "wxSharedPtr<> has wrong size");
    
    4111
    -    static_assert(alignof(wxSharedPtr<DynamicEvents>) == alignof(DynamicEvents*), "wxSharedPtr<> has wrong alignment");
    
    4112 4109
     
    
    4113 4110
         wxList*             m_pendingEvents;
    
    4114 4111
     
    

  • src/common/curbndl.cpp
    ... ... @@ -61,7 +61,7 @@ public:
    61 61
         {
    
    62 62
         }
    
    63 63
     
    
    64
    -    virtual wxCursor GetCursorFor(const wxWindow* WXUNUSED(window)) const
    
    64
    +    virtual wxCursor GetCursorFor(const wxWindow* WXUNUSED(window)) const override
    
    65 65
         {
    
    66 66
             return m_cursor;
    
    67 67
         }
    

  • src/generic/aboutdlgg.cpp
    ... ... @@ -250,6 +250,7 @@ bool wxGenericAboutDialog::Create(const wxAboutDialogInfo& info, wxWindow* paren
    250 250
             wxWindow* const separator = new wxWindow(this, wxID_ANY);
    
    251 251
             separator->SetInitialSize(wxSize(1, 1));
    
    252 252
             separator->SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_3DLIGHT));
    
    253
    +        separator->Disable(); // Make it inactive for screen readers.
    
    253 254
             sizerTop->Add(separator, wxSizerFlags().Expand());
    
    254 255
     
    
    255 256
             sizerTop->Add(sizerBtns, wxSizerFlags().Expand().DoubleBorder());
    

Reply all
Reply to author
Forward
0 new messages