From 55b41d6885afc60796e29c8f4f4d1ee54ab2fe47 Mon Sep 17 00:00:00 2001 From: Yen Chi Hsuan Date: Mon, 28 Aug 2017 00:23:16 +0800 Subject: [PATCH] Fix building on Qt 5.8+ (closes #14956) --- src/qt-qpa-platform-plugin/phantom.pri | 8 +++++++- src/qt-qpa-platform-plugin/phantomintegration.cpp | 13 +++++++++++-- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/src/qt-qpa-platform-plugin/phantom.pri b/src/qt-qpa-platform-plugin/phantom.pri index d8b2d115fc..6ca9266746 100644 --- a/src/qt-qpa-platform-plugin/phantom.pri +++ b/src/qt-qpa-platform-plugin/phantom.pri @@ -1,4 +1,10 @@ -QT += core-private gui-private platformsupport-private +QT += core-private gui-private + +lessThan(QT_MINOR_VERSION, 8) { + QT += platformsupport-private +} else { + QT += fontdatabase_support_private eventdispatcher_support_private +} SOURCES += $$PWD/phantomintegration.cpp \ $$PWD/phantombackingstore.cpp diff --git a/src/qt-qpa-platform-plugin/phantomintegration.cpp b/src/qt-qpa-platform-plugin/phantomintegration.cpp index 47e4b886e6..3eb1744725 100644 --- a/src/qt-qpa-platform-plugin/phantomintegration.cpp +++ b/src/qt-qpa-platform-plugin/phantomintegration.cpp @@ -42,15 +42,24 @@ #include "phantomintegration.h" #include "phantombackingstore.h" +#include #include #if defined(Q_OS_MAC) # include #else -# include +# if QT_VERSION < QT_VERSION_CHECK(5, 8, 0) +# include +# else +# include +# endif #endif -#include +#if QT_VERSION < QT_VERSION_CHECK(5, 8, 0) +# include +#else +# include +#endif #include #include