Skip to content

Commit

Permalink
COMP: Support building DICOMWidget against Qt 5.12.8
Browse files Browse the repository at this point in the history
Remove setting of unsupported and unused `placeholderText` property from
`ctkDICOMVisualBrowserWidget.ui`. Since the property is set to its default
value, removing it will not impact how the widget is rendered. For
reference, the use of `placeholderText` was originally introduced in
88ff72b ("ENH: Add Visual DICOM Browser (commontk#1165)", 2024-01-19)

Conditionally use `Qt::MatchRegularExpression` introduced in Qt 5.15.
For reference, its use was originally introduced in 888cdd9 ("ENH: Add
ctkDICOMJobListWidget for logging jobs activity in the UI", 2024-01-18)
  • Loading branch information
jcfr committed Apr 2, 2024
1 parent 4ba6a2f commit 36dcafa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -403,9 +403,6 @@
<property name="sizeAdjustPolicy">
<enum>QComboBox::AdjustToContents</enum>
</property>
<property name="placeholderText">
<string/>
</property>
<property name="frame">
<bool>true</bool>
</property>
Expand Down
5 changes: 5 additions & 0 deletions Libs/DICOM/Widgets/ctkDICOMJobListWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,12 @@ void QCenteredItemModel::setProgressBar(int row, const ctkDICOMJobDetail &td, ct
//----------------------------------------------------------------------------
void QCenteredItemModel::clearCompletedJobs()
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,15,0))
QList<QStandardItem*> list = this->findItems(tr("completed"), Qt::MatchRegularExpression, Columns::Status);
#else
QList<QStandardItem*> list = this->findItems(tr("completed"), Qt::MatchRegExp, Columns::Status);
#endif

foreach (QStandardItem* item, list)
{
this->removeRow(item->row());
Expand Down

0 comments on commit 36dcafa

Please sign in to comment.