Skip to content
Snippets Groups Projects
  1. Feb 25, 2022
    • Lyndon Brown's avatar
      qt: fix signal-mapper deprecation warnings · 30618b6a
      Lyndon Brown authored and Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen committed
      I included adaptation here of a few existing cases using a different
      solution to the helper defines suggested in review.
      
      Example warning:
      ```
      ../../modules/gui/qt/dialogs/preferences/simple_preferences.cpp: In constructor 'SPrefsCatList::SPrefsCatList(qt_intf_t*, QWidget*)':
      WARNING : ../../modules/gui/qt/dialogs/preferences/simple_preferences.cpp:254: 40:  'void QSignalMapper::mapped(int)' is deprecated: Use QSignalMapper::mappedInt(int) instead [-Wdeprecated-declarations]
        254 |     connect( mapper, QOverload<int>::of(&QSignalMapper::mapped), this, &SPrefsCatList::switchPanel );
            |                      ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
      In file included from /usr/include/x86_64-linux-gnu/qt5/QtCore/QSignalMapper:1,
                       from ../../modules/gui/qt/dialogs/preferences/simple_preferences.cpp:45:
      /usr/include/x86_64-linux-gnu/qt5/QtCore/qsignalmapper.h:71:10: note: declared here
         71 |     void mapped(int);
            |          ^~~~~~
      ```
      30618b6a
    • Lyndon Brown's avatar
      qt: fix deprecation warning · 19d51ba2
      Lyndon Brown authored and Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen committed
      ```
      ../../modules/gui/qt/dialogs/preferences/simple_preferences.cpp: In constructor 'SPrefsPanel::SPrefsPanel(qt_intf_t*, QWidget*, int)':
      WARNING : ../../modules/gui/qt/dialogs/preferences/simple_preferences.cpp:811: 52:  'void QButtonGroup::buttonClicked(int)' is deprecated: Use QButtonGroup::idClicked(int) instead [-Wdeprecated-declarations]
        811 |             connect( radioGroup, QOverload<int>::of(&QButtonGroup::buttonClicked),
            |                                  ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      In file included from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/QButtonGroup:1,
                       from ../../modules/gui/qt/dialogs/preferences/simple_preferences.cpp:44:
      /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qbuttongroup.h:90:10: note: declared here
         90 |     void buttonClicked(int);
            |          ^~~~~~~~~~~~~
      ```
      19d51ba2
    • Lyndon Brown's avatar
      qt: use strongly-typed connects · eb0b785f
      Lyndon Brown authored and Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen committed
      This replaces almost all use of `SIGNAL()` and `SLOT()` with Qt5-style
      strongly-typed connections. The `CONNECT()`, and `DCONNECT()` helpers
      built around them have been removed.
      
      Cases involving the `BUTTON_*` macros will be tackled in a separate
      commit to improve clarity.
      
      A few cases remain using `SIGNAL()` and `SLOT()` for now due to
      complications that should be dealt with separately.
      eb0b785f
  2. Feb 24, 2022
  3. Feb 23, 2022
Loading