mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-26 19:25:39 +00:00
Use event loop for Qt >= 3.1
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9936 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
a3e1fa6bfa
commit
e276c08990
@ -1,3 +1,8 @@
|
|||||||
|
2005-05-11 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
|
||||||
|
|
||||||
|
* lyx_gui.C (sync_events):
|
||||||
|
* QMathDialog.C (resizeEvent): use event loop for qt >= 3.1
|
||||||
|
|
||||||
2005-05-11 Martin Vermeer <martin.vermeer@hut.fi>
|
2005-05-11 Martin Vermeer <martin.vermeer@hut.fi>
|
||||||
|
|
||||||
* lyx_gui.C (sync_events):
|
* lyx_gui.C (sync_events):
|
||||||
|
@ -20,6 +20,9 @@
|
|||||||
|
|
||||||
#include <qwidgetstack.h>
|
#include <qwidgetstack.h>
|
||||||
#include <qcombobox.h>
|
#include <qcombobox.h>
|
||||||
|
#if QT_VERSION >= 0x030100
|
||||||
|
#include <qeventloop.h>
|
||||||
|
#endif
|
||||||
#include <qpushbutton.h>
|
#include <qpushbutton.h>
|
||||||
#include <qlistbox.h>
|
#include <qlistbox.h>
|
||||||
#include <qpopupmenu.h>
|
#include <qpopupmenu.h>
|
||||||
@ -53,6 +56,9 @@ protected:
|
|||||||
|
|
||||||
w_->resize(viewport()->width(), w_->height());
|
w_->resize(viewport()->width(), w_->height());
|
||||||
// force the resize to get accurate scrollbar
|
// force the resize to get accurate scrollbar
|
||||||
|
#if QT_VERSION >= 0x030100
|
||||||
|
qApp->eventLoop()->processEvents(QEventLoop::ExcludeUserInput);
|
||||||
|
#endif
|
||||||
resizeContents(w_->width(), w_->height());
|
resizeContents(w_->width(), w_->height());
|
||||||
}
|
}
|
||||||
private:
|
private:
|
||||||
|
@ -51,6 +51,9 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <qapplication.h>
|
#include <qapplication.h>
|
||||||
|
#if QT_VERSION >= 0x030100
|
||||||
|
#include <qeventloop.h>
|
||||||
|
#endif
|
||||||
#include <qpaintdevicemetrics.h>
|
#include <qpaintdevicemetrics.h>
|
||||||
#include <qtranslator.h>
|
#include <qtranslator.h>
|
||||||
#include <qtextcodec.h>
|
#include <qtextcodec.h>
|
||||||
@ -256,7 +259,9 @@ void sync_events()
|
|||||||
// During screen update/ redraw, this method is disabled to
|
// During screen update/ redraw, this method is disabled to
|
||||||
// prevent keyboard events being handed to the LyX core, where
|
// prevent keyboard events being handed to the LyX core, where
|
||||||
// they could cause re-entrant calls to screen update.
|
// they could cause re-entrant calls to screen update.
|
||||||
qApp->processEvents();
|
#if QT_VERSION >= 0x030100
|
||||||
|
qApp->eventLoop()->processEvents(QEventLoop::ExcludeUserInput);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user