Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-96621

Missing QHash include in qcocoawindow.h

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 5.15.7, 6.2.1, 6.3.0 Alpha
    • 6.1.3, Some future release
    • GUI: Window management
    • None
    • Conan package manager, Qt 6.1.3, macOS SDK 11.3, Xcode 12.5.1, AppleClang 12.0.5.12050022.
    • macOS
    • f2de001d8410b85047ee40ebfff1b307a18889bb (qt/qtbase/dev) 26bc8dd787f4a6e35cf319d518735b7922960088 (qt/qtbase/6.2) 45b7a14d592070ff28a1bc5fdf7abfcf09771c13 (qt/tqtc-qtbase/5.15)

    Description

      When compiling Qt on macOS without OpenGL support enabled (in Conan package manger) the build fails due to missing <QHash> include as follows:

      In file included from /Users/sh0/.conan/data/qt/6.1.3/_/_/source/qt6/qtbase/src/plugins/platforms/cocoa/qcocoamenubar.mm:44:
      /Users/sh0/.conan/data/qt/6.1.3/_/_/source/qt6/qtbase/src/plugins/platforms/cocoa/qcocoawindow.h:286:34: error: implicit instantiation of undefined template 'QHash<unsigned long long, QCocoaWindow::BorderRange>'
          QHash<quintptr, BorderRange> m_contentBorderAreas; // identifer -> uppper/lower
                                       ^
      /Users/sh0/.conan/data/qt/6.1.3/_/_/build/a7992e089a1cb306f833be412c2cf123eaccc767/qtbase/include/QtCore/../../../../../source/qt6/qtbase/src/corelib/tools/qcontainerfwd.h:52:43: note: template is declared here
      template <typename Key, typename T> class QHash;
                                                ^
      

      It seems that when OpenGL is enabled then the additional included headers pull in <QHash> somewhere, but I did not bother to trace it down.

      Only tested within the Conan package manager on Qt 6.1.3, macOS SDK 11.3, Xcode 12.5.1, AppleClang 12.0.5.12050022.

      I have included a one-line patch that fixes this issue for me. Also the build log is attached should you need it.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            tpochep Timur Pocheptsov
            sh0 Siim Meerits
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes