Author: vfr
Date: Sun Oct 30 22:34:12 2011
New Revision: 40103
URL: http://www.lyx.org/trac/changeset/40103
Log:
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).
Modified:
lyx-devel/trunk/src/frontends/qt4/GuiView.cpp
lyx-devel/trunk/src/frontends/qt4/GuiView.h
Modified: lyx-devel/trunk/src/frontends/qt4/GuiView.cpp
==============================================================================
--- lyx-devel/trunk/src/frontends/qt4/GuiView.cpp Sun Oct 30 21:07:46
2011 (r40102)
+++ lyx-devel/trunk/src/frontends/qt4/GuiView.cpp Sun Oct 30 22:34:12
2011 (r40103)
@@ -564,7 +564,7 @@
}
-void GuiView::processingThreadFinished(bool show_errors)
+void GuiView::processingThreadFinished()
{
QFutureWatcher<Buffer::ExportStatus> const * watcher =
static_cast<QFutureWatcher<Buffer::ExportStatus> const
*>(sender());
@@ -573,41 +573,30 @@
handleExportStatus(this, status, d.processing_format);
updateToolbars();
- if (show_errors) {
- BufferView const * const bv = currentBufferView();
- if (bv && !bv->buffer().errorList("Export").empty()) {
- errors("Export");
- return;
- }
- errors(d.last_export_format);
- }
-}
-
-
-void GuiView::processingThreadFinished()
-{
- processingThreadFinished(true);
+ BufferView const * const bv = currentBufferView();
+ if (bv && !bv->buffer().errorList("Export").empty()) {
+ errors("Export");
+ return;
+ }
+ errors(d.last_export_format);
}
void GuiView::autoSaveThreadFinished()
{
- processingThreadFinished(false);
+ QFutureWatcher<docstring> const * watcher =
+ static_cast<QFutureWatcher<docstring> const *>(sender());
+ message(watcher->result());
+ updateToolbars();
}
#else
-
void GuiView::processingThreadStarted()
{
}
-void GuiView::processingThreadFinished(bool)
-{
-}
-
-
void GuiView::processingThreadFinished()
{
}
Modified: lyx-devel/trunk/src/frontends/qt4/GuiView.h
==============================================================================
--- lyx-devel/trunk/src/frontends/qt4/GuiView.h Sun Oct 30 21:07:46 2011
(r40102)
+++ lyx-devel/trunk/src/frontends/qt4/GuiView.h Sun Oct 30 22:34:12 2011
(r40103)
@@ -229,7 +229,6 @@
/// For completion of autosave or export threads.
void processingThreadStarted();
- void processingThreadFinished(bool show_errors);
void processingThreadFinished();
void autoSaveThreadFinished();