[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/kdevelop/3.4/languages/cpp
From:       David Nolden <david.nolden.kde () art-master ! de>
Date:       2006-10-18 0:28:34
Message-ID: 1161131314.443811.20909.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 596619 by zwabel:

registering imports from the recovery-points is not necessary anymore, because they \
are taken from the code-model(this makes the aliasing-stuff a bit faster)

 M  +18 -10    cppcodecompletion.cpp  


--- branches/kdevelop/3.4/languages/cpp/cppcodecompletion.cpp #596618:596619
@@ -108,6 +108,11 @@
     Item& item;
 };
 
+ParsedFilePointer  getParsedFile( CodeModelItem* i ) {
+	if( !i || !i->file() || !i->file()->parseResult() ) return 0;
+	return dynamic_cast<ParsedFile*>( i->file()->parseResult().data());
+}
+
 SafetyCounter safetyCounter;
 CppCodeCompletion* cppCompletionInstance = 0;
 
@@ -1702,14 +1707,17 @@
 
       SimpleType global = ctx->global();
 
-      if ( !m_cachedFromContext ) {
-	      conf.setGlobalNamespace( &( *global ) );
-        if ( recoveryPoint ) {
-          recoveryPoint->registerImports( global, m_pSupport->codeCompletionConfig() \
                ->namespaceAliases() );
-        } else {
-          kdDebug( 9007 ) << "no recovery-point, cannot use imports" << endl;
-        }
-      }
+	    /* //Should not be necessary any more
+				if( !getParsedFile( f->file().data() ) || getParsedFile( f->file().data() \
)->includeFiles().size() <= 1 ) { +				if ( !m_cachedFromContext ) {
+					conf.setGlobalNamespace( &( *global ) );
+					if ( recoveryPoint ) {
+						recoveryPoint->registerImports( global, m_pSupport->codeCompletionConfig() \
->namespaceAliases() ); +					} else {
+						kdDebug( 9007 ) << "no recovery-point, cannot use imports" << endl;
+					}
+				}
+	    }*/
 
       ///Insert the "this"-type(container) and correctly resolve it using imported \
namespaces  if ( ctx->container() ) {
@@ -2028,9 +2036,9 @@
 
     if ( !m_cachedFromContext ) {
       conf.setGlobalNamespace( &( *global ) );
-
+	    /* //Should not be necessary any more
       if ( recoveryPoint )
-        recoveryPoint->registerImports( global, m_pSupport->codeCompletionConfig() \
->namespaceAliases() ); +        recoveryPoint->registerImports( global, \
m_pSupport->codeCompletionConfig() ->namespaceAliases() );*/  }
 
     ExpressionInfo exp = findExpressionAt( line, column , startLine, startCol );


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic