diff --git a/src/tools/moc/preprocessor.cpp b/src/tools/moc/preprocessor.cpp index 087b064c0f..c5d6b58412 100644 --- a/src/tools/moc/preprocessor.cpp +++ b/src/tools/moc/preprocessor.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). -** Copyright (C) 2013 Olivier Goffart +** Copyright (C) 2014 Olivier Goffart ** Contact: http://www.qt-project.org/legal ** ** This file is part of the tools applications of the Qt Toolkit. @@ -1094,10 +1094,6 @@ void Preprocessor::preprocess(const QByteArray &filename, Symbols &preprocessed) macro.symbols.last().token == PP_HASHHASH) { error("'##' cannot appear at either end of a macro expansion"); } - if (macro.symbols.last().token == HASH || - macro.symbols.last().token == PP_HASH) { - error("'#' is not followed by a macro parameter"); - } } macros.insert(name, macro); continue; diff --git a/tests/auto/tools/moc/parse-defines.h b/tests/auto/tools/moc/parse-defines.h index c9b5d13b1f..9a00955846 100644 --- a/tests/auto/tools/moc/parse-defines.h +++ b/tests/auto/tools/moc/parse-defines.h @@ -77,6 +77,8 @@ #define DEFINE_CMDLINE_SIGNAL void cmdlineSignal(const QMap &i) #endif +#define HASH_SIGN # + PD_BEGIN_NAMESPACE class DEFINE_CMDLINE_EMPTY PD_CLASSNAME DEFINE_CMDLINE_EMPTY