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

Move version information (e.g. QT_VERSION_STR) out of qglobal.h and into a separate header file

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P3: Somewhat important P3: Somewhat important
    • 6.5.0
    • 5.1.0
    • Core: Other
    • None
    • Microsoft Visual Studio 10, Microsoft Windows Resource Compiler Version 6.1.7600.16385
    • e4851fedd429cfe00de061e81596856fdd22d2c8

      I'm using QT_VERSION_STR inside a resource file (.rc), in order to have the Qt version number as part of the DLL file version information. (The resource file is compiled by the Microsoft Windows Resource Compiler, rc.exe.) So my resource file contains something like this:

      BEGIN
      VALUE "My Qt version", QT_VERSION_STR
      END

      My resource file also has #include <QtCore/QtGlobal>, in order to use QT_VERSION_STR. Unfortunately, after upgrading to Qt 5, #include <QtCore/QtGlobal> triggers the following error from the resource compiler:

      C:/Qt/Qt5.1.0/5.1.0/msvc2010/include\QtCore/qprocessordetection.h(291): error RC2188: C:\Build\...\RCa02016(75) : fatal error RC1116: RC terminating after preprocessor errors

      The resource compiler cannot swallow the indirect #include <QtCore/qprocessordetection.h> from "qglobal.h".

      Would it be feasible to you to place the definitions of QT_VERSION_STR and QT_VERSION in a different header file, which is easier to swallow for a resource compiler? For example, <QtCore/QtVersion>?

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

            kleint Friedemann Kleint
            niels_dekker Niels Dekker
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes