-
Notifications
You must be signed in to change notification settings - Fork 494
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
Fix deprecation warnings #1010
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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))) ^
…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
commented
Nov 5, 2021
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))) ^
…::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))) ^
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
force-pushed
the
fix-deprecation-warnings
branch
from
November 5, 2021 23:38
0f79789
to
8a7df06
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.