~ubuntu-branches/ubuntu/utopic/kdevelop-php/utopic

« back to all changes in this revision

Viewing changes to completion/context.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Fathi Boudra
  • Date: 2010-05-18 12:21:48 UTC
  • mto: (5.1.1 squeeze) (1.1.5)
  • mto: This revision was merged to the branch mainline in revision 7.
  • Revision ID: james.westby@ubuntu.com-20100518122148-04mq5800fnjfbs48
Tags: upstream-1.0.0
ImportĀ upstreamĀ versionĀ 1.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
1400
1400
                    CodeModelItem::Kind k = foundItems[i].kind;
1401
1401
                    if (((k & CodeModelItem::Function) || (k & CodeModelItem::Variable)) && !(k & CodeModelItem::ClassMember)) {
1402
1402
                        foreach(const ParsingEnvironmentFilePointer &env, DUChain::self()->allEnvironmentFiles(url)) {
1403
 
                            if (env->language() != IndexedString("Php")) continue;
 
1403
                            if (env->language() != phpLangString) continue;
1404
1404
                            TopDUContext* top = env->topContext();
1405
1405
                            if(!top) continue;
1406
1406
                            if (m_duContext->imports(top)) continue;
1442
1442
                        if (!(foundItems[i].kind & CompletionCodeModelItem::Exception)) continue;
1443
1443
                    }
1444
1444
                    foreach(const ParsingEnvironmentFilePointer &env, DUChain::self()->allEnvironmentFiles(url)) {
1445
 
                        Q_ASSERT(env->language() == IndexedString("Php"));
 
1445
                        Q_ASSERT(env->language() == phpLangString);
1446
1446
                        items << CompletionTreeItemPointer ( new CodeModelCompletionItem(env, foundItems[i]));
1447
1447
                    }
1448
1448
                }
1572
1572
 
1573
1573
    static DUChainPointer<ClassDeclaration> exceptionDecl;
1574
1574
    if (!exceptionDecl) {
1575
 
        QList<Declaration*> decs = dec->context()->findDeclarations(QualifiedIdentifier("exception"));
1576
 
        Q_ASSERT(decs.count() == 1);
 
1575
        QList<Declaration*> decs = dec->context()->findDeclarations(exceptionQId);
 
1576
        Q_ASSERT(decs.count());
1577
1577
        exceptionDecl = dynamic_cast<ClassDeclaration*>(decs.first());
1578
1578
        Q_ASSERT(exceptionDecl);
1579
1579
    }