Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-42744 lupdate needs C++11 support
  3. QTBUG-42735

lupdate confused by `final` specifier (C++11)

    XMLWordPrintable

Details

    • Technical task
    • Resolution: Done
    • P2: Important
    • 5.6.0 RC
    • Tools: Linguist
    • None
    • 00c523ab372c680984b17ad8d66939cd3aaa8f34

    Description

      When running lupdate multiple warnings are generated with the text

      Qualifying with unknown namespace/class ::ClassName

      It turns out in this case that these are being caused by a class declaration in the header like so:

      class ClassName final : public QObject

      In one case where the class was declared with the `final` specifier in the source file, the warning generated was:

      Class 'final' lacks Q_OBJECT macro

      ...in this case the class declaration was:

      class CustomXmlHandler final : public QXmlDefaultHandler
      ...
      Q_DECLARE_TR_FUNCTIONS( CustomXmlHandler )
      ...

      I am not sure if lupdate even supports such declarations in a source file (vs header file) but in this case the warning still went away after removing the `final` specifier from the declaration.

      Attachments

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

        Activity

          People

            hansmi M. Hanselmann
            jonwd7 Jonathan
            Votes:
            3 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes