From: Pavel Sanda Date: Sun, 3 Jan 2010 16:54:23 +0000 (+0000) Subject: Fix some eoln issues in progress view. X-Git-Tag: 2.0.0~4599 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=f8a778b9dab9b26c43ad493e9e47dddc6f05ac03;p=features.git Fix some eoln issues in progress view. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32755 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/frontends/qt4/GuiProgress.cpp b/src/frontends/qt4/GuiProgress.cpp index bcec51b4f0..333b34f873 100644 --- a/src/frontends/qt4/GuiProgress.cpp +++ b/src/frontends/qt4/GuiProgress.cpp @@ -67,20 +67,20 @@ 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"); } void GuiProgress::doAppendMessage(QString const & msg) { - appendText(msg + "\n"); + appendText(msg); } @@ -100,9 +100,6 @@ void GuiProgress::dolyxerrFlush() { appendLyXErrMessage(toqstr(lyxerr_stream_.str())); lyxerr_stream_.str(""); - // give the user a chance to disable debug messages because - // showing Debug::ANY messages completely blocks the GUI - QApplication::processEvents(); } diff --git a/src/frontends/qt4/GuiProgressView.cpp b/src/frontends/qt4/GuiProgressView.cpp index cd6bac5255..ebcee27202 100644 --- a/src/frontends/qt4/GuiProgressView.cpp +++ b/src/frontends/qt4/GuiProgressView.cpp @@ -121,6 +121,13 @@ void GuiProgressView::appendLyXErrText(QString const & text) { widget_->outTE->insertPlainText(text); widget_->outTE->ensureCursorVisible(); + + // Give the user a chance to disable debug messages because + // showing Debug::ANY messages completely blocks the GUI. + // Text is not always send as the whole line, so we must be + // careful about eolns. + if (text.endsWith("\n")) + QApplication::processEvents(); }