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

Display typedef collides with user class

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.7
    • GUI: Other
    • None
    • Linux/X11

    Description

      In Qt 6.7 the Display typedef from qguiapplication_platform.h breaks user code compilation if the user code has a Display class defined:

      src/display.h:9:7: error: using typedef-name ‘Display’ after ‘class’
      9 | class Display
      |^~~~~~~
      In file included from /usr/include/qt6/QtGui/qguiapplication.h:188,
      from /usr/include/qt6/QtGui/qscreen_platform.h:19,
      from /usr/include/qt6/QtGui/qscreen.h:150,
      from /usr/include/qt6/QtGui/qinputdevice.h:9,
      from /usr/include/qt6/QtGui/qpointingdevice.h:9,
      from /usr/include/qt6/QtGui/qeventpoint.h:9,
      from /usr/include/qt6/QtGui/qevent.h:20,
      from /usr/include/qt6/QtGui/QKeyEvent:1,
      from src/gui.cpp:16:
      /usr/include/qt6/QtGui/qguiapplication_platform.h:22:26: note: ‘Display’ has a previous declaration here
      22|typedef struct _XDisplay Display;|
      |^~~~~~~
      src/videoplayer.h:66:17: error: field ‘_display’ has incomplete type ‘Display’ \{aka ‘_XDisplay’}
      66|Display _display;|
      |^~~~~~~~
      /usr/include/qt6/QtGui/qguiapplication_platform.h:22:16: note: forward declaration of ‘Display’ \{aka ‘struct _XDisplay’}
      22|typedef struct _XDisplay Display;
      

      Attachments

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

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            tumic Martin Tůma
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes