diff options
-rw-r--r-- | src/tools/moc/moc.cpp | 4 | ||||
-rw-r--r-- | tests/auto/tools/moc/tst_moc.cpp | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/tools/moc/moc.cpp b/src/tools/moc/moc.cpp index 22cbb97364..b26fac5dcf 100644 --- a/src/tools/moc/moc.cpp +++ b/src/tools/moc/moc.cpp @@ -224,6 +224,10 @@ Type Moc::parseType() ; } if (test(LANGLE)) { + if (type.name.isEmpty()) { + // '<' cannot start a type + return type; + } type.name += lexemUntil(RANGLE); } if (test(SCOPE)) { diff --git a/tests/auto/tools/moc/tst_moc.cpp b/tests/auto/tools/moc/tst_moc.cpp index e26b02a560..bf2d6afdb4 100644 --- a/tests/auto/tools/moc/tst_moc.cpp +++ b/tests/auto/tools/moc/tst_moc.cpp @@ -128,6 +128,7 @@ public: emit send(value); } + bool operator< ( const Sender & ) const { /* QTBUG-36834 */ return true;} signals: void send(const String::Type&); void send(const Int::Type&); |