also build with older Qt versions

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32612 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Peter Kümmel 2009-12-22 10:42:34 +00:00
parent 1e7c296557
commit eb3fcca0e7

View File

@ -107,6 +107,7 @@
#define EXPORT_in_THREAD 1 #define EXPORT_in_THREAD 1
// QtConcurrent was introduced in Qt 4.4 // QtConcurrent was introduced in Qt 4.4
#if (QT_VERSION >= 0x040400) #if (QT_VERSION >= 0x040400)
#include <QFuture> #include <QFuture>
@ -270,6 +271,7 @@ struct GuiView::GuiViewPrivate
return tabWorkArea(0); return tabWorkArea(0);
} }
#if (QT_VERSION >= 0x040400)
void setPreviewFuture(QFuture<docstring> const & f) void setPreviewFuture(QFuture<docstring> const & f)
{ {
if (preview_watcher_.isRunning()) if (preview_watcher_.isRunning())
@ -278,6 +280,7 @@ struct GuiView::GuiViewPrivate
connect(&preview_watcher_, SIGNAL(finished()), gv_, connect(&preview_watcher_, SIGNAL(finished()), gv_,
SLOT(threadFinished())); SLOT(threadFinished()));
} }
#endif
public: public:
GuiView * gv_; GuiView * gv_;
@ -320,6 +323,9 @@ public:
/// ///
QFutureWatcher<docstring> autosave_watcher_; QFutureWatcher<docstring> autosave_watcher_;
QFutureWatcher<docstring> preview_watcher_; QFutureWatcher<docstring> preview_watcher_;
#else
struct DummyWatcher { bool isRunning(){return false;} };
DummyWatcher preview_watcher_;
#endif #endif
}; };