tools/assistant/lib/qhelpenginecore.cpp
branchRCL_3
changeset 5 d3bac044e0f0
parent 4 3b1da2848fc7
equal deleted inserted replaced
4:3b1da2848fc7 5:d3bac044e0f0
   166     filter is defined by a name and set of filter attributes and can be
   166     filter is defined by a name and set of filter attributes and can be
   167     added to the help engine by calling addCustomFilter(). Analogous,
   167     added to the help engine by calling addCustomFilter(). Analogous,
   168     it is removed by calling removeCustomFilter(). customFilters() returns
   168     it is removed by calling removeCustomFilter(). customFilters() returns
   169     all defined filters.
   169     all defined filters.
   170 
   170 
   171     The help engine also offers the possiblity to set and read values
   171     The help engine also offers the possibility to set and read values
   172     in a persistant way comparable to ini files or Windows registry
   172     in a persistant way comparable to ini files or Windows registry
   173     entries. For more information see setValue() or value().
   173     entries. For more information see setValue() or value().
   174 
   174 
   175     This class does not offer any GUI components or functionality for
   175     This class does not offer any GUI components or functionality for
   176     indices or contents. If you need one of those use QHelpEngine
   176     indices or contents. If you need one of those use QHelpEngine
   360 QString QHelpEngineCore::documentationFileName(const QString &namespaceName)
   360 QString QHelpEngineCore::documentationFileName(const QString &namespaceName)
   361 {
   361 {
   362     if (d->setup()) {
   362     if (d->setup()) {
   363         const QHelpCollectionHandler::DocInfoList docList =
   363         const QHelpCollectionHandler::DocInfoList docList =
   364             d->collectionHandler->registeredDocumentations();
   364             d->collectionHandler->registeredDocumentations();
   365         foreach(const QHelpCollectionHandler::DocInfo info, docList) {
   365         foreach(const QHelpCollectionHandler::DocInfo &info, docList) {
   366             if (info.namespaceName == namespaceName) {
   366             if (info.namespaceName == namespaceName) {
   367                 if (QDir::isAbsolutePath(info.fileName))
   367                 if (QDir::isAbsolutePath(info.fileName))
   368                     return QDir::cleanPath(info.fileName);
   368                     return QDir::cleanPath(info.fileName);
   369 
   369 
   370                 QFileInfo fi(d->collectionHandler->collectionFile());
   370                 QFileInfo fi(d->collectionHandler->collectionFile());
   384 {
   384 {
   385     QStringList list;
   385     QStringList list;
   386     if (!d->setup())
   386     if (!d->setup())
   387         return list;
   387         return list;
   388     const QHelpCollectionHandler::DocInfoList docList = d->collectionHandler->registeredDocumentations();
   388     const QHelpCollectionHandler::DocInfoList docList = d->collectionHandler->registeredDocumentations();
   389     foreach(const QHelpCollectionHandler::DocInfo info, docList) {
   389     foreach(const QHelpCollectionHandler::DocInfo &info, docList) {
   390         list.append(info.namespaceName);
   390         list.append(info.namespaceName);
   391     }
   391     }
   392     return list;
   392     return list;
   393 }
   393 }
   394 
   394 
   529     QUrl url;
   529     QUrl url;
   530     url.setScheme(QLatin1String("qthelp"));
   530     url.setScheme(QLatin1String("qthelp"));
   531     url.setAuthority(namespaceName);
   531     url.setAuthority(namespaceName);
   532 
   532 
   533     const QStringList files = reader->files(filterAttributes, extensionFilter);
   533     const QStringList files = reader->files(filterAttributes, extensionFilter);
   534     foreach (const QString file, files) {
   534     foreach (const QString &file, files) {
   535         url.setPath(QLatin1String("/") + file);
   535         url.setPath(QLatin1String("/") + file);
   536         res.append(url);
   536         res.append(url);
   537     }
   537     }
   538     return res;
   538     return res;
   539 }
   539 }