File allow-qt6-also-on-non-mac.patch of Package xyscan

diff -Nur xyscan/src/xyscanWindow.cpp new/src/xyscanWindow.cpp
--- xyscan/src/xyscanWindow.cpp	2022-04-15 21:38:12.000000000 +0200
+++ new/src/xyscanWindow.cpp	2022-05-01 14:26:50.940934046 +0200
@@ -51,11 +51,13 @@
 
 #if defined(USE_QTPDF)
 #include <QPdfDocument>
-#elif defined(USE_POPPLER) && !defined(Q_OS_MAC)
-#include <poppler-qt5.h>
 #elif defined(USE_POPPLER)
+#if QT_VERSION < 0x060000
+#include <poppler-qt5.h>
+#else
 #include <poppler-qt6.h>
 #endif
+#endif
 
 using namespace std;
 
diff -Nur xyscan/xyscan.pro new/xyscan.pro
--- xyscan/xyscan.pro	2022-04-15 21:47:32.056684329 +0200
+++ new/xyscan.pro	2022-05-01 14:31:35.790326604 +0200
@@ -21,7 +21,7 @@
 #  They should be used since building and deploying xyscan
 #  on these platforms is not for the faint hearted.
 #-----------------------------------------------------------------------------
-VERSION = 4.6.2
+VERSION = 4.6.4
 TEMPLATE = app
 CONFIG  += qt warn_on release c++14 lrelease
 CONFIG  += sdk_no_version_check
@@ -55,13 +55,13 @@
 #
 unix {
     !macx {
-        INCLUDEPATH += /usr/include/poppler/qt5/
+        INCLUDEPATH += /usr/include/poppler/qt$${QT_MAJOR_VERSION}/
         INCLUDEPATH += /usr/include/poppler
-        INCLUDEPATH += /usr/local/include/poppler/qt5/
+        INCLUDEPATH += /usr/local/include/poppler/qt$${QT_MAJOR_VERSION}/
         INCLUDEPATH += /usr/local/include/poppler
-        INCLUDEPATH += /opt/local/include/poppler/qt5/
+        INCLUDEPATH += /opt/local/include/poppler/qt$${QT_MAJOR_VERSION}/
         INCLUDEPATH += /opt/local/include/poppler
-        LIBS += -L/usr/local/lib/ -L/usr/lib/ -lpoppler -lpoppler-qt5
+        LIBS += -L/usr/local/lib/ -L/usr/lib/ -lpoppler -lpoppler-qt$${QT_MAJOR_VERSION}
     }
 }
 
openSUSE Build Service is sponsored by