File chessx-fix_Qt512.patch of Package chessx

Index: chessx-1.5.6+git.20211128.2fab7884/src/database/tablebase.cpp
===================================================================
--- chessx-1.5.6+git.20211128.2fab7884.orig/src/database/tablebase.cpp
+++ chessx-1.5.6+git.20211128.2fab7884/src/database/tablebase.cpp
@@ -194,7 +194,11 @@ void OnlineTablebase::httpDone(QNetworkR
                 ret.replace("Draw", "0");
                 ret.replace("Lose in ", "-");
 
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
                 QStringList moveList = ret.split('\n',Qt::SkipEmptyParts);
+#else
+                QStringList moveList = ret.split('\n',QString::SplitBehavior::SkipEmptyParts);
+#endif
                 if (moveList.size() >= 1)
                 {
                     QList<Move> bestMoves;
@@ -202,7 +206,11 @@ void OnlineTablebase::httpDone(QNetworkR
                     int bestScore;
                     foreach(QString tbMove, moveList)
                     {
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
                         QStringList fld = tbMove.split(' ',Qt::SkipEmptyParts);
+#else
+                        QStringList fld = tbMove.split(' ',QString::SplitBehavior::SkipEmptyParts);
+#endif
                         if(fld.size() < 3)
                         {
                             break;
Index: chessx-1.5.6+git.20211128.2fab7884/src/database/uciengine.cpp
===================================================================
--- chessx-1.5.6+git.20211128.2fab7884.orig/src/database/uciengine.cpp
+++ chessx-1.5.6+git.20211128.2fab7884/src/database/uciengine.cpp
@@ -204,7 +204,11 @@ void UCIEngine::processMessage(const QSt
 
     if(message.startsWith("id"))
     {
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
         QStringList list = message.split(" " ,Qt::SkipEmptyParts);
+#else
+        QStringList list = message.split(" " ,QString::SplitBehavior::SkipEmptyParts);
+#endif
         if (list.length()>2)
         {
             if (list[1] == "name")
@@ -458,7 +462,11 @@ void UCIEngine::parseOptions(const QStri
                    } phase;
 
     phase = EXPECT_OPTION;
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
     QStringList list = message.split(QRegExp("\\s+"), Qt::SkipEmptyParts);
+#else
+    QStringList list = message.split(QRegExp("\\s+"), QString::SplitBehavior::SkipEmptyParts);
+#endif
 
     QStringList nameVals;
     QString defVal;
Index: chessx-1.5.6+git.20211128.2fab7884/src/database/telnetclient.cpp
===================================================================
--- chessx-1.5.6+git.20211128.2fab7884.orig/src/database/telnetclient.cpp
+++ chessx-1.5.6+git.20211128.2fab7884/src/database/telnetclient.cpp
@@ -112,7 +112,11 @@ void TelnetClient::DispatchReadData(QByt
         default:
         {
             bool endsWithCR = data.endsWith("\n");
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
             QStringList lines = data.split("\n", Qt::SkipEmptyParts);
+#else
+            QStringList lines = data.split("\n", QString::SplitBehavior::SkipEmptyParts);
+#endif
             if (lines.count() && !endsWithCR)
             {
                 m_remainder = lines.back();
Index: chessx-1.5.6+git.20211128.2fab7884/src/database/filtermodel.cpp
===================================================================
--- chessx-1.5.6+git.20211128.2fab7884.orig/src/database/filtermodel.cpp
+++ chessx-1.5.6+git.20211128.2fab7884/src/database/filtermodel.cpp
@@ -103,7 +103,11 @@ void FilterModel::cacheTags()
 QStringList FilterModel::additionalTags()
 {
     QString addTags = AppSettings->getValue("/GameList/AdditionalTags").toString();
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
     QStringList tags = addTags.split(QRegExp("[^a-zA-Z]"), Qt::SkipEmptyParts);
+#else
+    QStringList tags = addTags.split(QRegExp("[^a-zA-Z]"), QString::SplitBehavior::SkipEmptyParts);
+#endif
     return tags;
 }
 
Index: chessx-1.5.6+git.20211128.2fab7884/src/database/tagsearch.cpp
===================================================================
--- chessx-1.5.6+git.20211128.2fab7884.orig/src/database/tagsearch.cpp
+++ chessx-1.5.6+git.20211128.2fab7884/src/database/tagsearch.cpp
@@ -16,7 +16,11 @@ TagSearch::TagSearch(Database* database,
 {
     if (value.contains('|'))
     {
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
         QStringList l = value.split('|', Qt::SkipEmptyParts);
+#else
+        QStringList l = value.split('|', QString::SplitBehavior::SkipEmptyParts);
+#endif
         QSet<QString> set;
         foreach (QString s, l)
         {
Index: chessx-1.5.6+git.20211128.2fab7884/src/gui/ficsconsole.cpp
===================================================================
--- chessx-1.5.6+git.20211128.2fab7884.orig/src/gui/ficsconsole.cpp
+++ chessx-1.5.6+git.20211128.2fab7884/src/gui/ficsconsole.cpp
@@ -683,7 +683,11 @@ void FicsConsole::HandleMessage(int bloc
             {
                 if (s.startsWith("Game"))
                 {
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
                     QStringList l = s.split(" ",Qt::SkipEmptyParts);
+#else
+                    QStringList l = s.split(" ",QString::SplitBehavior::SkipEmptyParts);
+#endif
                     if (l.size()>=6)
                     {
                         QString nameWhite = l[2];
@@ -741,7 +745,11 @@ void FicsConsole::HandleMessage(int bloc
         case FicsClient::BLKCMD_XTELL:
             if (!s.startsWith("(") && s.length() > 1)
             {
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
                 QStringList l = s.split(" ", Qt::SkipEmptyParts);
+#else
+                QStringList l = s.split(" ", QString::SplitBehavior::SkipEmptyParts);
+#endif
                 if (l.length() == 5)
                 {
                     // todo: Convert List to table widget
@@ -784,7 +792,11 @@ void FicsConsole::HandleMessage(int bloc
             break;
         case FicsClient::BLKCMD_SOUGHT:
             {
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
                 QStringList l = s.split(" ",Qt::SkipEmptyParts);
+#else
+                QStringList l = s.split(" ",QString::SplitBehavior::SkipEmptyParts);
+#endif
                 if (l.size() >= 8)
                 {
                     QString sought = btgSeek->checkedButton()->objectName().remove(0,2).toLower();
@@ -860,7 +872,11 @@ void FicsConsole::HandleMessage(int bloc
         case FicsClient::BLKCMD_SHOWLIST:
             if (!s.contains("--"))
             {
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
                 QStringList l = s.split(" ", Qt::SkipEmptyParts);
+#else
+                QStringList l = s.split(" ", QString::SplitBehavior::SkipEmptyParts);
+#endif
                 foreach(QString name, l)
                 {
                     ui->listNoPlay->addItem(name);
Index: chessx-1.5.6+git.20211128.2fab7884/src/gui/gamelist.cpp
===================================================================
--- chessx-1.5.6+git.20211128.2fab7884.orig/src/gui/gamelist.cpp
+++ chessx-1.5.6+git.20211128.2fab7884/src/gui/gamelist.cpp
@@ -413,7 +413,11 @@ void GameList::simpleSearch(int tagid)
     }
     else
     {
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
         QStringList list = value.split("-", Qt::SkipEmptyParts);
+#else
+        QStringList list = value.split("-", QString::SplitBehavior::SkipEmptyParts);
+#endif
         if ((list.size() > 1) && (dlg.tag() != 9)) // Tag 9 is the Result
         {
             // Filter a range
openSUSE Build Service is sponsored by