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

List:       kde-commits
Subject:    kdevelop/parts/cppsupport
From:       Alexander Dymo <cloudtemple () mksat ! net>
Date:       2003-04-09 13:51:20
[Download RAW message or body]

CVS commit by dymo: 

edit-ui subclassing feature bugs seems to be finally fixed


  M +6 -2      backgroundparser.cpp   1.35
  M +1 -1      backgroundparser.h   1.14
  M +20 -10    subclassingdlg.cpp   1.6


--- kdevelop/parts/cppsupport/backgroundparser.cpp  #1.34:1.35
@@ -310,7 +310,11 @@ Unit* BackgroundParser::findUnit( const 
 }
 
-TranslationUnitAST* BackgroundParser::translationUnit( const QString& fileName )
+TranslationUnitAST* BackgroundParser::translationUnit( const QString& fileName, bool \
create )  {
-    Unit* u = findUnit( fileName );
+    Unit* u = 0;
+    if (create)
+        u = findOrCreateUnit( fileName, true );
+    else
+        u = findUnit( fileName );
     return u ? u->translationUnit : 0;
 }

--- kdevelop/parts/cppsupport/backgroundparser.h  #1.13:1.14
@@ -59,5 +59,5 @@ public:
     void removeAllFiles();
 
-    TranslationUnitAST* translationUnit( const QString& fileName );
+    TranslationUnitAST* translationUnit( const QString& fileName, bool create = \
false );  QValueList<Problem> problems( const QString& fileName );
 

--- kdevelop/parts/cppsupport/subclassingdlg.cpp  #1.5:1.6
@@ -115,5 +115,5 @@ m_newFileNames(dummy), m_cppSupport( cpp
   
   m_cppSupport->backgroundParser()->lock();
-  TranslationUnitAST* translationUnit = \
m_cppSupport->backgroundParser()->translationUnit( filename + ".h" ); +  \
TranslationUnitAST* translationUnit = \
m_cppSupport->backgroundParser()->translationUnit( filename + ".h", true );  if( \
translationUnit ){  StoreWalker w( filename + ".h", &classcontainer );
@@ -132,11 +132,21 @@ m_newFileNames(dummy), m_cppSupport( cpp
     m_edFileName->setText(pathsplit[pathsplit.count()-1]);
     cls->out();
-    SlotList slotlist = cls->getSortedMethodList();
-    SlotList::iterator it;
-    for ( it = slotlist.begin(); it != slotlist.end(); ++it )
+
+    cls->slotIterator.toFirst();
+    ParsedMethod *method = 0;
+    while ( (method = cls->slotIterator.current()) != 0)
+    {
+      m_parsedMethods << method->name()+"(";
+      ++(cls->slotIterator);
+    }
+
+    cls->methodIterator.toFirst();
+    method = 0;
+    while ( (method = cls->methodIterator.current()) != 0)
     {
-      ParsedMethod *method = *it;
       m_parsedMethods << method->name()+"(";
+      ++(cls->methodIterator);
     }
+
   }
   readUiFile();
@@ -237,5 +247,5 @@ void SubclassingDlg::readUiFile()
     m_slotView->insertItem(newFunc);
     if (allreadyInSubclass(funcelem.text()))
-      newSlot->setAllreadyInSubclass();
+      newFunc->setAllreadyInSubclass();
     m_slots << newFunc;
   }


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

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