mirror of https://github.com/KLayout/klayout.git
Implemented solution for issue-1678
* Help index file name encodes KLayout version and Qt version * Help index file is gzip compressed to save space as many files are expected to accumulate now
This commit is contained in:
parent
030ee37f64
commit
1e83df0a56
|
|
@ -23,6 +23,7 @@
|
|||
|
||||
#include "layHelpSource.h"
|
||||
#include "layApplication.h"
|
||||
#include "layVersion.h"
|
||||
|
||||
#include "tlLog.h"
|
||||
#include "tlTimer.h"
|
||||
|
|
@ -273,7 +274,8 @@ HelpSource::initialize_index ()
|
|||
|
||||
bool ok = false;
|
||||
|
||||
const QString help_index_cache_file = QString::fromUtf8 ("help-index.xml");
|
||||
QString help_index_cache_file = QString::fromUtf8 (tl::sprintf ("help-index-%s-qt%d.xml.gz", lay::Version::version (), int (QT_VERSION_MAJOR)));
|
||||
|
||||
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 +343,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) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue