commontk / CTK

A set of common support code for medical imaging, surgical navigation, and related purposes.
https://commontk.org
Apache License 2.0
827 stars 480 forks source link

COMP: Ensure DICOMWidget compatibility with Qt 5.12.8 #1200

Closed jcfr closed 3 months ago

jcfr commented 3 months ago

COMP: Ensure DICOMWidget compatibility with Qt 5.12.8

Resolves compilation issues encountered when building the DICOMWidget against Qt 5.12.8. The changes include:

  1. Removed the setting of the unsupported and unused placeholderText property from ctkDICOMVisualBrowserWidget.ui. This property's removal does not affect widget rendering. The removal addresses a compilation error introduced in commit https://github.com/commontk/CTK/commit/88ff72b9c2b1e57cf4f822ea2e547be5b9a32b98 ("ENH: Add Visual DICOM Browser", 2024-01-19):

    /path/to/CTK/Libs/DICOM/Core/ctkDICOMStorageListener.cpp:71:18: error: ‘acceptAssociations’ is not a member of ‘DcmSCP’
       71 |   return DcmSCP::acceptAssociations();
          |                  ^~~~~~~~~~~~~~~~~~
  2. Introduced conditional utilization of Qt::MatchRegularExpression, available in Qt 5.15, to resolve a compilation error introduced in commit https://github.com/commontk/CTK/commit/888cdd92b7d5d465ed7e6b378deb99e10a801588 ("ENH: Add ctkDICOMJobListWidget for logging jobs activity in the UI", 2024-01-18):

    /path/to/CTK/Libs/DICOM/Widgets/ctkDICOMJobListWidget.cpp:405:69: error: ‘MatchRegularExpression’ is not a member of ‘Qt’
    405 |   QList<QStandardItem*> list = this->findItems(tr("completed"), Qt::MatchRegularExpression, Columns::Status);
        |                                                                     ^~~~~~~~~~~~~~~~~~~~~~

ENH: Update GitHub workflow to test build against Qt 5.12.8

This update to the GitHub workflow enables testing builds against Qt 5.12.8 on Ubuntu 20.04. Notably, the build excludes VTK due to unavailability of VTK 9 packages on Ubuntu 20.04.

To support building ctkDICOMCore on Ubuntu 20.04, DCMTK is now built from source using the CTK SuperBuild. This decision stems from the absence of DCMTK 3.6.6, as indicated by the DCMTK package version 3.6.4 available^1 via apt-get. The need for building DCMTK from source arises from the utilization of the function DcmSCP::acceptAssociations, introduced in DCMTK 3.6.6 through DCMTK/dcmtk@c3d4c8e09 (Added alternative service provision API to DcmSCP).

Additionally, to ensure completion of the independent GitHub CI build workflows testing against Qt 5.15.2 and Qt 5.12.8, the "fail-fast" option is set to false.


Related issues and pull request

cc: @Punzo

Punzo commented 3 months ago

@jcfr thanks for this! I tested manually, and for me it is good to go!