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

List:       kde-commits
Subject:    branches/kdevelop/3.4
From:       David Nolden <david.nolden.kde () art-master ! de>
Date:       2007-02-16 18:29:15
Message-ID: 1171650555.275947.27777.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 634258 by zwabel:

Fix a bug about updating the code-model: When a member any member of a namespace, a \
variable, or an enumerator changed its position, but a position-change was the only \
change(so the code-model can be updated instead of replacing a part), the position \
was not updated.

 M  +1 -17     languages/cpp/cppsupportpart.cpp  
 M  +1 -1      lib/interfaces/codemodel.cpp  


--- branches/kdevelop/3.4/languages/cpp/cppsupportpart.cpp #634257:634258
@@ -2410,13 +2410,9 @@
 
 		QStringList l = files.res;
 
-		///Since even normal typing may create problems, these must not break the group, \
                so group everything together afterwards
-		int currentGroup = 0;
-
 		QMap<QString, bool> wholeResult;
 		QStringList missing;
 
-		bool updated = true; ///Could the current code-model be updated to reflect the \
changes?  QMap<QString, FileDom> newFiles;
 		
 		while(!l.isEmpty() ) {
@@ -2454,18 +2450,6 @@
 							for( QStringList::const_iterator it = grp.begin(); it != grp.end(); ++it )
 								wholeResult[*it] = true;
 						}
-
-						/*
-							///Merge the groups together so that files parsed together get into one group \
                again
-							if( walker.file() ) {
-								if( !files.hadQueueProblem() ) {
-									if( !currentGroup ) {
-										currentGroup = walker.file()->groupId();
-									} else {
-										currentGroup = codeModel()->mergeGroups( currentGroup, \
                walker.file()->groupId() );
-									}
-								}
-							}*/
 					}
 				} else {
 					kdDebug() << "failed to parse " << fileName << endl;
@@ -2480,7 +2464,7 @@
 		for( QMap<QString, FileDom>::const_iterator it = newFiles.begin(); it != \
newFiles.end(); ++it ) {  FileDom oldFile = codeModel()->fileByName( it.key() );
 
-			if( !oldFile->canUpdate( *it ) ) {
+			if( !oldFile || !oldFile->canUpdate( *it ) ) {
 				canUpdate = false;
 				break;
 			}
--- branches/kdevelop/3.4/lib/interfaces/codemodel.cpp #634257:634258
@@ -87,7 +87,7 @@
   typename MapContainer::iterator oldIt = old.begin();
   typename MapContainer::const_iterator newIt = newMap.begin();
   while( oldIt != old.end() ) {
-    (*oldIt)->update( *oldIt );
+    (*oldIt)->update( *newIt );
     ++oldIt;
     ++newIt;
   }


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

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