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

Including QGLFormat and QDeclarativeItem in this specific order fails to compile on Windows

    XMLWordPrintable

Details

    • a2c73d3f0305847343d5015c095073eae0ead197

    Description

      Tested with the latest public open source SDK on Windows (2010.05) that includes Qt 4.7.0

      Including QGLFormat and QDeclarativeItem in this order fails to compile on Windows. The compilation succeeds if the includes are done the other way around. This issue does not appear on Linux.

      So:
      #include <QGLFormat>
      #include <QDeclarativeItem>
      fails, but:
      #include <QDeclarativeItem>
      #include <QGLFormat>
      works.

      Attached a minimal Qt app to demonstrate the issue. The attached app doesn't compile on the before mentioned environment.

      Error log:
      In file included from ..\qt\include/QtDeclarative/qdeclarative.h:1,
      from ..\qt\include\QtDeclarative/../../src/declarative/graphicsitems/qdeclarativeitem.h:45,
      from ..\qt\include\QtDeclarative/qdeclarativeitem.h:1,
      from ..\qt\include\QtDeclarative/QDeclarativeItem:1,
      from main.cpp:5:
      ..\qt\include/QtDeclarative/../../src/declarative/qml/qdeclarative.h: In function 'int qmlRegisterInterface(const char*)':
      ..\qt\include/QtDeclarative/../../src/declarative/qml/qdeclarative.h:272: error: expected primary-expression before 'struct'
      ..\qt\include/QtDeclarative/../../src/declarative/qml/qdeclarative.h:272: error: expected ';' before 'struct'
      ..\qt\include/QtDeclarative/../../src/declarative/qml/qdeclarative.h:281: error: expected primary-expression before 'struct'

      Attachments

        1. bugi.pro
          0.3 kB
        2. main.cpp
          0.2 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            rweather Rhys Weatherley (closed Nokia identity) (Inactive)
            kimgronholm Kim Grönholm
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes