forked from qt-creator/qt-creator
Renamed Symbol::scope() to Symbol::enclosingScope().
This commit is contained in:
@@ -67,7 +67,7 @@ QString AbstractEditorSupport::functionAt(const CppModelManagerInterface *modelM
|
||||
if (!document)
|
||||
return QString();
|
||||
if (const CPlusPlus::Symbol *symbol = document->lastVisibleSymbolAt(line, column))
|
||||
if (const CPlusPlus::Scope *scope = symbol->scope())
|
||||
if (const CPlusPlus::Scope *scope = symbol->enclosingScope())
|
||||
if (const CPlusPlus::Scope *functionScope = scope->enclosingFunction())
|
||||
if (const CPlusPlus::Symbol *function = functionScope) {
|
||||
const CPlusPlus::Overview o;
|
||||
|
||||
@@ -1055,7 +1055,7 @@ void CppCodeCompletion::globalCompletion(Scope *currentScope)
|
||||
QList<ClassOrNamespace *> usingBindings;
|
||||
ClassOrNamespace *currentBinding = 0;
|
||||
|
||||
for (Scope *scope = currentScope; scope; scope = scope->scope()) {
|
||||
for (Scope *scope = currentScope; scope; scope = scope->enclosingScope()) {
|
||||
if (scope->isBlock()) {
|
||||
if (ClassOrNamespace *binding = context.lookupType(scope)) {
|
||||
for (unsigned i = 0; i < scope->memberCount(); ++i) {
|
||||
@@ -1074,7 +1074,7 @@ void CppCodeCompletion::globalCompletion(Scope *currentScope)
|
||||
}
|
||||
}
|
||||
|
||||
for (Scope *scope = currentScope; scope; scope = scope->scope()) {
|
||||
for (Scope *scope = currentScope; scope; scope = scope->enclosingScope()) {
|
||||
if (scope->isBlock()) {
|
||||
for (unsigned i = 0; i < scope->memberCount(); ++i) {
|
||||
addCompletionItem(scope->memberAt(i));
|
||||
@@ -1153,7 +1153,7 @@ bool CppCodeCompletion::completeConstructorOrFunction(const QList<LookupItem> &r
|
||||
|
||||
if (! fun->name())
|
||||
continue;
|
||||
else if (! functions.isEmpty() && functions.first()->scope() != fun->scope())
|
||||
else if (! functions.isEmpty() && functions.first()->enclosingScope() != fun->enclosingScope())
|
||||
continue; // skip fun, it's an hidden declaration.
|
||||
|
||||
bool newOverload = true;
|
||||
|
||||
@@ -190,8 +190,8 @@ static void find_helper(QFutureInterface<Usage> &future,
|
||||
const QString sourceFile = QString::fromUtf8(symbol->fileName(), symbol->fileNameLength());
|
||||
QStringList files(sourceFile);
|
||||
|
||||
if (symbol->isClass() || symbol->isForwardClassDeclaration() || (symbol->scope() && ! symbol->isStatic() &&
|
||||
symbol->scope()->isNamespace())) {
|
||||
if (symbol->isClass() || symbol->isForwardClassDeclaration() || (symbol->enclosingScope() && ! symbol->isStatic() &&
|
||||
symbol->enclosingScope()->isNamespace())) {
|
||||
foreach (const Document::Ptr &doc, context.snapshot()) {
|
||||
if (doc->fileName() == sourceFile)
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user