Move lyxerrFlush() out of singnal/slot business.

Under massive load of lyxerr<< messages we lose synchronization in ui
and messages get garbled into each other.

This patch helps a lot, note however that the problem is generally hard to
solve in multithreaded environment because from inside lyxerr there is no
way how to know that t1b should be bound to t1a when thread is switched in 
unfortunated time and thread thread2 goes for his bussiness.

thread1 out<<t1a<<t1b<<"\n";
thread2 out<<t2a<<t2b<<"\n";






git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33013 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Pavel Sanda 2010-01-13 19:07:18 +00:00
parent b9d5184979
commit d481f75848
2 changed files with 2 additions and 5 deletions

View File

@ -48,7 +48,6 @@ GuiProgress::GuiProgress(GuiView * view) : view_(view)
connect(this, SIGNAL(appendMessage(QString const &)), SLOT(doAppendMessage(QString const &)));
connect(this, SIGNAL(appendError(QString const &)), SLOT(doAppendError(QString const &)));
connect(this, SIGNAL(clearMessages()), SLOT(doClearMessages()));
connect(this, SIGNAL(lyxerrFlush()), SLOT(dolyxerrFlush()));
// Alert interface
connect(this, SIGNAL(warning(QString const &, QString const &)),
@ -96,7 +95,7 @@ void GuiProgress::doClearMessages()
}
void GuiProgress::dolyxerrFlush()
void GuiProgress::lyxerrFlush()
{
appendLyXErrMessage(toqstr(lyxerr_stream_.str()));
lyxerr_stream_.str("");

View File

@ -40,6 +40,7 @@ public:
void lyxerrConnect();
void lyxerrDisconnect();
void lyxerrFlush();
Q_SIGNALS:
void processStarted(QString const &);
@ -47,7 +48,6 @@ Q_SIGNALS:
void appendMessage(QString const &);
void appendError(QString const &);
void clearMessages();
void lyxerrFlush();
void appendLyXErrMessage(QString const & text);
// Alert interface
@ -62,8 +62,6 @@ private Q_SLOTS:
void doAppendMessage(QString const &);
void doAppendError(QString const &);
void doClearMessages();
void dolyxerrFlush();
void doWarning(QString const &, QString const &);
void doToggleWarning(QString const & title, QString const & msg, QString const & formatted);