-
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 warnings #1083
Merged
Merged
Fix warnings #1083
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/Core/ctkWorkflow.cpp:164:67: warning: enum constant in boolean context [-Wint-in-bool-context] 164 | Q_ASSERT(directionality == ctkWorkflow::Forward || ctkWorkflow::Backward); |
jcfr
force-pushed
the
fix-warnings
branch
3 times, most recently
from
April 13, 2023 22:36
6695b2e
to
fd61ba3
Compare
This commit fixes the following error: /path/to/CTK/Applications/Testing/Cpp/ctkDICOMApplicationTest1.cpp:49:1: warning: multi-line comment [-Wcomment] // % ./CTK-build/bin/CTKApplicationCppTests ctkDICOMApplicationTest1 \ ^
Source file extensions must be explicit. See https://cmake.org/cmake/help/latest/policy/CMP0115.html
…pOptions This commit fixes warnings like the following reported when building against Qt >= 5.15. In file included from /path/to/CTK/Libs/PluginFramework/ctkServiceReference.h:28, from /path/to/CTK/Libs/PluginFramework/ctkPluginContext.h:36, from /path/to/CTK/Libs/PluginFramework/ctkDefaultApplicationLauncher.cpp:29: /path/to/CTK/Libs/PluginFramework/ctkPlugin.h:432:50: warning: ‘constexpr QFlags<T>::QFlags(QFlags<T>::Zero) [with Enum = ctkPlugin::StopOption; QFlags<T>::Zero = int QFlags<ctkPlugin::StopOption>::Private::*]’ is deprecated: Use default constructor instead [-Wdeprecated-declarations] 432 | virtual void stop(const StopOptions& options = 0); | ^
This commit fixes warnings related to the following: * Qt::WindowFlags * Qt::KeyboardModifiers
…edProperty This commit ensures the "prefixedName" is set by addressing -Wimplicit-fallthrough warnings like the following: /path/to/CTK/Libs/CommandLineModules/Frontend/QtGui/ctkCmdLineModuleObjectTreeWalker.cpp:279:87: warning: this statement may fall through [-Wimplicit-fallthrough=] 279 | case ctkCmdLineModuleObjectTreeWalker::Executable: prefixedName = PREFIX_EXECUTABLE + propName; | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~
This commit fixes the following warning: /path/to/CTK/Libs/CommandLineModules/Backend/LocalProcess/ctkCmdLineModuleBackendLocalProcess.cpp:128:41: warning: ‘void qSort(RandomAccessIterator, RandomAccessIterator) [with RandomAccessIterator = QList<int>::iterator]’ is deprecated: Use std::sort [-Wdeprecated-declarations] 128 | qSort(indexes.begin(), indexes.end()); | ^
… Qt::MidButton This commit fixes warnings like the following: /path/to/CTK/Libs/Visualization/VTK/Widgets/ctkVTKChartView.cpp:438:30: warning: ‘Qt::MidButton’ is deprecated: MidButton is deprecated. Use MiddleButton instead [-Wdeprecated-declarations] 438 | if (event->button() == Qt::MidButton) | ^~~~~~~~~
From Qt changes-5.9.0 document: QString::null is now deprecated. When used to construct a QString, use QString() instead. When used to compare to a QString, replace with QString::isNull(). This commit fixes warning like the following: /path/to/CTK-build/QtSOAP/src/qtsoap.h:158:48: warning: ‘QString::null’ is deprecated: use QString() [-Wdeprecated-declarations] 158 | QtSoapQName(const QString &name = QString::null, const QString &uri = QString::null); | ^~~~ List of QtSOAP changes: $ git shortlog 914c72959..9c321151f --no-merges Ivaylo Dimitrov (1): COMP: Fix "cannot call constructor ‘QString::QString’ directly [-fpermissive]" cyclothunder (2): removed deprecated QString::null Generated .qch file to easily import documentation to Qt Assistant djh (1): Build with Qt 5.4.0
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.
Branch checkout in the Slicer build-tree of each "Slicer" factory and I was able to confirm that it build on macOS, Linux and Windows.