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

MOC is confused by raw string literal and namespace

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P2: Important
    • None
    • 5.13.0
    • Build tools: moc
    • None
    • Arch Linux
    • Linux/Wayland

    Description

      Here is example:

      main.cpp :

      #include <QObject>
      #include "my_header.h"
      
      class MyClass: public QObject {
        Q_OBJECT
      };
      
      

      my_header.h :

      #include <string>
      
      namespace MY_NAMESPACE {
        void test() {
          std::string test(R"(")");
        }
      }
      
      

      When I run "moc main.cpp" it puts MyClass in MY_NAMESPACE, but MyClass isn't in MY_NAMESPACE

      Attachments

        1. main.cpp
          0.1 kB
        2. my_header.h
          0.1 kB

        Issue Links

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

          Activity

            People

              ogoffart Olivier Goffart (Woboq GmbH)
              nazar01 Nazar Kazakov
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes