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

    • Linux/X11, macOS, Windows
    • 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

        1. qtbug98845.zip
          0.7 kB
          Nahomi Gröhn

        Issue Links

          For Gerrit Dashboard: QTBUG-98845
          # Subject Branch Project Status CR V

          Activity

            People

              Eddy Edward Welbourne
              nagrohn Nahomi Gröhn (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes