]> git.lyx.org Git - features.git/commitdiff
Fix some eoln issues in progress view.
authorPavel Sanda <sanda@lyx.org>
Sun, 3 Jan 2010 16:54:23 +0000 (16:54 +0000)
committerPavel Sanda <sanda@lyx.org>
Sun, 3 Jan 2010 16:54:23 +0000 (16:54 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32755 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/GuiProgress.cpp
src/frontends/qt4/GuiProgressView.cpp

index bcec51b4f073a538a2e0db9950a3087b102ad633..333b34f873a0bc87827af2cf8e8de7e4d8cf57f4 100644 (file)
@@ -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();
 }
 
 
index cd6bac525558164cdcc6f9cea8d7c9f4af16754f..ebcee2720223603057342b947162e459e6cf92e0 100644 (file)
@@ -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();
 }