X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fqt4%2FGuiProgress.cpp;h=0735265384532e891035c4346f3fecb3a128d498;hb=425d092204118ea6c24c28e85fdf03fcf2bb51a4;hp=03f624e5141927711f96e046d984bfd598366b3a;hpb=ecb69bb6eb1387210320c25dcb65b8e72006c1fc;p=lyx.git diff --git a/src/frontends/qt4/GuiProgress.cpp b/src/frontends/qt4/GuiProgress.cpp index 03f624e514..0735265384 100644 --- a/src/frontends/qt4/GuiProgress.cpp +++ b/src/frontends/qt4/GuiProgress.cpp @@ -5,6 +5,7 @@ * 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. */ @@ -65,14 +66,14 @@ GuiProgress::GuiProgress(GuiView * view) : view_(view) 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"); } @@ -84,8 +85,7 @@ void GuiProgress::doAppendMessage(QString const & msg) void GuiProgress::doAppendError(QString const & msg) { - QString time = QTime::currentTime().toString(); - appendText(time + " : " + msg); + appendText(msg); } @@ -95,6 +95,31 @@ void GuiProgress::doClearMessages() } +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) { if (!text.isEmpty())