Details
-
Technical task
-
Resolution: Duplicate
-
P2: Important
-
None
-
None
Description
The summary already says everything.
To reproduce, create a file similar to this:
#include <QWidget> enum class EnumClassForwardDeclarationWithUnderlyingType : int; class SomeWidget : public QWidget { Q_OBJECT public: explicit SomeWidget(); } ; void SomeWidget::SomeWidget() { tr("foo"); }
Calling lupdate on that file will produce the following error:
lupdate lupdate.cpp lupdate warning: no TS files specified. Only diagnostics will be produced. /tmp/lupdate.cpp:14: Qualifying with unknown namespace/class ::SomeWidget
As a workaround one can use a macro, e.g.:
#define TAGEDITOR_ENUM_CLASS enum class namespace TagParser { TAGEDITOR_ENUM_CLASS TagType : unsigned int; } // namespace TagParser #undef TAGEDITOR_ENUM_CLASS
I only listed 5.13.0 as affected version because I only used that version to explicitely reproduce. But the issue likely affects all version.
Attachments
Issue Links
- duplicates
-
QTBUG-36589 lupdate has a problem with C++11 "enum class" declarations.
-
- Closed
-