mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-02 19:43:55 -07:00
Add backwards support Qt6.7's checkStateChanged on QCheckBoxes (#5137)
This commit is contained in:
parent
b041f4ace2
commit
8d5421d9da
18 changed files with 251 additions and 176 deletions
17
cockatrice/src/utility/macros.h
Normal file
17
cockatrice/src/utility/macros.h
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
#ifndef COCKATRICE_MACROS_H
|
||||
#define COCKATRICE_MACROS_H
|
||||
|
||||
#include <QtGlobal>
|
||||
|
||||
// Qt6.7 changed how stateChanged functionality
|
||||
// of QCheckBoxes work.
|
||||
// See https://doc.qt.io/qt-6/qcheckbox.html#checkStateChanged
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 7, 0)
|
||||
#define QT_STATE_CHANGED checkStateChanged
|
||||
#define QT_STATE_CHANGED_T Qt::CheckState
|
||||
#else
|
||||
#define QT_STATE_CHANGED stateChanged
|
||||
#define QT_STATE_CHANGED_T int
|
||||
#endif
|
||||
|
||||
#endif // COCKATRICE_MACROS_H
|
||||
Loading…
Add table
Add a link
Reference in a new issue