summaryrefslogtreecommitdiff
path: root/src/plugins/clangcodemodel
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@digia.com>2014-09-11 10:44:13 +0200
committerErik Verbruggen <erik.verbruggen@digia.com>2014-09-12 15:42:42 +0200
commitce49f92cb757c248281c797025cef8a7cdc007f3 (patch)
treee07b823ecfe3561764b6bf2a8acd4be44c17a0f6 /src/plugins/clangcodemodel
parentb4f336f1427287b2a10b85ee5c62abeeac9d17b3 (diff)
downloadqt-creator-ce49f92cb757c248281c797025cef8a7cdc007f3.tar.gz
Clang: remove dead code.
Change-Id: I06bac5443af41a27c2641199948705c45e8a4586 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
Diffstat (limited to 'src/plugins/clangcodemodel')
-rw-r--r--src/plugins/clangcodemodel/clangcompletion.cpp11
1 files changed, 1 insertions, 10 deletions
diff --git a/src/plugins/clangcodemodel/clangcompletion.cpp b/src/plugins/clangcodemodel/clangcompletion.cpp
index a0a2ba528c..1958c16de7 100644
--- a/src/plugins/clangcodemodel/clangcompletion.cpp
+++ b/src/plugins/clangcodemodel/clangcompletion.cpp
@@ -688,13 +688,10 @@ int ClangCompletionAssistProcessor::startCompletionHelper()
m_model->m_completionOperator = T_LPAREN;
}
- QString expression;
- int startOfExpression = m_interface->position();
tc.setPosition(endOfExpression);
if (m_model->m_completionOperator) {
- expression = expressionUnderCursor(tc);
- startOfExpression = endOfExpression - expression.length();
+ const QString expression = expressionUnderCursor(tc);
if (m_model->m_completionOperator == T_LPAREN) {
if (expression.endsWith(QLatin1String("SIGNAL")))
@@ -705,19 +702,13 @@ int ClangCompletionAssistProcessor::startCompletionHelper()
else if (m_interface->position() != endOfOperator) {
// We don't want a function completion when the cursor isn't at the opening brace
- expression.clear();
m_model->m_completionOperator = T_EOF_SYMBOL;
m_startPosition = startOfName;
- startOfExpression = m_interface->position();
}
}
- } else if (expression.isEmpty()) {
- while (startOfExpression > 0 && m_interface->characterAt(startOfExpression).isSpace())
- --startOfExpression;
}
int line = 0, column = 0;
-// Convenience::convertPosition(m_interface->document(), startOfExpression, &line, &column);
Convenience::convertPosition(m_interface->textDocument(), endOfOperator, &line, &column);
return startCompletionInternal(fileName, line, column, endOfOperator);
}