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

Non-trivial "using namespace" confuses lupdate

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • P2: Important
    • None
    • 5.9.2
    • Tools: Linguist

    Description

      The following test.cpp compiles

      #include <QObject>
      
      namespace Foo { namespace Internal { } }
      
      using namespace Foo::Internal;
      
      namespace Foo {
      namespace Internal {
      
      class Test : public QObject
      {
          Q_OBJECT
      public:
          explicit Test(QObject *parent = nullptr);
      };
      
      } // namespace Internal
      
      Test::Test(QObject *parent) : QObject(parent)
      {
          auto foo = tr("Blah");
      }
      
      } // namespace Foo
      
      #include "test.moc"
      

      but lupdate is not able to find the correct namespace for the class Test:

      test.cpp:46: Qualifying with unknown namespace/class ::Test

      Attachments

        Issue Links

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

          Activity

            People

              lugerard Lucie Gerard
              con Eike Ziller
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes