We can't rely on allow_async to tell us whether to put_in_tmpdir.
This commit is contained in:
Richard Kimberly Heck 2021-01-03 22:56:05 -05:00
parent 4cee3478f7
commit d4757eace0

View File

@ -491,7 +491,7 @@ public:
Buffer::ExportStatus (*asyncFunc)(Buffer const *, Buffer *, string const &), Buffer::ExportStatus (*asyncFunc)(Buffer const *, Buffer *, string const &),
Buffer::ExportStatus (Buffer::*syncFunc)(string const &, bool) const, Buffer::ExportStatus (Buffer::*syncFunc)(string const &, bool) const,
Buffer::ExportStatus (Buffer::*previewFunc)(string const &) const, Buffer::ExportStatus (Buffer::*previewFunc)(string const &) const,
bool allow_async); bool allow_async, bool use_tmpdir = false);
QVector<GuiWorkArea*> guiWorkAreas(); QVector<GuiWorkArea*> guiWorkAreas();
@ -3845,14 +3845,13 @@ Buffer::ExportStatus GuiView::GuiViewPrivate::previewAndDestroy(
} }
bool GuiView::GuiViewPrivate::asyncBufferProcessing( bool GuiView::GuiViewPrivate::asyncBufferProcessing(string const & argument,
string const & argument,
Buffer const * used_buffer, Buffer const * used_buffer,
docstring const & msg, docstring const & msg,
Buffer::ExportStatus (*asyncFunc)(Buffer const *, Buffer *, string const &), Buffer::ExportStatus (*asyncFunc)(Buffer const *, Buffer *, string const &),
Buffer::ExportStatus (Buffer::*syncFunc)(string const &, bool) const, Buffer::ExportStatus (Buffer::*syncFunc)(string const &, bool) const,
Buffer::ExportStatus (Buffer::*previewFunc)(string const &) const, Buffer::ExportStatus (Buffer::*previewFunc)(string const &) const,
bool allow_async) bool allow_async, bool use_tmpdir)
{ {
if (!used_buffer) if (!used_buffer)
return false; return false;
@ -3888,7 +3887,7 @@ bool GuiView::GuiViewPrivate::asyncBufferProcessing(
} else { } else {
Buffer::ExportStatus status; Buffer::ExportStatus status;
if (syncFunc) { if (syncFunc) {
status = (used_buffer->*syncFunc)(format, false); status = (used_buffer->*syncFunc)(format, use_tmpdir);
} else if (previewFunc) { } else if (previewFunc) {
status = (used_buffer->*previewFunc)(format); status = (used_buffer->*previewFunc)(format);
} else } else
@ -4045,7 +4044,7 @@ void GuiView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
_("Exporting ..."), _("Exporting ..."),
&GuiViewPrivate::compileAndDestroy, &GuiViewPrivate::compileAndDestroy,
&Buffer::doExport, &Buffer::doExport,
nullptr, cmd.allowAsync()); nullptr, cmd.allowAsync(), true);
break; break;
} }
case LFUN_BUFFER_VIEW: { case LFUN_BUFFER_VIEW: {
@ -4063,7 +4062,7 @@ void GuiView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
docstring(), docstring(),
&GuiViewPrivate::compileAndDestroy, &GuiViewPrivate::compileAndDestroy,
&Buffer::doExport, &Buffer::doExport,
nullptr, cmd.allowAsync()); nullptr, cmd.allowAsync(), true);
break; break;
} }
case LFUN_MASTER_BUFFER_VIEW: { case LFUN_MASTER_BUFFER_VIEW: {