mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-18 21:45:24 +00:00
branch: Fix part 2 of bug #5758: Crash when closing the dosbox from which LyX was started.
A problem occurs when we write the ConverterCache index file. This action is instantiated in the destructor of the 'static ConverterCache' object. The use of QFileInfo at that point leads to a crash. It is maybe not a good idea at all to put part of the functionality in a destructor, especially not when we do not delete the object ourselves and when this functionality uses external libraries etc. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@29608 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
a6b4e213b6
commit
a2316bd480
@ -218,7 +218,6 @@ ConverterCache::~ConverterCache()
|
||||
{
|
||||
if (!lyxrc.use_converter_cache)
|
||||
return;
|
||||
pimpl_->writeIndex();
|
||||
delete pimpl_;
|
||||
}
|
||||
|
||||
@ -248,6 +247,12 @@ void ConverterCache::init()
|
||||
}
|
||||
|
||||
|
||||
void ConverterCache::writeIndex() const
|
||||
{
|
||||
pimpl_->writeIndex();
|
||||
}
|
||||
|
||||
|
||||
void ConverterCache::add(FileName const & orig_from, string const & to_format,
|
||||
FileName const & converted_file) const
|
||||
{
|
||||
|
@ -55,6 +55,9 @@ public:
|
||||
/// Init the cache. This must be done after package initialization.
|
||||
static void init();
|
||||
|
||||
/// Writes the index list. This must be called on exit.
|
||||
void writeIndex() const;
|
||||
|
||||
/**
|
||||
* Add \c converted_file (\c orig_from converted to \c to_format) to
|
||||
* the cache if it is not already in or not up to date.
|
||||
|
@ -354,6 +354,9 @@ void LyX::prepareExit()
|
||||
cap::clearCutStack();
|
||||
cap::clearSelection();
|
||||
|
||||
// Write the index file of the converter cache
|
||||
ConverterCache::get().writeIndex();
|
||||
|
||||
// close buffers first
|
||||
pimpl_->buffer_list_.closeAll();
|
||||
|
||||
|
@ -190,6 +190,9 @@ What's new
|
||||
- Fix crash when closing a child after it has been unincluded from its
|
||||
master (bug 5859).
|
||||
|
||||
- Fix crash when the dos-box is closed from which LyX was started
|
||||
(bug 5758).
|
||||
|
||||
- Fix crash when passing a nonexisting file to the lyx function
|
||||
server-goto-file-row.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user