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

Non-trivial "using namespace" confuses lupdate

XMLWordPrintable

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

      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

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

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes