]> git.lyx.org Git - features.git/commitdiff
Fix the messaging after an autosave
authorVincent van Ravesteijn <vfr@lyx.org>
Sun, 30 Oct 2011 21:34:12 +0000 (21:34 +0000)
committerVincent van Ravesteijn <vfr@lyx.org>
Sun, 30 Oct 2011 21:34:12 +0000 (21:34 +0000)
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

src/frontends/qt4/GuiView.cpp
src/frontends/qt4/GuiView.h

index e6fa28dc746d4900e98e48c03a26d92855772987..6c258f73ffd2281bcd96cc054cb272ab62dc278a 100644 (file)
@@ -564,7 +564,7 @@ void GuiView::processingThreadStarted()
 }
 
 
-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 @@ void GuiView::processingThreadFinished(bool show_errors)
        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()
 {
 }
index 40f8941950e1dc477a38eab6d88e29e1f005028b..bc7b9ecc1e59e19759a332a35097ff6d479d7ccc 100644 (file)
@@ -229,7 +229,6 @@ private Q_SLOTS:
 
        /// For completion of autosave or export threads.
        void processingThreadStarted();
-       void processingThreadFinished(bool show_errors);
        void processingThreadFinished();
        void autoSaveThreadFinished();