From 1c9a6f8b49be538170e27fa6eb0b0c4ad5b0aafa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Uwe=20St=C3=B6hr?= Date: Mon, 22 Feb 2010 20:31:13 +0000 Subject: [PATCH] GuiView.cpp: fix compilation after r33533 git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33540 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/GuiView.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/frontends/qt4/GuiView.cpp b/src/frontends/qt4/GuiView.cpp index 292d23f2a7..aaba193d7c 100644 --- a/src/frontends/qt4/GuiView.cpp +++ b/src/frontends/qt4/GuiView.cpp @@ -100,6 +100,7 @@ #include #include #include +#include #include #include #include @@ -108,6 +109,14 @@ #define EXPORT_in_THREAD 1 +struct Sleep : QThread +{ + static void millisec(unsigned long ms) + { + QThread::usleep(ms * 1000); + } +}; + // QtConcurrent was introduced in Qt 4.4 #if (QT_VERSION >= 0x040400) @@ -2606,7 +2615,7 @@ void GuiView::dispatchVC(FuncRequest const & cmd) CompareOptions options; Compare * compare = new Compare(loadIfNeeded(FileName(f1)), loadIfNeeded(FileName(f2)), dest, options); compare->start(QThread::LowPriority); - sleep(2); + Sleep::millisec(200); lyx::dispatch(FuncRequest(LFUN_BUFFER_SWITCH, dest->absFileName())); break; }