Merge pull request #1687 from KLayout/feature/issue-1678

Implemented solution for issue-1678
This commit is contained in:
Matthias Köfferlein 2024-04-17 22:38:39 +02:00 committed by GitHub
commit ede328d3cb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 2 deletions

View File

@ -23,6 +23,7 @@
#include "layHelpSource.h"
#include "layApplication.h"
#include "layVersion.h"
#include "tlLog.h"
#include "tlTimer.h"
@ -273,7 +274,9 @@ HelpSource::initialize_index ()
bool ok = false;
const QString help_index_cache_file = QString::fromUtf8 ("help-index.xml");
int qt = int (QT_VERSION >> 16);
QString help_index_cache_file = tl::to_qstring (tl::sprintf ("help-index-%s-qt%d.xml.gz", lay::Version::version (), qt));
std::string per_user_cache_file;
if (! lay::ApplicationBase::instance ()->appdata_path ().empty ()) {
per_user_cache_file = tl::to_string (QDir (tl::to_qstring (lay::ApplicationBase::instance ()->appdata_path ())).absoluteFilePath (help_index_cache_file));
@ -341,7 +344,7 @@ HelpSource::produce_index_file (const std::string &path)
try {
tl::OutputStream os (path, tl::OutputStream::OM_Plain);
tl::OutputStream os (path, tl::OutputStream::OM_Zlib);
help_index_structure.write (os, *this);
} catch (tl::Exception &ex) {