Qt/Documentation: Avoid automatic loading of unrelated help files

On Linux/KDE systems, the KDE documentation files can be installed in the
Qt documentation directory. This leads to a great of documentation files
to be loaded by default, which we try to avoid for performance reasons.
Restrict the pattern for .qch files to start with a 'q', which still
matches the Qt documentation files. If the user wants the documentation
of KDE libraries, they can register them manually.

Change-Id: Ib658c3b2c26a97ca69a8c0e46a5057a58b5a7ec7
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
Eike Ziller
2024-03-01 12:22:58 +01:00
parent 262dcc6643
commit 6a59cb891b

View File

@@ -506,7 +506,7 @@ static QList<std::pair<Path, FileName>> documentationFiles(QtVersion *v)
{v->docsPath().toString() + QChar('/'), v->docsPath().toString() + "/qch/"});
for (const QString &docPath : docPaths) {
const QDir versionHelpDir(docPath);
for (const QString &helpFile : versionHelpDir.entryList(QStringList("*.qch"), QDir::Files))
for (const QString &helpFile : versionHelpDir.entryList(QStringList("q*.qch"), QDir::Files))
files.append({docPath, helpFile});
}
return files;