Skip to content

Commit

Permalink
COMP: Fix QFlags deprecation warnings related to ctkColorPickerButton…
Browse files Browse the repository at this point in the history
…::ColorDialogOptions

This commit fixes warnings like the following reported when building
against Qt >= 5.15.

  /path/to/S-t/CTK/Libs/Widgets/ctkColorPickerButton.cpp:62:25: warning: 'QFlags' is deprecated: Use default constructor instead [-Wdeprecated-declarations]
    this->DialogOptions = 0;
                          ^
  /path/to/Support/Qt/5.15.2/clang_64/lib/QtCore.framework/Headers/qflags.h:123:5: note: 'QFlags' has been explicitly marked deprecated here
      QT_DEPRECATED_X("Use default constructor instead") Q_DECL_CONSTEXPR inline QFlags(Zero) noexcept : i(0) {}
      ^
  /path/to/Support/Qt/5.15.2/clang_64/lib/QtCore.framework/Headers/qglobal.h:294:33: note: expanded from macro 'QT_DEPRECATED_X'
  #  define QT_DEPRECATED_X(text) Q_DECL_DEPRECATED_X(text)
                                  ^
  /path/to/Support/Qt/5.15.2/clang_64/lib/QtCore.framework/Headers/qcompilerdetection.h:675:55: note: expanded from macro 'Q_DECL_DEPRECATED_X'
  #    define Q_DECL_DEPRECATED_X(text) __attribute__ ((__deprecated__(text)))
                                                        ^
  • Loading branch information
jcfr committed Nov 5, 2021
1 parent ee9dc58 commit ab26535
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Libs/Widgets/ctkColorPickerButton.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ ctkColorPickerButtonPrivate::ctkColorPickerButtonPrivate(ctkColorPickerButton& o
this->Color = Qt::black;
this->ColorName = QString();
this->DisplayColorName = true;
this->DialogOptions = 0;
this->DialogOptions = ctkColorPickerButton::ColorDialogOptions();
}

//-----------------------------------------------------------------------------
Expand Down

0 comments on commit ab26535

Please sign in to comment.