summaryrefslogblamecommitdiff
path: root/user/okular/0001-Ensure-compatibility-with-Qt.patch
blob: dfd2daa759fb9cceaadcc2224a2b4aa821a07457 (plain) (tree)



































                                                                         
From 00f76c2df98c44722b05f7c350cf6b3241c2128f Mon Sep 17 00:00:00 2001
From: "A. Wilcox" <AWilcox@Wilcox-Tech.com>
Date: Thu, 18 Apr 2019 18:17:32 -0500
Subject: [PATCH] Ensure compatibility with Qt <5.10

Qt::AA_CompressTabletEvents was added in Qt 5.10.  Use preprocessor check
to avoid build failures on 5.9 LTS or 5.8 (the minimum version).
---
 shell/main.cpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/shell/main.cpp b/shell/main.cpp
index 17b58c610..dbdebf1a4 100644
--- a/shell/main.cpp
+++ b/shell/main.cpp
@@ -19,6 +19,7 @@
 #include <QTextStream>
 #include <kwindowsystem.h>
 #include <QApplication>
+#include <QtGlobal>
 #include <KAboutData>
 #include <KCrash>
 #include <KMessageBox>
@@ -31,7 +32,9 @@
 int main(int argc, char** argv)
 {
     QGuiApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
+#if QT_VERSION >= 0x051000
     QCoreApplication::setAttribute(Qt::AA_CompressTabletEvents);
+#endif
 
     QApplication app(argc, argv);
     KLocalizedString::setApplicationDomain("okular");
-- 
2.21.0