]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiProgress.cpp
Fix handling of the add branch textfield in GuiBranches
[lyx.git] / src / frontends / qt4 / GuiProgress.cpp
index 28367deddbf1cec580d7a0bde444a6e7a1c180e1..ab8c6bd3cfb470284913784acc148ac2ebc765a5 100644 (file)
@@ -17,6 +17,8 @@
 
 #include "qt_helpers.h"
 
+#include "frontends/alert.h"
+
 #include "support/debug.h"
 #include "support/Systemcall.h"
 
@@ -58,6 +60,8 @@ GuiProgress::GuiProgress()
                SLOT(doError(QString const &, QString const &)));
        connect(this, SIGNAL(information(QString const &, QString const &)),
                SLOT(doInformation(QString const &, QString const &)));
+       connect(this, SIGNAL(triggerFlush()),
+               SLOT(startFlushing()));
 
        flushDelay_.setInterval(200);
        flushDelay_.setSingleShot(true);
@@ -65,9 +69,17 @@ GuiProgress::GuiProgress()
 }
 
 
+int GuiProgress::prompt(docstring const & title, docstring const & question,
+                       int default_button, int cancel_button,
+                       docstring const & b1, docstring const & b2)
+{
+       return Alert::prompt(title, question, default_button, cancel_button, b1, b2);
+}
+
+
 QString GuiProgress::currentTime()
 {
-       return QTime::currentTime().toString("hh:mm:ss:zzz") + "ms";
+       return QTime::currentTime().toString("hh:mm:ss.zzz");
 }
 
 
@@ -101,12 +113,18 @@ void GuiProgress::doClearMessages()
 }
 
 
-void GuiProgress::lyxerrFlush()
+void GuiProgress::startFlushing()
 {
        flushDelay_.start();
 }
 
 
+void GuiProgress::lyxerrFlush()
+{
+       triggerFlush();
+}
+
+
 void GuiProgress::updateWithLyXErr()
 {
        appendLyXErrMessage(toqstr(lyxerr_stream_.str()));
@@ -116,13 +134,13 @@ void GuiProgress::updateWithLyXErr()
 
 void GuiProgress::lyxerrConnect()
 {
-       lyxerr.setSecond(&lyxerr_stream_);
+       lyxerr.setSecondStream(&lyxerr_stream_);
 }
 
 
 void GuiProgress::lyxerrDisconnect()
 {
-       lyxerr.setSecond(0);
+       lyxerr.setSecondStream(0);
 }