void GuiProgress::dolyxerrFlush()
{
- appendError(toqstr(lyxerr_stream_.str()));
+ 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
connect(progress, SIGNAL(processStarted(QString const &)), this, SLOT(appendText(QString const &)));
//connect(progress, SIGNAL(processFinished(QString const &)), this, SLOT(appendText(QString const &)));
connect(progress, SIGNAL(appendMessage(QString const &)), this, SLOT(appendText(QString const &)));
+ connect(progress, SIGNAL(appendLyXErrMessage(QString const &)), this, SLOT(appendLyXErrText(QString const &)));
connect(progress, SIGNAL(appendError(QString const &)), this, SLOT(appendText(QString const &)));
connect(progress, SIGNAL(clearMessages()), this, SLOT(clearText()));
progress->lyxerrConnect();
}
+void GuiProgressView::appendLyXErrText(QString const & text)
+{
+ widget_->outTE->insertPlainText(text);
+ widget_->outTE->ensureCursorVisible();
+}
+
+
void GuiProgressView::appendText(QString const & text)
{
if (text.isEmpty())
return;
- QString time = QTime::currentTime().toString();
- if (text.endsWith("\n"))
- widget_->outTE->insertPlainText(time + ": " + text);
- else
- widget_->outTE->insertPlainText(text);
+ QString str = QTime::currentTime().toString();
+ str += ": " + text;
+ if (!text.endsWith("\n"))
+ str += "\n";
+ widget_->outTE->insertPlainText(str);
widget_->outTE->ensureCursorVisible();
}