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

lupdate doesn't seem to grok nested classes.

XMLWordPrintable

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

      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.

        1. MainWindow.cpp
          2 kB
          Bill Somerville
        2. MainWindow.hpp
          0.7 kB
          Bill Somerville
        3. main.cpp
          2 kB
          Bill Somerville
        4. pimpl_h.hpp
          0.6 kB
          Bill Somerville
        5. pimpl_impl.hpp
          0.6 kB
          Bill Somerville
        6. qtbug-34928.zip
          4 kB
          Kai Köhne
        7. qtbug34928-template-forwards.zip
          1 kB
          Akihito Izawa
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes