Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix deprecation warnings #1010

Merged
merged 5 commits into from
Nov 5, 2021
Merged

Commits on Nov 5, 2021

  1. COMP: Fix QFlags deprecation warnings related to Qt::ColorDialogOptions

    This commit fixes the warnings like the following reported when building
    against Qt >= 5.15.
    
      In file included from /path/to/S-r/CTK/Libs/Widgets/ctkColorDialog.cpp:29:
      /path/to/S-rwdi/CTK/Libs/Widgets/ctkColorDialog.h:92:67: warning: 'QFlags' is deprecated: Use default constructor instead [-Wdeprecated-declarations]
                               const QString &title, ColorDialogOptions options = 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)))
                                                            ^
    jcfr committed Nov 5, 2021
    Configuration menu
    Copy the full SHA
    03ff2a4 View commit details
    Browse the repository at this point in the history
  2. COMP: Fix QAtomicInt::load() deprecation warning in ctkErrorLogQtMess…

    …ageHandler
    
    This commit fixes the warnings like the following reported when building
    against Qt >= 5.14.
    
      /path/to/S-r/CTK/Libs/Core/ctkErrorLogQtMessageHandler.cpp:70:57: warning: 'load' is deprecated: Use loadRelaxed [-Wdeprecated-declarations]
        if (ctkErrorLogQtMessageHandler_CurrentRecursionDepth.load() > 10)
                                                              ^
      /path/to/Support/Qt/5.15.2/clang_64/lib/QtCore.framework/Headers/qbasicatomic.h:103:5: note: 'load' has been explicitly marked deprecated here
          QT_DEPRECATED_VERSION_X_5_14("Use loadRelaxed") T load() const noexcept { return loadRelaxed(); }
          ^
      /path/to/Support/Qt/5.15.2/clang_64/lib/QtCore.framework/Headers/qglobal.h:366:45: note: expanded from macro 'QT_DEPRECATED_VERSION_X_5_14'
      # define QT_DEPRECATED_VERSION_X_5_14(text) QT_DEPRECATED_X(text)
                                                  ^
      /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)))
                                                            ^
    jcfr committed Nov 5, 2021
    Configuration menu
    Copy the full SHA
    c4a062e View commit details
    Browse the repository at this point in the history
  3. COMP: Fix QTime::start(), QTime::elasped() deprecation warnings

    It fixes warnings like the following reported with Qt >= 5.14:
    
      /path/to/S-r/CTK/Libs/DICOM/Core/ctkDICOMIndexer.cpp:121:15: warning: 'start' is deprecated: Use QElapsedTimer instead [-Wdeprecated-declarations]
          timeProbe.start();
                    ^
      /path/to/Support/Qt/5.15.2/clang_64/lib/QtCore.framework/Headers/qdatetime.h:235:5: note: 'start' has been explicitly marked deprecated here
          QT_DEPRECATED_X("Use QElapsedTimer instead") void start();
          ^
      /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)))
                                                            ^
    jcfr committed Nov 5, 2021
    Configuration menu
    Copy the full SHA
    7c1b38d View commit details
    Browse the repository at this point in the history
  4. COMP: Fix QFlags deprecation warnings related to ctkColorPickerButton…

    …::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)))
                                                            ^
    jcfr committed Nov 5, 2021
    Configuration menu
    Copy the full SHA
    1d88306 View commit details
    Browse the repository at this point in the history
  5. COMP: Fix QPixmapCache::find deprecation warnings in ctkPixmapIconEngine

    This commit fixes warnings like the following reported when building
    against Qt >= 5.13.
    
      /path/to/S-r/CTK/Libs/Widgets/ctkPixmapIconEngine.cpp:187:27: warning: 'find' is deprecated: Use bool find(const QString &, QPixmap *) instead
            [-Wdeprecated-declarations]
              if (QPixmapCache::find(key + QString::number(static_cast<int>(mode)), pm))
                                ^
      /path/to/Support/Qt/5.15.2/clang_64/lib/QtGui.framework/Headers/qpixmapcache.h:80:5: note: 'find' has been explicitly marked deprecated here
          QT_DEPRECATED_X("Use bool find(const QString &, QPixmap *) instead")
          ^
      /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)))
                                                            ^
    jcfr committed Nov 5, 2021
    Configuration menu
    Copy the full SHA
    8a7df06 View commit details
    Browse the repository at this point in the history