Merge commit '2be0845c7492ad991f23ce5c90c322df788b62b5'

Conflicts:
	src/plugins/projectexplorer/projectexplorer.h
	src/plugins/qt4projectmanager/qt4projectconfigwidget.cpp
	src/plugins/qt4projectmanager/qt4runconfiguration.cpp
	src/plugins/qt4projectmanager/qtversionmanager.cpp
This commit is contained in:
con
2009-10-29 18:54:17 +01:00
82 changed files with 6357 additions and 4053 deletions

View File

@@ -404,6 +404,11 @@ Binding *ClassBinding::findClassOrNamespaceBinding(Identifier *id, QSet<Binding
if (id->isEqualTo(identifier()))
return this;
if (processed->contains(this))
return 0;
processed->insert(this);
foreach (ClassBinding *nestedClassBinding, children) {
if (id->isEqualTo(nestedClassBinding->identifier()))
return nestedClassBinding;
@@ -412,6 +417,7 @@ Binding *ClassBinding::findClassOrNamespaceBinding(Identifier *id, QSet<Binding
foreach (ClassBinding *baseClassBinding, baseClassBindings) {
if (! baseClassBinding)
continue;
else if (Binding *b = baseClassBinding->findClassOrNamespaceBinding(id, processed))
return b;
}

View File

@@ -62,8 +62,10 @@ QList<int> FindUsages::operator()(Symbol *symbol, Identifier *id, AST *ast)
_references.clear();
_declSymbol = symbol;
_id = id;
_exprDoc = Document::create("<references>");
accept(ast);
if (_declSymbol && _id) {
_exprDoc = Document::create("<references>");
accept(ast);
}
return _references;
}

View File

@@ -447,13 +447,13 @@ bool ResolveExpression::visit(CallAST *ast)
_results.clear();
// Compute the types of the actual arguments.
QList< QList<Result> > arguments;
for (ExpressionListAST *exprIt = ast->expression_list; exprIt;
exprIt = exprIt->next) {
arguments.append(operator()(exprIt->expression));
}
int actualArgumentCount = 0;
const unsigned actualArgumentCount = arguments.count();
//QList< QList<Result> > arguments;
for (ExpressionListAST *exprIt = ast->expression_list; exprIt; exprIt = exprIt->next) {
//arguments.append(operator()(exprIt->expression));
++actualArgumentCount;
}
Name *functionCallOp = control()->operatorNameId(OperatorNameId::FunctionCallOp);
@@ -639,10 +639,19 @@ ResolveExpression::resolveBaseExpression(const QList<Result> &baseResults, int a
}
}
if (ty->isNamedType())
if (NamedType *namedTy = ty->asNamedType()) {
const QList<Scope *> visibleScopes = _context.visibleScopes(result);
const QList<Symbol *> typedefCandidates = _context.resolve(namedTy->name(), visibleScopes);
foreach (Symbol *typedefCandidate, typedefCandidates) {
if (typedefCandidate->isTypedef() && typedefCandidate->type()->isNamedType()) {
ty = typedefCandidate->type();
break;
}
}
results.append(Result(ty, lastVisibleSymbol));
else if (Function *fun = ty->asFunctionType()) {
} else if (Function *fun = ty->asFunctionType()) {
Scope *funScope = fun->scope();
if (funScope && (funScope->isBlockScope() || funScope->isNamespaceScope())) {