From 734febbb6761fd6dbb0d5f619e64b91d99ed1264 Mon Sep 17 00:00:00 2001 From: Louise Bowler Date: Fri, 5 Jul 2024 09:49:18 +0100 Subject: [PATCH] Use new SkipEmptyParts only when available in Qt --- .../src/internal/AtrialFibresView.cpp | 6 +++++- .../kcl.cemrgapp.scar/src/internal/AtrialScarView.cpp | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CemrgApp/Plugins/kcl.cemrgapp.atrialfibres/src/internal/AtrialFibresView.cpp b/CemrgApp/Plugins/kcl.cemrgapp.atrialfibres/src/internal/AtrialFibresView.cpp index 40466d9..aa285eb 100644 --- a/CemrgApp/Plugins/kcl.cemrgapp.atrialfibres/src/internal/AtrialFibresView.cpp +++ b/CemrgApp/Plugins/kcl.cemrgapp.atrialfibres/src/internal/AtrialFibresView.cpp @@ -2103,7 +2103,11 @@ bool AtrialFibresView::GetUserScarProjectionInputs(){ MITK_INFO << "[UI] Creating list of thresholds"; separated_thresh_list.removeLast(); separated_thresh_list.removeLast(); - separated_thresh_list = thresh_list.split(",", Qt::SkipEmptyParts); + #if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) + separated_thresh_list = thresh_list.split(",", Qt::SkipEmptyParts); + #else + separated_thresh_list = thresh_list.split(",", QString::SkipEmptyParts); + #endif int listspaces = separated_thresh_list.removeAll(" "); int listduplicates = separated_thresh_list.removeDuplicates(); std::cout << "Spaces in list: " << listspaces << " Duplicates in list: " << listduplicates << '\n'; diff --git a/CemrgApp/Plugins/kcl.cemrgapp.scar/src/internal/AtrialScarView.cpp b/CemrgApp/Plugins/kcl.cemrgapp.scar/src/internal/AtrialScarView.cpp index 7416407..7962892 100644 --- a/CemrgApp/Plugins/kcl.cemrgapp.scar/src/internal/AtrialScarView.cpp +++ b/CemrgApp/Plugins/kcl.cemrgapp.scar/src/internal/AtrialScarView.cpp @@ -420,7 +420,11 @@ void AtrialScarView::AutomaticAnalysis() { MITK_INFO << "[UI] Creating list of thresholds"; separated_thresh_list.removeLast(); separated_thresh_list.removeLast(); - separated_thresh_list = thresh_list.split(",", Qt::SkipEmptyParts); + #if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) + separated_thresh_list = thresh_list.split(",", Qt::SkipEmptyParts); + #else + separated_thresh_list = thresh_list.split(",", QString::SkipEmptyParts); + #endif int listspaces = separated_thresh_list.removeAll(" "); int listduplicates = separated_thresh_list.removeDuplicates(); separated_thresh_list.sort();