forked from qt-creator/qt-creator
Merge commit 'origin/1.3'
Conflicts: src/plugins/qt4projectmanager/qt4project.cpp
This commit is contained in:
@@ -1124,14 +1124,6 @@ bool CppCodeCompletion::completeMember(const QList<TypeOfExpression::Result> &ba
|
||||
m_completionOperator,
|
||||
&replacedDotOperator);
|
||||
|
||||
if (replacedDotOperator) {
|
||||
// Replace . with ->
|
||||
int length = m_editor->position() - m_startPosition + 1;
|
||||
m_editor->setCurPos(m_startPosition - 1);
|
||||
m_editor->replace(length, QLatin1String("->"));
|
||||
++m_startPosition;
|
||||
}
|
||||
|
||||
QList<Symbol *> classObjectCandidates;
|
||||
foreach (const TypeOfExpression::Result &r, classObjectResults) {
|
||||
FullySpecifiedType ty = r.first.simplified();
|
||||
@@ -1150,6 +1142,14 @@ bool CppCodeCompletion::completeMember(const QList<TypeOfExpression::Result> &ba
|
||||
}
|
||||
}
|
||||
|
||||
if (replacedDotOperator && ! classObjectCandidates.isEmpty()) {
|
||||
// Replace . with ->
|
||||
int length = m_editor->position() - m_startPosition + 1;
|
||||
m_editor->setCurPos(m_startPosition - 1);
|
||||
m_editor->replace(length, QLatin1String("->"));
|
||||
++m_startPosition;
|
||||
}
|
||||
|
||||
completeClass(classObjectCandidates, context, /*static lookup = */ false);
|
||||
if (! m_completions.isEmpty())
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user