From b6ce1f8f61e07b9ce94ebea5ba07d345540e7456 Mon Sep 17 00:00:00 2001 From: zeljko Date: Sun, 30 Sep 2007 19:21:19 +0000 Subject: [PATCH] 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 - --- lcl/interfaces/qt/qtobject.inc | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/lcl/interfaces/qt/qtobject.inc b/lcl/interfaces/qt/qtobject.inc index 5fa53922e7..b1e0bec96d 100644 --- a/lcl/interfaces/qt/qtobject.inc +++ b/lcl/interfaces/qt/qtobject.inc @@ -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; {------------------------------------------------------------------------------