Bug 76514 - Wrong contents of the documentation tree when loading the last opened project on startup.
Summary: Wrong contents of the documentation tree when loading the last opened project...
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: doctreeview (show other bugs)
Version: git master
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: KDevelop Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-03-01 17:17 UTC by Simon MARTIN
Modified: 2004-03-01 22:01 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Simon MARTIN 2004-03-01 17:17:11 UTC
Version:           3.0.90-CVS (using KDE Devel)
Installed from:    Compiled sources
Compiler:          gcc (GCC) 3.2.2 20030222 (Red Hat Linux 3.2.2-5) 
OS:          Linux

For personal convenience, I decided not to show any documentation in my project's documentation browser except the STL (through "Project" - >"Project Options" -> "Project Documentation").
I quit kdevelop without closing the project.
When I start it again, my project is loaded as I requested in kdevelop's options. The documentation browser contains all documentation items (OpenGL, Ada...); in other words, not what I wanted.
If I go to "Project" -> "Project Options" and click on the "Project documentation" item, don't change anything but click on OK, then the documentation tree becomes "normal" (ie. contains only the STL's documentation and my project's).
Comment 1 Alexander Dymo 2004-03-01 22:01:30 UTC
CVS commit by dymo: 

Store toc names in doctreeview items. This allows doctreeview to disable them when loading the project.
CCMAIL: 76514-done@bugs.kde.org


  M +12 -0     doctreeviewwidget.cpp   1.80


--- kdevelop/parts/doctreeview/doctreeviewwidget.cpp  #1.79:1.80
@@ -482,4 +482,7 @@ DocTreeTocFolder::DocTreeTocFolder(const
     setIndexFileName( fileName );
     setText(0, name);
+
+    QFileInfo fi(indexFileName());
+    toc_name = fi.baseName();
 }
 
@@ -490,4 +493,7 @@ DocTreeTocFolder::DocTreeTocFolder(KList
     setIndexFileName( fileName );
     
+    QFileInfo fi(indexFileName());
+    toc_name = fi.baseName();
+
     refresh();
 }
@@ -1598,4 +1604,8 @@ void DocTreeViewWidget::projectChanged(K
 {
     folder_project->setProject(project);
+
+    //FIXME: this takes more time to load but don't cause crashes somewhere in KStyle
+//    QTimer::singleShot(0, this, SLOT(refresh()));
+    
     folder_project->refresh();
     if(!project)
@@ -1637,4 +1647,5 @@ void DocTreeViewWidget::projectChanged(K
     // .. and insert all again except for ignored items
     QStringList ignoretocs = DomUtil::readListEntry(*m_part->projectDom(), "/kdevdoctreeview/ignoretocs", "toc");
+//    kdDebug() << "        !!!!!! IGNORE TOCS: " << ignoretocs << endl;
     QStringList ignoredh = DomUtil::readListEntry(*m_part->projectDom(), "/kdevdoctreeview/ignoredevhelp", "toc");
     QStringList ignoredoxygen = DomUtil::readListEntry(*m_part->projectDom(), "/kdevdoctreeview/ignoredoxygen", "toc");
@@ -1659,4 +1670,5 @@ void DocTreeViewWidget::projectChanged(K
     for (; it2.current(); ++it2)
     {
+//        kdDebug() << "            -- name " << it2.current()->tocName() << endl;
         if (!ignoretocs.contains(it2.current()->tocName()))
             docView->insertItem(it2.current());