moc: Fix parsing of the empty preprocessor command
When encountering a null preprocessing directive (which is supposed to be ignored), the moc preprocessor will leave a PP_NEWLINE token in the token stream. That will confuse the parser. The PP_NEWLINE token need to be ignored in the preprocessing phase. Task-number: QTBUG-22717 Change-Id: I1e502a7e5bc6fa8ce2f82109ba7199b95747ff0a Reviewed-by: João Abecasis <joao.abecasis@nokia.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
This commit is contained in:
parent
83fc52e3b4
commit
d2090e19a9
@ -915,6 +915,8 @@ void Preprocessor::preprocess(const QByteArray &filename, Symbols &preprocessed)
|
||||
case PP_ENDIF:
|
||||
until(PP_NEWLINE);
|
||||
continue;
|
||||
case PP_NEWLINE:
|
||||
continue;
|
||||
case SIGNALS:
|
||||
case SLOTS: {
|
||||
Symbol sym = symbol();
|
||||
|
@ -368,6 +368,13 @@ signals:
|
||||
void signalInIf3();
|
||||
#endif
|
||||
|
||||
# //QTBUG-22717
|
||||
# /* */
|
||||
#
|
||||
|
||||
# \
|
||||
|
||||
//
|
||||
public slots:
|
||||
void const slotWithSillyConst() {}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user