23 #include <sys/types.h>
35 #include <QtCore/QMap>
36 #include <QtCore/QFile>
37 #include <QtCore/QDir>
38 #include <QtCore/QRegExp>
39 #include <QtCore/QDirIterator>
46 if (it != dupeList.end())
48 kDebug(7021) << e.tagName() <<
"and" << s <<
"requires combining!";
50 docElem.removeChild(*it);
53 dupeList.insert(s, e);
58 for(QStringList::ConstIterator it = list.begin();
59 it != list.end(); ++it)
61 QDomElement e = docElem.ownerDocument().createElement(tag);
62 QDomText txt = docElem.ownerDocument().createTextNode(*it);
64 docElem.insertAfter(e, n);
67 QDomNode
next = n.nextSibling();
68 docElem.removeChild(n);
73 void VFolderMenu::registerFile(
const QString &file)
75 int i = file.lastIndexOf(
'/');
80 registerDirectory(dir);
83 void VFolderMenu::registerDirectory(
const QString &directory)
99 if ((*it).startsWith(previous))
101 if ((*it).startsWith(previous, Qt::CaseInsensitive))
118 if (itemList.contains(menuId))
119 printf(
"%s: %s INCL %d EXCL %d\n", qPrintable(menuName), qPrintable(comment), includeList.contains(menuId) ? 1 : 0, excludeList.contains(menuId) ? 1 : 0);
126 items1.insert(p->menuId(), p);
136 if (!items2.contains(
id))
145 items1.remove(p->menuId());
149 VFolderMenu::takeSubMenu(SubMenu *parentMenu,
const QString &menuName)
151 const int i = menuName.indexOf(
'/');
152 const QString s1 = i > 0 ? menuName.left(i) : menuName;
153 const QString s2 = menuName.mid(i+1);
159 if (menu->name == s1)
164 parentMenu->subMenus.erase(it);
169 return takeSubMenu(menu, s2);
177 VFolderMenu::mergeMenu(SubMenu *menu1, SubMenu *menu2,
bool reversePriority)
181 track(
m_trackId, menu1->name, menu1->items, menu1->excludeItems, menu2->items,
QString(
"Before MenuMerge w. %1 (incl)").arg(menu2->name));
182 track(
m_trackId, menu1->name, menu1->items, menu1->excludeItems, menu2->excludeItems,
QString(
"Before MenuMerge w. %1 (excl)").arg(menu2->name));
187 excludeItems(menu2->items, menu1->excludeItems);
188 includeItems(menu1->items, menu2->items);
189 excludeItems(menu2->excludeItems, menu1->items);
190 includeItems(menu1->excludeItems, menu2->excludeItems);
195 excludeItems(menu1->items, menu2->excludeItems);
196 includeItems(menu1->items, menu2->items);
197 includeItems(menu1->excludeItems, menu2->excludeItems);
198 menu1->isDeleted = menu2->isDeleted;
200 while (!menu2->subMenus.isEmpty())
202 SubMenu *subMenu = menu2->subMenus.takeFirst();
203 insertSubMenu(menu1, subMenu->name, subMenu, reversePriority);
209 if (menu1->directoryFile.isEmpty())
210 menu1->directoryFile = menu2->directoryFile;
211 if (menu1->defaultLayoutNode.isNull())
212 menu1->defaultLayoutNode = menu2->defaultLayoutNode;
213 if (menu1->layoutNode.isNull())
214 menu1->layoutNode = menu2->layoutNode;
219 if (!menu2->directoryFile.isEmpty())
220 menu1->directoryFile = menu2->directoryFile;
221 if (!menu2->defaultLayoutNode.isNull())
222 menu1->defaultLayoutNode = menu2->defaultLayoutNode;
223 if (!menu2->layoutNode.isNull())
224 menu1->layoutNode = menu2->layoutNode;
229 track(
m_trackId, menu1->name, menu1->items, menu1->excludeItems, menu2->items,
QString(
"After MenuMerge w. %1 (incl)").arg(menu2->name));
230 track(
m_trackId, menu1->name, menu1->items, menu1->excludeItems, menu2->excludeItems,
QString(
"After MenuMerge w. %1 (excl)").arg(menu2->name));
237 VFolderMenu::insertSubMenu(SubMenu *parentMenu,
const QString &menuName, SubMenu *newMenu,
bool reversePriority)
239 const int i = menuName.indexOf(
'/');
240 const QString s1 = menuName.left(i);
241 const QString s2 = menuName.mid(i+1);
244 foreach (SubMenu *menu, parentMenu->subMenus)
246 if (menu->name == s1)
250 mergeMenu(menu, newMenu, reversePriority);
255 insertSubMenu(menu, s2, newMenu, reversePriority);
263 newMenu->name = menuName;
264 parentMenu->subMenus.append(newMenu);
268 SubMenu *menu =
new SubMenu;
270 parentMenu->subMenus.append(menu);
271 insertSubMenu(menu, s2, newMenu);
278 const int i = name.indexOf(
'/');
283 parentMenu->items.insert(newService->menuId(), newService);
291 foreach (SubMenu *menu, parentMenu->subMenus)
293 if (menu->name == s1)
295 insertService(menu, s2, newService);
300 SubMenu *menu =
new SubMenu;
302 parentMenu->subMenus.append(menu);
303 insertService(menu, s2, newService);
309 m_serviceFactory(serviceFactory),
310 m_kbuildsycocaInterface(kbuildsycocaInterface)
323 #define FOR_ALL_APPLICATIONS(it) \
324 foreach (AppsInfo *info, m_appsInfoStack) \
326 QHashIterator<QString,KService::Ptr> it = info->applications; \
327 while (it.hasNext()) \
330 #define FOR_ALL_APPLICATIONS_END } }
332 #define FOR_CATEGORY(category, it) \
333 foreach (AppsInfo *info, m_appsInfoStack) \
335 const KService::List list = info->dictCategories.value(category); \
336 for(KService::List::ConstIterator it = list.constBegin(); \
337 it != list.constEnd(); ++it) \
339 #define FOR_CATEGORY_END } }
342 VFolderMenu::findApplication(
const QString &relPath)
346 if (info->applications.contains(relPath)) {
358 service->setMenuId(
id);
360 m_serviceFactory->
addEntry(KSycocaEntry::Ptr::staticCast(service));
364 VFolderMenu::buildApplicationIndex(
bool unusedOnly)
368 info->dictCategories.clear();
369 QMutableHashIterator<QString,KService::Ptr> it = info->applications;
380 Q_FOREACH(
const QString& cat, s->categories()) {
381 info->dictCategories[cat].append(s);
388 VFolderMenu::createAppsInfo()
399 VFolderMenu::loadAppsInfo()
412 VFolderMenu::unloadAppsInfo()
428 VFolderMenu::absoluteDir(
const QString &_dir,
const QString &baseDir,
bool keepRelativeToCfg)
431 if (QDir::isRelativePath(dir))
435 if (!dir.endsWith(
'/'))
438 bool relative = QDir::isRelativePath(dir);
439 if (relative && !keepRelativeToCfg) {
452 QDomNodeList mergeFileList = doc.elementsByTagName(tag);
453 for(
int i = 0; i < (int)mergeFileList.count(); i++)
455 QDomAttr attr = doc.createAttribute(
"__BaseDir");
457 mergeFileList.item(i).toElement().setAttributeNode(attr);
463 QDomNodeList mergeFileList = doc.elementsByTagName(tag);
464 for(
int i = 0; i < (int)mergeFileList.count(); i++)
466 QDomAttr attr = doc.createAttribute(
"__BasePath");
468 mergeFileList.item(i).toElement().setAttributeNode(attr);
473 VFolderMenu::loadDoc()
481 if ( !file.open( QIODevice::ReadOnly ) )
489 if ( !doc.setContent( &file, &errorMsg, &errorRow, &errorCol ) ) {
490 kWarning(7021) <<
"Parse error in " <<
m_docInfo.
path <<
", line " << errorRow <<
", col " << errorCol <<
": " << errorMsg;
508 VFolderMenu::mergeFile(QDomElement &parent,
const QDomNode &mergeHere)
511 QDomDocument doc = loadDoc();
513 QDomElement docElem = doc.documentElement();
514 QDomNode n = docElem.firstChild();
515 QDomNode last = mergeHere;
518 QDomElement e = n.toElement();
519 QDomNode
next = n.nextSibling();
526 else if (e.tagName() !=
"Name")
528 parent.insertAfter(n, last);
532 docElem.removeChild(n);
539 VFolderMenu::mergeMenus(QDomElement &docElem,
QString &name)
546 QDomElement defaultLayoutNode;
547 QDomElement layoutNode;
549 QDomNode n = docElem.firstChild();
550 while( !n.isNull() ) {
551 QDomElement e = n.toElement();
555 else if( e.tagName() ==
"DefaultAppDirs") {
560 else if( e.tagName() ==
"DefaultDirectoryDirs") {
565 else if( e.tagName() ==
"DefaultMergeDirs") {
570 else if( e.tagName() ==
"AppDir") {
574 else if( e.tagName() ==
"DirectoryDir") {
576 foldNode(docElem, e, directoryDirNodes);
578 else if( e.tagName() ==
"LegacyDir") {
580 foldNode(docElem, e, legacyDirNodes);
582 else if( e.tagName() ==
"Directory") {
584 foldNode(docElem, e, directoryNodes);
586 else if( e.tagName() ==
"Move") {
589 QDomNode n2 = e.firstChild();
590 while( !n2.isNull() ) {
591 QDomElement e2 = n2.toElement();
592 if( e2.tagName() ==
"Old")
597 n2 = n2.nextSibling();
599 foldNode(docElem, e, appDirNodes, orig);
601 else if( e.tagName() ==
"Menu") {
605 if (it != menuNodes.end())
607 QDomElement docElem2 = *it;
608 QDomNode n2 = docElem2.firstChild();
609 QDomNode first = e.firstChild();
610 while( !n2.isNull() ) {
611 QDomElement e2 = n2.toElement();
612 QDomNode n3 = n2.nextSibling();
613 e.insertBefore(n2, first);
614 docElem2.removeChild(n2);
620 docElem.removeChild(docElem2);
623 menuNodes.insert(name, e);
625 else if( e.tagName() ==
"MergeFile") {
626 if ((e.attribute(
"type") ==
"parent"))
627 pushDocInfoParent(e.attribute(
"__BasePath"), e.attribute(
"__BaseDir"));
629 pushDocInfo(e.text(), e.attribute(
"__BaseDir"));
632 mergeFile(docElem, n);
637 docElem.removeChild(last);
640 else if( e.tagName() ==
"MergeDir") {
641 QString dir = absoluteDir(e.text(), e.attribute(
"__BaseDir"),
true);
644 for(QStringList::ConstIterator it=dirs.begin();
645 it != dirs.end(); ++it)
647 registerDirectory(*it);
651 if (!QDir::isRelativePath(dir))
663 for(QStringList::ConstIterator it=fileList.constBegin();
664 it != fileList.constEnd(); ++it)
667 mergeFile(docElem, n);
673 docElem.removeChild(last);
677 else if( e.tagName() ==
"Name") {
680 else if( e.tagName() ==
"DefaultLayout") {
681 if (!defaultLayoutNode.isNull())
682 docElem.removeChild(defaultLayoutNode);
683 defaultLayoutNode = e;
685 else if( e.tagName() ==
"Layout") {
686 if (!layoutNode.isNull())
687 docElem.removeChild(layoutNode);
695 VFolderMenu::pushDocInfo(
const QString &fileName,
const QString &baseDir)
698 if (!baseDir.isEmpty())
700 if (!QDir::isRelativePath(baseDir))
707 if (!QDir::isRelativePath(baseName))
708 registerFile(baseName);
717 kDebug(7021) <<
"Menu" << fileName <<
"not found.";
721 i = baseName.lastIndexOf(
'/');
735 VFolderMenu::pushDocInfoParent(
const QString &basePath,
const QString &baseDir)
741 QString fileName = basePath.mid(basePath.lastIndexOf(
'/')+1);
747 while( !result.isEmpty() && (result[0] != basePath))
748 result.erase(result.begin());
750 if (result.count() <= 1)
759 VFolderMenu::popDocInfo()
765 VFolderMenu::locateMenuFile(
const QString &fileName)
767 if (!QDir::isRelativePath(fileName))
776 QString xdgMenuPrefix = QString::fromLocal8Bit(qgetenv(
"XDG_MENU_PREFIX"));
777 if (!xdgMenuPrefix.isEmpty())
779 QFileInfo fileInfo(fileName);
781 QString fileNameOnly = fileInfo.fileName();
782 if (!fileNameOnly.startsWith(xdgMenuPrefix))
783 fileNameOnly = xdgMenuPrefix + fileNameOnly;
786 fileInfo.path() +
'/' + fileNameOnly);
790 if (result.isEmpty())
800 VFolderMenu::locateDirectoryFile(
const QString &fileName)
802 if (fileName.isEmpty())
805 if (!QDir::isRelativePath(fileName))
826 VFolderMenu::initDirs()
838 VFolderMenu::loadMenu(
const QString &fileName)
842 if (!fileName.endsWith(QLatin1String(
".menu")))
845 pushDocInfo(fileName);
859 QDomElement e =
m_doc.documentElement();
867 if (domElem.tagName() ==
"And")
869 QDomNode n = domElem.firstChild();
873 QDomElement e = n.toElement();
876 processCondition(e, items);
882 while( !n.isNull() ) {
883 QDomElement e = n.toElement();
884 if (e.tagName() ==
"Not")
887 QDomNode n2 = e.firstChild();
888 while( !n2.isNull() ) {
889 QDomElement e2 = n2.toElement();
891 processCondition(e2, andItems);
892 excludeItems(items, andItems);
893 n2 = n2.nextSibling();
899 processCondition(e, andItems);
900 matchItems(items, andItems);
905 else if (domElem.tagName() ==
"Or")
907 QDomNode n = domElem.firstChild();
911 QDomElement e = n.toElement();
914 processCondition(e, items);
920 while( !n.isNull() ) {
921 QDomElement e = n.toElement();
924 processCondition(e, orItems);
925 includeItems(items, orItems);
930 else if (domElem.tagName() ==
"Not")
935 items.insert(s->menuId(), s);
940 QDomNode n = domElem.firstChild();
941 while( !n.isNull() ) {
942 QDomElement e = n.toElement();
945 processCondition(e, notItems);
946 excludeItems(items, notItems);
951 else if (domElem.tagName() ==
"Category")
956 items.insert(s->menuId(), s);
960 else if (domElem.tagName() ==
"All")
965 items.insert(s->menuId(), s);
969 else if (domElem.tagName() ==
"Filename")
971 const QString filename = domElem.text();
975 items.insert(filename, s);
980 VFolderMenu::loadApplications(
const QString &dir,
const QString &prefix)
982 kDebug(7021) <<
"Looking up applications under" << dir;
984 QDirIterator it(dir);
985 while (it.hasNext()) {
987 const QFileInfo fi = it.fileInfo();
988 const QString fn = fi.fileName();
990 if(fn == QLatin1String(
".") || fn == QLatin1String(
".."))
992 loadApplications(fi.filePath(), prefix + fn +
'-');
996 if (!fn.endsWith(QLatin1String(
".desktop")))
1000 addApplication(prefix + fn, service);
1006 VFolderMenu::processKDELegacyDirs()
1020 for(QStringList::ConstIterator it = relFiles.constBegin();
1021 it != relFiles.constEnd(); ++it)
1026 if (!name.endsWith(QLatin1String(
"/.directory")))
1029 name = name.left(name.length()-11);
1031 SubMenu *newMenu =
new SubMenu;
1038 if ((*it).endsWith(QLatin1String(
".desktop")))
1047 int i =
id.lastIndexOf(
'/');
1054 addApplication(
id, service);
1055 items.insert(service->menuId(), service);
1056 if (service->categories().isEmpty())
1062 markUsedApplications(items);
1069 kDebug(7021).nospace() <<
"processLegacyDir(" << dir <<
", " << relDir <<
", " << prefix <<
")";
1072 QDirIterator it(dir);
1073 while (it.hasNext()) {
1075 const QFileInfo fi = it.fileInfo();
1076 const QString fn = fi.fileName();
1078 if(fn == QLatin1String(
".") || fn == QLatin1String(
".."))
1088 processLegacyDir(fi.filePath(), relDir + fn +
'/', prefix);
1093 if (!fn.endsWith(QLatin1String(
".desktop")))
1098 const QString id = prefix + fn;
1101 addApplication(
id, service);
1102 items.insert(service->menuId(), service);
1104 if (service->categories().isEmpty())
1109 markUsedApplications(items);
1115 VFolderMenu::processMenu(QDomElement &docElem,
int pass)
1122 bool onlyUnallocated =
false;
1123 bool isDeleted =
false;
1124 bool kdeLegacyDirsDone =
false;
1125 QDomElement defaultLayoutNode;
1126 QDomElement layoutNode;
1129 QDomNode n = docElem.firstChild();
1130 while( !n.isNull() ) {
1131 QDomElement e = n.toElement();
1132 if (e.tagName() ==
"Name")
1136 else if (e.tagName() ==
"Directory")
1138 directoryFile = e.text();
1140 else if (e.tagName() ==
"DirectoryDir")
1142 QString dir = absoluteDir(e.text(), e.attribute(
"__BaseDir"));
1146 else if (e.tagName() ==
"OnlyUnallocated")
1148 onlyUnallocated =
true;
1150 else if (e.tagName() ==
"NotOnlyUnallocated")
1152 onlyUnallocated =
false;
1154 else if (e.tagName() ==
"Deleted")
1158 else if (e.tagName() ==
"NotDeleted")
1162 else if (e.tagName() ==
"DefaultLayout")
1164 defaultLayoutNode = e;
1166 else if (e.tagName() ==
"Layout")
1170 n = n.nextSibling();
1180 foreach (SubMenu *menu, parentMenu->subMenus)
1182 if (menu->name == name)
1201 if (directoryFile.isEmpty())
1203 kDebug(7021) <<
"Menu" << name <<
"does not specify a directory file.";
1207 QString tmp = locateDirectoryFile(directoryFile);
1208 if (! tmp.isEmpty())
1220 foreach (SubMenu *menu, parentMenu->subMenus)
1222 if (menu->name == name)
1239 QDomNode n = docElem.firstChild();
1240 while( !n.isNull() ) {
1241 QDomElement e = n.toElement();
1242 if (e.tagName() ==
"AppDir")
1245 QString dir = absoluteDir(e.text(), e.attribute(
"__BaseDir"));
1247 registerDirectory(dir);
1249 loadApplications(dir,
QString());
1251 else if (e.tagName() ==
"KDELegacyDirs")
1254 if (!kdeLegacyDirsDone)
1256 kDebug(7021) <<
"Processing KDE Legacy dirs for <KDE>";
1260 processKDELegacyDirs();
1265 kdeLegacyDirsDone =
true;
1268 else if (e.tagName() ==
"LegacyDir")
1271 QString dir = absoluteDir(e.text(), e.attribute(
"__BaseDir"));
1273 QString prefix = e.attributes().namedItem(
"prefix").toAttr().value();
1281 if (!kdeLegacyDirsDone)
1283 kDebug(7021) <<
"Processing KDE Legacy dirs for" << dir;
1287 processKDELegacyDirs();
1292 kdeLegacyDirsDone =
true;
1300 registerDirectory(dir);
1302 processLegacyDir(dir,
QString(), prefix);
1308 n = n.nextSibling();
1314 if (((pass == 1) && !onlyUnallocated) || ((pass == 2) && onlyUnallocated))
1316 n = docElem.firstChild();
1318 while( !n.isNull() ) {
1319 QDomElement e = n.toElement();
1320 if (e.tagName() ==
"Include")
1324 QDomNode n2 = e.firstChild();
1325 while( !n2.isNull() ) {
1326 QDomElement e2 = n2.toElement();
1328 processCondition(e2, items);
1333 markUsedApplications(items);
1338 n2 = n2.nextSibling();
1342 else if (e.tagName() ==
"Exclude")
1346 QDomNode n2 = e.firstChild();
1347 while( !n2.isNull() ) {
1348 QDomElement e2 = n2.toElement();
1350 processCondition(e2, items);
1357 n2 = n2.nextSibling();
1361 n = n.nextSibling();
1365 n = docElem.firstChild();
1366 while( !n.isNull() ) {
1367 QDomElement e = n.toElement();
1368 if (e.tagName() ==
"Menu")
1370 processMenu(e, pass);
1378 if (e.tagName() ==
"LegacyDir")
1381 QString dir = absoluteDir(e.text(), e.attribute(
"__BaseDir"));
1389 else if (e.tagName() ==
"KDELegacyDirs")
1400 n = n.nextSibling();
1405 n = docElem.firstChild();
1406 while( !n.isNull() ) {
1407 QDomElement e = n.toElement();
1408 if (e.tagName() ==
"Move")
1412 QDomNode n2 = e.firstChild();
1413 while( !n2.isNull() ) {
1414 QDomElement e2 = n2.toElement();
1415 if( e2.tagName() ==
"Old")
1417 if( e2.tagName() ==
"New")
1419 n2 = n2.nextSibling();
1421 kDebug(7021) <<
"Moving" << orig <<
"to" << dest;
1422 if (!orig.isEmpty() && !dest.isEmpty())
1431 n = n.nextSibling();
1449 if ( e.hasAttribute(
"show_empty" ) )
1451 QString str = e.attribute(
"show_empty" );
1454 else if ( str==
"false" )
1457 kDebug()<<
" Error in parsing show_empty attribute :"<<str;
1459 if ( e.hasAttribute(
"inline" ) )
1461 QString str = e.attribute(
"inline" );
1464 else if ( str==
"false" )
1467 kDebug()<<
" Error in parsing inline attribute :"<<str;
1469 if ( e.hasAttribute(
"inline_limit" ) )
1472 int value = e.attribute(
"inline_limit" ).toInt(&ok);
1474 option+=
QString(
"IL[%1] " ).arg( value );
1476 if ( e.hasAttribute(
"inline_header" ) )
1478 QString str = e.attribute(
"inline_header" );
1481 else if ( str ==
"false" )
1484 kDebug()<<
" Error in parsing of inline_header attribute :"<<str;
1487 if ( e.hasAttribute(
"inline_alias" ) && e.attribute(
"inline_alias" )==
"true")
1489 QString str = e.attribute(
"inline_alias" );
1492 else if ( str==
"false" )
1495 kDebug()<<
" Error in parsing inline_alias attribute :"<<str;
1497 if( !option.isEmpty())
1499 option = option.prepend(
":O");
1510 if( docElem.tagName()==
"DefaultLayout")
1512 if ( !optionDefaultLayout.isEmpty() )
1513 layout.append( optionDefaultLayout );
1515 bool mergeTagExists =
false;
1516 QDomNode n = docElem.firstChild();
1517 while( !n.isNull() ) {
1518 QDomElement e = n.toElement();
1519 if (e.tagName() ==
"Separator")
1521 layout.append(
":S");
1523 else if (e.tagName() ==
"Filename")
1525 layout.append(e.text());
1527 else if (e.tagName() ==
"Menuname")
1529 layout.append(
'/'+e.text());
1531 if( !option.isEmpty())
1532 layout.append( option );
1534 else if (e.tagName() ==
"Merge")
1536 QString type = e.attributeNode(
"type").value();
1537 if (type ==
"files")
1538 layout.append(
":F");
1539 else if (type ==
"menus")
1540 layout.append(
":M");
1541 else if (type ==
"all")
1542 layout.append(
":A");
1543 mergeTagExists =
true;
1546 n = n.nextSibling();
1549 if ( !mergeTagExists ) {
1550 layout.append(
":M");
1551 layout.append(
":F");
1552 kWarning() <<
"The menu spec file contains a Layout or DefaultLayout tag without the mandatory Merge tag inside. Please fix your file.";
1578 layoutMenu(subMenu, defaultLayout);
1597 for(QStringList::ConstIterator it=dirs.begin();
1598 it != dirs.end(); ++it)
1600 registerDirectory(*it);
1608 QDomElement docElem =
m_doc.documentElement();
1610 for (
int pass = 0; pass <= 2; pass++)
1615 processMenu(docElem, pass);
1621 buildApplicationIndex(
false);
1626 buildApplicationIndex(
true );
1631 defaultLayout <<
":M";
1632 defaultLayout <<
":F";
1644 processKDELegacyDirs();
1657 #include "vfolder_menu.moc"
virtual KService::Ptr createService(const QString &path)=0
QStringList findDirs(const char *type, const QString &reldir) const
static QString locate(const char *type, const QString &filename, const KComponentData &cData=KGlobal::mainComponent())
static QDebug kError(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
static QDebug kDebug(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
static bool exists(const QString &fullPath)
KSharedPtr< KService > Ptr
QString relativeLocation(const char *type, const QString &absPath)
virtual void addEntry(const KSycocaEntry::Ptr &newEntry)
Add a new entry.
QString kfsstnd_prefixes()
KAction * next(const QObject *recvr, const char *slot, QObject *parent)
Service factory for building ksycoca.
QStringList resourceDirs(const char *type) const
QString dir(const QString &fileClass)
QString findResource(const char *type, const QString &filename) const
static QDebug kWarning(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
QStringList findAllResources(const char *type, const QString &filter=QString(), SearchOptions options=NoSearchOptions) const
static QString realPath(const QString &dirname)