Fix build with Qt 5.14

Authored by alexeymin on Oct 24 2019, 11:34 AM.

Description

Fix build with Qt 5.14

Summary:
Trying to build kdevelop-pg-qt with Qt 5.14 results in an error:

.../kdev-pg/kdev-pg-regexp.cpp:44:23: error: redefinition of ‘struct std::hash<QBitArray>’
     template<> struct hash< type >                          \
                       ^~~~~~~~~~~~
.../kdev-pg/kdev-pg-regexp.cpp:53:1: note: in expansion of macro ‘q_Hash_to_tr1_hash’
 q_Hash_to_tr1_hash(QBitArray)
 ^~~~~~~~~~~~~~~~~~
In file included from .../prefix514/include/QtCore/qvector.h:47:0,
                 from .../prefix514/include/QtCore/QVector:1,
                 from .../kdevelop-pg-qt/include/kdev-pg-char-sets.h:36,
                 from .../kdevelop-pg-qt/kdev-pg/kdev-pg-regexp.cpp:20:
.../prefix514/include/QtCore/qhashfunctions.h:209:1: note: previous definition of ‘struct std::hash<QBitArray>’
 QT_SPECIALIZE_STD_HASH_TO_CALL_QHASH_BY_CREF(QBitArray)
 ^

std::hash<QBitArray> is already specialized in Qt 5.14, so avoid redefinition with conditional compilation

Test Plan: try to build with Qt 5.14

Reviewers: apol

Reviewed By: apol

Subscribers: kdevelop-devel

Tags: KDevelop

Differential Revision: https://phabricator.kde.org/D24914

Details

Committed
alexeyminOct 24 2019, 1:18 PM
Reviewer
apol
Differential Revision
D24914: Fix build with Qt 5.14
Parents
R51:ab1fcf86ac7b: Set version to 2.2.0
Branches
Unknown
Tags
Unknown