Fix the messaging after an autosave

We need to have a special callback for when the autosave thread is finished
such that we can process the return values properly (and different as in
case of export or preview).

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40103 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Vincent van Ravesteijn 2011-10-30 21:34:12 +00:00
parent 256e16d0c2
commit e9df4d552c
2 changed files with 11 additions and 23 deletions

View File

@ -564,7 +564,7 @@ void GuiView::processingThreadStarted()
} }
void GuiView::processingThreadFinished(bool show_errors) void GuiView::processingThreadFinished()
{ {
QFutureWatcher<Buffer::ExportStatus> const * watcher = QFutureWatcher<Buffer::ExportStatus> const * watcher =
static_cast<QFutureWatcher<Buffer::ExportStatus> const *>(sender()); static_cast<QFutureWatcher<Buffer::ExportStatus> const *>(sender());
@ -573,41 +573,30 @@ void GuiView::processingThreadFinished(bool show_errors)
handleExportStatus(this, status, d.processing_format); handleExportStatus(this, status, d.processing_format);
updateToolbars(); updateToolbars();
if (show_errors) { BufferView const * const bv = currentBufferView();
BufferView const * const bv = currentBufferView(); if (bv && !bv->buffer().errorList("Export").empty()) {
if (bv && !bv->buffer().errorList("Export").empty()) { errors("Export");
errors("Export"); return;
return; }
} errors(d.last_export_format);
errors(d.last_export_format);
}
}
void GuiView::processingThreadFinished()
{
processingThreadFinished(true);
} }
void GuiView::autoSaveThreadFinished() void GuiView::autoSaveThreadFinished()
{ {
processingThreadFinished(false); QFutureWatcher<docstring> const * watcher =
static_cast<QFutureWatcher<docstring> const *>(sender());
message(watcher->result());
updateToolbars();
} }
#else #else
void GuiView::processingThreadStarted() void GuiView::processingThreadStarted()
{ {
} }
void GuiView::processingThreadFinished(bool)
{
}
void GuiView::processingThreadFinished() void GuiView::processingThreadFinished()
{ {
} }

View File

@ -229,7 +229,6 @@ private Q_SLOTS:
/// For completion of autosave or export threads. /// For completion of autosave or export threads.
void processingThreadStarted(); void processingThreadStarted();
void processingThreadFinished(bool show_errors);
void processingThreadFinished(); void processingThreadFinished();
void autoSaveThreadFinished(); void autoSaveThreadFinished();