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

.moc file is not included as dependency for .obj when digit separator is used

    XMLWordPrintable

    Details

    • Platform/s:
      Linux/X11, macOS, Windows
    • Commits:
      cfcbf38f76 (qt/qtbase/dev) cfcbf38f76 (qt/tqtc-qtbase/dev)

      Description

      Building the following code gives
      fatal error C1083: Cannot open include file: 'main.moc': No such file or directory

      main.cpp

      #include <QObject>
      
      class MyObject : public QObject
      {
          Q_OBJECT;
      
          MyObject() : QObject(nullptr) {}
      };
      
      int main()
      {
          int number = 100'00;
      }
      
      #include "main.moc"
      

      The code works fine when digit separator is not used (i.e. int number = 10000; )

      Checking the generated Makefile, the reason seems main.moc is not included as a dependency for main.obj when digit separator is used.

      Sample code is attached qtbug98845.zip

        Attachments

          Issue Links

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

            Activity

              People

              Assignee:
              Eddy Edward Welbourne
              Reporter:
              nagrohn Nahomi Gröhn
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes