diff options
author | Topi Reinio <topi.reinio@qt.io> | 2017-09-01 13:56:34 +0200 |
---|---|---|
committer | Topi Reiniƶ <topi.reinio@qt.io> | 2017-09-02 22:01:57 +0000 |
commit | 5c50201d616eeefe61b960a8b21d3adbae8c26a0 (patch) | |
tree | d838076b8984e51b5288eb694469f67d94305852 | |
parent | 1c643431ae034853a7e0c46adf90a68ec7cbfc01 (diff) | |
download | qttools-5c50201d616eeefe61b960a8b21d3adbae8c26a0.tar.gz |
qdoc: Fix handling of '#if defined' preprocessor statements
Fix the regular expression that incorrectly made parentheses
mandatory for the #if condition; an optional specifier ('?')
was missing for the closing parenthesis.
Task-number: QTBUG-62931
Change-Id: Ia046d4217f64560dd49707ec2d01b73071ba2d03
Reviewed-by: Martin Smith <martin.smith@qt.io>
-rw-r--r-- | src/qdoc/tokenizer.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qdoc/tokenizer.cpp b/src/qdoc/tokenizer.cpp index 3a1003b83..5f4f7cb80 100644 --- a/src/qdoc/tokenizer.cpp +++ b/src/qdoc/tokenizer.cpp @@ -501,7 +501,7 @@ void Tokenizer::initialize(const Config &config) if (!versionSym.isEmpty()) versionX->setPattern("[ \t]*(?:" + QRegExp::escape(versionSym) + ")[ \t]+\"([^\"]*)\"[ \t]*"); - definedX = new QRegExp("defined ?\\(?([A-Z_0-9a-z]+) ?\\)"); + definedX = new QRegExp("defined ?\\(?([A-Z_0-9a-z]+) ?\\)?"); QStringList d = config.getStringList(CONFIG_DEFINES); d += "qdoc"; |