mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 20:59:08 +02:00
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:
parent
456ddd9f68
commit
b6ce1f8f61
@ -99,10 +99,24 @@ var
|
|||||||
begin
|
begin
|
||||||
App := QApplication_Create(@argc, argv);
|
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
|
// install global event filter
|
||||||
FHook := QObject_hook_create(App);
|
FHook := QObject_hook_create(App);
|
||||||
TEventFilterMethod(Method) := @EventFilter;
|
TEventFilterMethod(Method) := @EventFilter;
|
||||||
QObject_hook_hook_events(FHook, Method);
|
QObject_hook_hook_events(FHook, Method);
|
||||||
|
{$endif}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user