Qt: 1.Fixed crash on linux & macosx introduced by installing global EventFilter hook. Check win32 and delete at all this hook if not needed. Tabs works without it.

2.Workaround for crazy menus problem, added define QT_NO_MENU_EFFECTS , so if U don't need fancy menus it is highly recommended to compile qt interface with this define on - this could be a Qt bug also.

git-svn-id: trunk@12257 -
This commit is contained in:
zeljko 2007-09-30 19:21:19 +00:00
parent 456ddd9f68
commit b6ce1f8f61

View File

@ -98,11 +98,25 @@ var
FHook: QObject_hookH;
begin
App := QApplication_Create(@argc, argv);
{no more crazy menus if we disable fading & animating
my proposal is to remove this ifdef and disable
effects by default, or set IFNDEF QT_USE_MENU_EFFECTS }
{$IFDEF QT_NO_MENU_EFFECTS}
QApplication_setEffectEnabled(QtUI_AnimateMenu, False);
QApplication_setEffectEnabled(QtUI_FadeMenu, False);
{$ENDIF}
{This hook crashes linux & darwin ocasionally !
todo: check what happens with win32
and possibly remove this hook at all.
Tabs works under linux & darwin without this hook}
{$ifdef windows}
// install global event filter
FHook := QObject_hook_create(App);
TEventFilterMethod(Method) := @EventFilter;
QObject_hook_hook_events(FHook, Method);
{$endif}
end;
{------------------------------------------------------------------------------