moc: Fix parsing of operator<
moc would skip the 'operator' keyword as unknown and try to parse a type again but as it sees the '<' it looks for the corresponding '>' which does not exist types can't start with '<' anyway, so return an invalid type and continue parsing as usual Task-number: QTBUG-36834 Change-Id: If3d27076ef9947abf8c57c594713eece9334d0b0 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
This commit is contained in:
parent
4179302d65
commit
2b0f02aa5c
@ -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)) {
|
||||
|
@ -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&);
|
||||
|
Loading…
Reference in New Issue
Block a user