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

COMP: Ensure DICOMWidget compatibility with Qt 5.12.8 #1200

Merged
merged 3 commits into from
Apr 3, 2024

Conversation

jcfr
Copy link
Member

@jcfr jcfr commented Apr 3, 2024

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 88ff72b ("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 888cdd9 ("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 available1 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

Footnotes

  1. https://packages.ubuntu.com/focal/dcmtk

This commit 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
   88ff72b ("ENH: Add Visual DICOM Browser (commontk#1165)", 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 888cdd9 ("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);
        |                                                                     ^~~~~~~~~~~~~~~~~~~~~~
    ```
@jcfr jcfr linked an issue Apr 3, 2024 that may be closed by this pull request
@jcfr jcfr enabled auto-merge (rebase) April 3, 2024 04:41
@jcfr jcfr disabled auto-merge April 3, 2024 04:42
@jcfr jcfr requested review from pieper and jamesobutler April 3, 2024 04:42
jcfr added 2 commits April 3, 2024 00:48
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.

[^1]: https://packages.ubuntu.com/focal/dcmtk
@jcfr jcfr force-pushed the support-building-against-qt-5.12.8 branch from 1ee10bf to 4f03f5b Compare April 3, 2024 04:48
@Punzo
Copy link
Contributor

Punzo commented Apr 3, 2024

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

@jcfr jcfr merged commit e5970bc into commontk:master Apr 3, 2024
4 checks passed
@jcfr jcfr deleted the support-building-against-qt-5.12.8 branch April 3, 2024 12:36
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.

Can't build on linux with current slicer instructions
3 participants