diff options
author | Martin Smith <martin.smith@qt.io> | 2017-09-14 11:47:13 +0200 |
---|---|---|
committer | Martin Smith <martin.smith@qt.io> | 2017-09-18 12:37:47 +0000 |
commit | 3205ac623262abb677cd55b3043f2f1cc5303933 (patch) | |
tree | fce5f7e0abb52e36d4f4371c9ad14b39d25fc7ad /src/qdoc/clangcodeparser.cpp | |
parent | e86884bc7ae0ba94780dcedb61270ffb0d457f13 (diff) | |
download | qttools-3205ac623262abb677cd55b3043f2f1cc5303933.tar.gz |
qdoc: Correct a misuse of a local variable
This update fixes a bug caused by reusing an index varible
name declared in an outer loop in an inner loop, which made
qdoc crash in one case.
Change-Id: I27abb4ea3241be620c8c226732e83ef42b575da9
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
Diffstat (limited to 'src/qdoc/clangcodeparser.cpp')
-rw-r--r-- | src/qdoc/clangcodeparser.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/qdoc/clangcodeparser.cpp b/src/qdoc/clangcodeparser.cpp index 7216b1604..55e0cb573 100644 --- a/src/qdoc/clangcodeparser.cpp +++ b/src/qdoc/clangcodeparser.cpp @@ -1577,11 +1577,11 @@ Node* ClangCodeParser::parseFnArg(const Location& location, const QString& fnArg QStringList blankSplit = commaSplit[i].split(' '); if (blankSplit.size() > 0) { QString pName = blankSplit.last(); - int i = 0; - while (i < pName.length() && !pName.at(i).isLetter()) - i++; - if (i > 0) - pName = pName.mid(i); + int j = 0; + while (j < pName.length() && !pName.at(i).isLetter()) + j++; + if (j > 0) + pName = pName.mid(j); if (!pName.isEmpty() && pName != pvect[i].name()) pvect[i].setName(pName); } |