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 warnings #1083

Merged
merged 13 commits into from
Apr 13, 2023
Merged

Fix warnings #1083

merged 13 commits into from
Apr 13, 2023

Conversation

jcfr
Copy link
Member

@jcfr jcfr commented Apr 13, 2023

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.

jcfr added 2 commits April 13, 2023 15:39
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 jcfr force-pushed the fix-warnings branch 3 times, most recently from 6695b2e to fd61ba3 Compare April 13, 2023 22:36
jcfr added 11 commits April 13, 2023 19:19
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 \
 ^
…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
@jcfr jcfr merged commit ac3ca2d into commontk:master Apr 13, 2023
@jcfr jcfr deleted the fix-warnings branch April 13, 2023 23:39
@jcfr jcfr mentioned this pull request Jun 15, 2023
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant