Commit 027fb62a authored by Luigi Toscano's avatar Luigi Toscano
Browse files

Fix: look for dirs doc/HTML in the resource path

Search for directories doc/HTML so that they can be used
to sanitize the prefix of the cache files.
This is a porting error: the same code in view.cpp was correctly
ported to use QStandardPaths::LocateDirectory.
parent bb3a1e55
...@@ -83,7 +83,7 @@ void TOC::build( const QString &file ) ...@@ -83,7 +83,7 @@ void TOC::build( const QString &file )
{ {
QFileInfo fileInfo( file ); QFileInfo fileInfo( file );
QString fileName = fileInfo.absoluteFilePath(); QString fileName = fileInfo.absoluteFilePath();
const QStringList resourceDirs = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, "doc/HTML"); const QStringList resourceDirs = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, "doc/HTML", QStandardPaths::LocateDirectory);
QStringList::ConstIterator it = resourceDirs.begin(); QStringList::ConstIterator it = resourceDirs.begin();
QStringList::ConstIterator end = resourceDirs.end(); QStringList::ConstIterator end = resourceDirs.end();
for ( ; it != end; ++it ) { for ( ; it != end; ++it ) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment