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

lupdate doesn't seem to grok nested classes.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • None
    • 5.0.2, 5.11.3, 5.12.3
    • Tools: Linguist
    • Ubuntu 13.10 Windows 10

    Description

      A trivial nested class as a QObject derivative fools lupdate into thinking the parent class name is a namespace name that doesn't exist.

      Error when lupdate parses MainWindow.cpp:

      [ 22%] Generating /home/bill/src/cmake-test/translations/cmake-test_fr.ts
      /home/bill/src/cmake-test/MainWindow.cpp:59: tr() cannot be called without context
      /home/bill/src/cmake-test/MainWindow.cpp:59: Discarding unconsumed meta data
      Updating '../../../src/cmake-test/translations/cmake-test_fr.ts'...
      Found 0 source text(s) (0 new and 0 already existing)
      [ 33%] Generating cmake-test_fr.qm
      Updating '/home/bill/objdir/cmake-test/Debug/cmake-test_fr.qm'...
      Generated 0 translation(s) (0 finished and 0 unfinished)

      Explicit qualification of tr() as MainWindow::impl::tr() seems to work.

      Attachments

        1. main.cpp
          2 kB
        2. MainWindow.cpp
          2 kB
        3. MainWindow.hpp
          0.7 kB
        4. pimpl_h.hpp
          0.6 kB
        5. pimpl_impl.hpp
          0.6 kB
        6. qtbug-34928.zip
          4 kB
        7. qtbug34928-template-forwards.zip
          1 kB

        Issue Links

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

          Activity

            People

              kkohne Kai Köhne
              bsomervi Bill Somerville
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes