Skip to content

Commit

Permalink
Fix compile error with QT version less than 5.14
Browse files Browse the repository at this point in the history
Add Qt version check for Qt::SkipEmptyParts
  • Loading branch information
bennettpeter committed Nov 9, 2023
1 parent d4863f7 commit 5820460
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions mythtv/programs/mythbackend/servicesv2/v2video.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -232,11 +232,20 @@ V2VideoMetadataInfoList* V2Video::GetVideoList( const QString &Folder,
QString defSeq = " ASC";
if (bDescending)
defSeq = " DESC";

#if QT_VERSION < QT_VERSION_CHECK(5,14,0)
QStringList sortList = Sort.toLower().split(',',QString::SkipEmptyParts);
#else
QStringList sortList = Sort.toLower().split(',',Qt::SkipEmptyParts);
#endif
bool next = false;
for (int ix = 0 ; ix < sortList.length(); ix++)
{
#if QT_VERSION < QT_VERSION_CHECK(5,14,0)
QStringList partList = sortList[ix].split(' ',QString::SkipEmptyParts);
#else
QStringList partList = sortList[ix].split(' ',Qt::SkipEmptyParts);
#endif
if (partList.length() == 0)
continue;
QString sort = partList[0];
Expand Down

0 comments on commit 5820460

Please sign in to comment.