mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-24 05:40:59 +00:00
LyXErr and statusbar messages hsould have different routes.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32754 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
930088a07d
commit
1cbab9937b
@ -98,7 +98,7 @@ void GuiProgress::doClearMessages()
|
||||
|
||||
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
|
||||
|
@ -48,6 +48,7 @@ Q_SIGNALS:
|
||||
void appendError(QString const &);
|
||||
void clearMessages();
|
||||
void lyxerrFlush();
|
||||
void appendLyXErrMessage(QString const & text);
|
||||
|
||||
// Alert interface
|
||||
void warning(QString const & title, QString const & message);
|
||||
|
@ -84,6 +84,7 @@ GuiProgressView::GuiProgressView(GuiView & parent, Qt::DockWidgetArea area,
|
||||
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();
|
||||
@ -116,16 +117,23 @@ void GuiProgressView::clearText()
|
||||
}
|
||||
|
||||
|
||||
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();
|
||||
}
|
||||
|
||||
|
@ -70,6 +70,7 @@ public:
|
||||
|
||||
private Q_SLOTS:
|
||||
void appendText(QString const & text);
|
||||
void appendLyXErrText(QString const & text);
|
||||
void clearText();
|
||||
|
||||
void levelChanged();
|
||||
|
Loading…
Reference in New Issue
Block a user