From 10ed2c536ef815388391e575167c55552dd5dce5 Mon Sep 17 00:00:00 2001 From: Erik Verbruggen <erik.verbruggen@nokia.com> Date: Fri, 4 Jun 2010 09:59:38 +0200 Subject: [PATCH] Fixed hidden parameters. --- src/libs/cplusplus/BackwardsScanner.cpp | 6 +++--- src/libs/cplusplus/BackwardsScanner.h | 2 +- src/plugins/cppeditor/cpphoverhandler.cpp | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/libs/cplusplus/BackwardsScanner.cpp b/src/libs/cplusplus/BackwardsScanner.cpp index 9432197327f..bf3d59c4ac9 100644 --- a/src/libs/cplusplus/BackwardsScanner.cpp +++ b/src/libs/cplusplus/BackwardsScanner.cpp @@ -75,9 +75,9 @@ SimpleToken BackwardsScanner::LA(int index) const SimpleToken BackwardsScanner::operator[](int index) const { return const_cast<BackwardsScanner *>(this)->fetchToken(index); } -const SimpleToken &BackwardsScanner::fetchToken(int i) +const SimpleToken &BackwardsScanner::fetchToken(int tokenIndex) { - while (_offset + i < 0) { + while (_offset + tokenIndex < 0) { _block = _block.previous(); if (_blocksTokenized == _maxBlockCount || !_block.isValid()) { ++_offset; @@ -104,7 +104,7 @@ const SimpleToken &BackwardsScanner::fetchToken(int i) } } - return _tokens.at(_offset + i); + return _tokens.at(_offset + tokenIndex); } int BackwardsScanner::startToken() const diff --git a/src/libs/cplusplus/BackwardsScanner.h b/src/libs/cplusplus/BackwardsScanner.h index 585ed705b51..25b7bd3289e 100644 --- a/src/libs/cplusplus/BackwardsScanner.h +++ b/src/libs/cplusplus/BackwardsScanner.h @@ -72,7 +72,7 @@ public: int size() const; private: - const SimpleToken &fetchToken(int i); + const SimpleToken &fetchToken(int tokenIndex); private: TokenCache *_tokenCache; diff --git a/src/plugins/cppeditor/cpphoverhandler.cpp b/src/plugins/cppeditor/cpphoverhandler.cpp index f1ba99581a4..65172a6e1f5 100644 --- a/src/plugins/cppeditor/cpphoverhandler.cpp +++ b/src/plugins/cppeditor/cpphoverhandler.cpp @@ -138,16 +138,16 @@ void CppHoverHandler::showToolTip(TextEditor::ITextEditor *editor, const QPoint } } -static QString buildHelpId(Symbol *symbol, const Name *name) +static QString buildHelpId(Symbol *symbol, const Name *declarationName) { Scope *scope = 0; if (symbol) { scope = symbol->scope(); - name = symbol->name(); + declarationName = symbol->name(); } - if (! name) + if (! declarationName) return QString(); Overview overview; @@ -155,7 +155,7 @@ static QString buildHelpId(Symbol *symbol, const Name *name) overview.setShowReturnTypes(false); QStringList qualifiedNames; - qualifiedNames.prepend(overview.prettyName(name)); + qualifiedNames.prepend(overview.prettyName(declarationName)); for (; scope; scope = scope->enclosingScope()) { Symbol *owner = scope->owner(); -- GitLab