start the timer in the correct thread

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37224 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Peter Kümmel 2011-01-15 22:39:46 +00:00
parent b5216b25f7
commit 726b602329
2 changed files with 13 additions and 3 deletions

View File

@ -58,6 +58,8 @@ GuiProgress::GuiProgress()
SLOT(doError(QString const &, QString const &)));
connect(this, SIGNAL(information(QString const &, QString const &)),
SLOT(doInformation(QString const &, QString const &)));
connect(this, SIGNAL(triggerFlush()),
SLOT(startFlushing()));
flushDelay_.setInterval(200);
flushDelay_.setSingleShot(true);
@ -101,12 +103,18 @@ void GuiProgress::doClearMessages()
}
void GuiProgress::lyxerrFlush()
void GuiProgress::startFlushing()
{
flushDelay_.start();
}
void GuiProgress::lyxerrFlush()
{
triggerFlush();
}
void GuiProgress::updateWithLyXErr()
{
appendLyXErrMessage(toqstr(lyxerr_stream_.str()));

View File

@ -57,6 +57,7 @@ Q_SIGNALS:
void clearMessageText();
void updateStatusBarMessage(QString const &);
void triggerFlush();
// Alert interface
void warning(QString const & title, QString const & message);
@ -76,7 +77,8 @@ private Q_SLOTS:
void doError(QString const &, QString const &);
void doInformation(QString const &, QString const &);
void updateWithLyXErr();
void updateWithLyXErr();
void startFlushing();
private: