D24914: Fix build with Qt 5.14

Alexey Min noreply at phabricator.kde.org
Thu Oct 24 12:38:34 BST 2019


alexeymin created this revision.
Herald added a project: KDevelop.
Herald added a subscriber: kdevelop-devel.
alexeymin requested review of this revision.

REVISION 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

REPOSITORY
  R51 KDevelop: PG Qt

BRANCH
  fix-build-qt514

REVISION DETAIL
  https://phabricator.kde.org/D24914

AFFECTED FILES
  kdev-pg/kdev-pg-regexp.cpp

To: alexeymin
Cc: kdevelop-devel, hmitonneau, christiant, glebaccon, domson, antismap, iodelay, alexeymin, geetamc, Pilzschaf, akshaydeo, surgenight, arrowd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20191024/b879c10b/attachment.html>


More information about the KDevelop-devel mailing list