* Licence details can be found in the file COPYING.
*
* \author Peter Kümmel
+ * \author Pavel Sanda
*
* Full author contact details are available in file CREDITS.
*/
#include "qt_helpers.h"
+#include "support/debug.h"
#include "support/Systemcall.h"
#include <QApplication>
void GuiProgress::doProcessStarted(QString const & cmd)
{
QString time = QTime::currentTime().toString();
- appendText(time + ": <" + cmd + "> started\n");
+ appendText(time + ": <" + cmd + "> started");
}
void GuiProgress::doProcessFinished(QString const & cmd)
{
QString time = QTime::currentTime().toString();
- appendText(time + ": <" + cmd + "> done\n");
+ appendText(time + ": <" + cmd + "> done");
}
void GuiProgress::doAppendMessage(QString const & msg)
{
- QString time = QTime::currentTime().toString();
- appendText(time + " : " + msg);
+ appendText(msg);
}
void GuiProgress::doAppendError(QString const & msg)
{
- QString time = QTime::currentTime().toString();
- appendText(time + " : " + msg);
+ appendText(msg);
}
}
+void GuiProgress::lyxerrFlush()
+{
+ appendLyXErrMessage(toqstr(lyxerr_stream_.str()));
+ lyxerr_stream_.str("");
+}
+
+
+void GuiProgress::lyxerrConnect()
+{
+ lyxerr.setSecond(&lyxerr_stream_);
+}
+
+
+void GuiProgress::lyxerrDisconnect()
+{
+ lyxerr.setSecond(0);
+}
+
+
+GuiProgress::~GuiProgress()
+{
+ lyxerrDisconnect();
+}
+
+
void GuiProgress::appendText(QString const & text)
{
- view_->updateMessage(text);
+ if (!text.isEmpty())
+ view_->updateMessage(text);
}
} // namespace frontend
} // namespace lyx
-#include "moc_GuiProgress.cpp"
\ No newline at end of file
+#include "moc_GuiProgress.cpp"