[Bug 75577] Empty KDELib, QTLib entry in Document Tree.
Friedrich W.H.Kossebau
friedrich.w.h at kossebau.de
Sat Feb 21 23:02:03 UTC 2004
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
http://bugs.kde.org/show_bug.cgi?id=75577
------- Additional Comments From friedrich.w.h kossebau de 2004-02-21 23:00 -------
>From KConfigBase::writePathEntry API dox:
It is checked whether the path is located under $HOME.
If so the path is written out with the user's home-directory
replaced with $HOME. The path should be read back with readPathEntry()
But the readPathEntry() calls got commented out and it was switched to using a
map (for performance reasons?) to read the config vars in. And QDir as used
in DocTreeViewTool::readLibraryDocs() does not know about $HOME. So api dox
install paths living under $HOME will not be found again on next kdevelop
start.
Untested quick and dirty patch:
Put all "it.data()" into a "URLUtil::envExpand()".
culprit code in doctreeviewwidget.cpp:
e.g. in DocTreeViewWidget constructor:
KConfig *config = DocTreeViewFactory::instance()->config();
if (config)
{
config->setGroup("General KDoc");
QMap<QString, QString> dmap = config->entryMap("General KDoc");
QString kdocdir(KDELIBS_DOCDIR);
kdocdir = URLUtil::envExpand(kdocdir);
if (dmap.empty() && (!kdocdir.isEmpty()))
{
config->writePathEntry("KDE Libraries (KDoc)", kdocdir);
dmap["KDE Libraries (KDoc)"] = kdocdir;
}
QMap<QString, QString>::Iterator it;
for (it = dmap.begin(); it != dmap.end(); ++it)
{
DocTreeKDELibsFolder *kdf = new DocTreeKDELibsFolder(it.data(),
it.key(), docView, "ctx_kdelibs");
kdf->refresh();
folder_kdoc.append(kdf);
}
}
More information about the KDevelop-devel
mailing list