]> git.lyx.org Git - lyx.git/commitdiff
Move lyxerrFlush() out of singnal/slot business.
authorPavel Sanda <sanda@lyx.org>
Wed, 13 Jan 2010 19:07:18 +0000 (19:07 +0000)
committerPavel Sanda <sanda@lyx.org>
Wed, 13 Jan 2010 19:07:18 +0000 (19:07 +0000)
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

src/frontends/qt4/GuiProgress.cpp
src/frontends/qt4/GuiProgress.h

index 333b34f873a0bc87827af2cf8e8de7e4d8cf57f4..0735265384532e891035c4346f3fecb3a128d498 100644 (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("");
index 4f5f5e7dd8fb9600dd053d317c8acb1d4424d125..09c891acd1e9601aa21a66681038b6a611f36109 100644 (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);