Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.15.2
-
None
Description
We had a little mistake in our test code and found that moc cannot handle \n or \" in raw-strings.
#include <QtCore/QObject> class Dummy : public QObject { Q_OBJECT public: Dummy() { const QByteArray data(R"({ " \"example\": true\n" "}\n"); })"); } }; int main() { Dummy d; return 0; }
The compiler will build it and tries to link it. But it fails with "error: undefined reference to 'vtable for XYZ" because moc cannot handle that and throws a warning instead an error.
$ moc test.cpp test.cpp:0: Note: No relevant classes found. No output generated.
Moc should handle that or fail with a better warning message.
Attachments
Issue Links
- relates to
-
QTBUG-87667 moc does not handle raw string literals correctly
- In Progress
Gerrit Reviews
For Gerrit Dashboard: QTBUG-89363 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
332329,3 | moc: Initial C++11 string literal support | dev | qt/qtbase | Status: NEW | -1 | 0 |