-
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 additional warnings #1098
Merged
Merged
Fix additional warnings #1098
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 warnings like the following: /path/to/CTK/Libs/Widgets/ctkRangeSlider.cpp:776:26: warning: ‘constexpr QFlags<T>::QFlags(QFlags<T>::Zero) [with Enum = ctkRangeSliderPrivate::Handle; QFlags<T>::Zero = int QFlags<ctkRangeSliderPrivate::Handle>::Private::*]’ is deprecated: Use default constructor instead [-Wdeprecated-declarations] 776 | d->m_SelectedHandles = 0; | ^
List of changes: $ git shortlog 9c321151f..2e967e902 --no-merges Jean-Christophe Fillion-Robin (10): COMP: Remove deprecated use of QLinkedList in Qt >= 5.15 STYLE: Strip trailing spaces STYLE: Convert tabs into spaces STYLE: Improve attribution by ignoring bulk formatting STYLE: Ignore indentation and trailing space changes in blame history COMP: Remove deprecated use of QString::sprintf with Qt >= 5.15 STYLE: Convert CMake-language commands to lower case STYLE: Remove CMake-language block-end command arguments STYLE: Ignore cmake style changes in blame history COMP: Update CMake minimum required version from 2.8.12 to 3.0
This commit fixes warning like the following: /path/to/CTK/Plugins/org.commontk.dah.cmdlinemoduleapp/ctkCommandLineModuleAppLogic.cpp:307:58: warning: ‘const QPixmap* QLabel::pixmap() const’ is deprecated: Use the other overload which returns QPixmap by-value [-Wdeprecated-declarations] 307 | const QPixmap* pixmap = ui.PlaceHolderForImage->pixmap(); | ^
List of changes: $ git shortlog b5324a213..a86bee551 --no-merges Jean-Christophe Fillion-Robin (3): COMP: Fix split deprecation warnings using Qt::SkipEmptyParts COMP: Fix QString::null deprecation warnings COMP: Fix deprecated use of QWheelEvent functions delta(), pos(), x(), y()
This commit fixes the following warnings: /path/to/CTK/Libs/Visualization/VTK/Widgets/ctkVTKRenderViewEventTranslator.cpp:77:45: warning: ‘int QWheelEvent::x() const’ is deprecated: Use position() [-Wdeprecated-declarations] 77 | double normalized_x = wheelEvent->x()/static_cast<double>(size.width()/2.0); | ^ /path/to/CTK/Libs/Visualization/VTK/Widgets/ctkVTKRenderViewEventTranslator.cpp:78:45: warning: ‘int QWheelEvent::y() const’ is deprecated: Use position() [-Wdeprecated-declarations] 78 | double normalized_y = wheelEvent->y()/static_cast<double>(size.height()/2.0); | ^ /path/to/CTK/Libs/Visualization/VTK/Widgets/ctkVTKRenderViewEventTranslator.cpp:79:42: warning: ‘int QWheelEvent::delta() const’ is deprecated: Use angleDelta() [-Wdeprecated-declarations] 79 | int numStep = (wheelEvent->delta() > 0 ) ? 1 : 0; | ^
This commit fixes a regression introduced in 8ec9136 (COMP: Fix Qt4 build adding fallback implementation for qUtf8Printable()) It addresses error like the following: In file included from /path/to/CTK/Libs/PluginFramework/ctkPluginConstants.h:27, from /path/to/CTK/Plugins/org.commontk.eventadmin/Testing/Cpp/ctkEventAdminImplPerfTestMain.cpp:26: /path/to/CTK-build/CTK-build/Libs/PluginFramework/ctkPluginFrameworkExport.h:11:10: fatal error: ctkCompatibility_p.h: No such file or directory 11 | #include "ctkCompatibility_p.h" | ^~~~~~~~~~~~~~~~~~~~~~
…lters() This commit fixes the following warning: /path/to/CTK/Libs/Widgets/ctkPathLineEdit.cpp:212:13: warning: ‘QStringList {anonymous}::ctkFileCompleter::nameFilters() const’ defined but not used [-Wunused-function] 212 | QStringList ctkFileCompleter::nameFilters() const | ^~~~~~~~~~~~~~~~
…tings This commit fixes the following warning: /path/to/CTK/Libs/Widgets/ctkSettings.cpp:138:74: warning: ‘int QDesktopWidget::primaryScreen() const’ is deprecated: Use QGuiApplication::primaryScreen() [-Wdeprecated-declarations] 138 | QRect desktopRect = desktop.availableGeometry( desktop.primaryScreen() ); | ^
This commit fixes the following warning: /path/to/CTK/Libs/Widgets/ctkTreeComboBox.cpp:243:48: warning: ‘const QRect QDesktopWidget::availableGeometry(int) const’ is deprecated: Use QGuiApplication::screens() [-Wdeprecated-declarations] 243 | QApplication::desktop()->screenNumber(this)); | ^ ^
This commit fixes the following warning: /path/to/CTK/Libs/Visualization/VTK/Widgets/Testing/Cpp/ctkVTKAbstractViewTest1.cpp:126:8: warning: unused variable ‘sliceViewWasPaused’ [-Wunused-variable] 126 | bool sliceViewWasPaused = sliceView.pauseRender(); | ^~~~~~~~~~~~~~~~~~
This commit fixes the following warning: /path/to/CTK/Applications/ctkPluginBrowser/ctkQtResourcesTreeModel.cpp:195:12: warning: ‘constexpr QFlags<T>::QFlags(QFlags<T>::Zero) [with Enum = Qt::ItemFlag; QFlags<T>::Zero = int QFlags<Qt::ItemFlag>::Private::*]’ is deprecated: Use default constructor instead [-Wdeprecated-declarations] 195 | return 0; | ^
…tputTest1 This fixes the following warning: /path/to/CTK/Libs/Widgets/Testing/Cpp/ctkErrorLogModelTerminalOutputTest1.cpp:127:87: warning: enum constant in boolean context [-Wint-in-bool-context] 127 | currentTerminalOutputEnabled, ctkErrorLogTerminalOutput::All); | ^ It is a following of fc9a964 (Add multi-thread support to ErrorLog model) where the boolean check was originally introduced.
jcfr
force-pushed
the
fix-additional-warnings
branch
from
June 15, 2023 08:39
61fca5e
to
1e7646b
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.