mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 11:36:02 +02:00
* QEventClose bugfix from Den.
git-svn-id: trunk@11509 -
This commit is contained in:
parent
bb25ce3e56
commit
3cee9c6d5f
@ -721,10 +721,16 @@ type
|
|||||||
procedure SignalSelectionChanged; cdecl;
|
procedure SignalSelectionChanged; cdecl;
|
||||||
procedure SignalCurrentPageChanged(p1, p2: Integer); cdecl;
|
procedure SignalCurrentPageChanged(p1, p2: Integer); cdecl;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses
|
uses
|
||||||
|
|
||||||
|
LCLMessageGlue,
|
||||||
qtCaret;
|
qtCaret;
|
||||||
|
|
||||||
|
|
||||||
const
|
const
|
||||||
AlignmentMap: array[TAlignment] of QtAlignment =
|
AlignmentMap: array[TAlignment] of QtAlignment =
|
||||||
@ -996,7 +1002,12 @@ begin
|
|||||||
case QEvent_type(Event) of
|
case QEvent_type(Event) of
|
||||||
QEventShow: SlotShow(True);
|
QEventShow: SlotShow(True);
|
||||||
QEventHide: SlotShow(False);
|
QEventHide: SlotShow(False);
|
||||||
QEventClose: SlotClose;
|
QEventClose:
|
||||||
|
begin
|
||||||
|
Result:=True;
|
||||||
|
QEvent_ignore(Event);
|
||||||
|
SlotClose;
|
||||||
|
end;
|
||||||
QEventDestroy: SlotDestroy;
|
QEventDestroy: SlotDestroy;
|
||||||
QEventFocusIn: SlotFocus(True);
|
QEventFocusIn: SlotFocus(True);
|
||||||
QEventFocusOut: SlotFocus(False);
|
QEventFocusOut: SlotFocus(False);
|
||||||
@ -1055,8 +1066,8 @@ end;
|
|||||||
Params: None
|
Params: None
|
||||||
Returns: Nothing
|
Returns: Nothing
|
||||||
|
|
||||||
Note: LCL uses LM_CLOSEQUERY to set the form visibility and if we don´t send this
|
Note: LCL uses LM_CLOSEQUERY to set the form visibility and if we don<EFBFBD>t send this
|
||||||
message, you won´t be able to show a form twice.
|
message, you won<EFBFBD>t be able to show a form twice.
|
||||||
------------------------------------------------------------------------------}
|
------------------------------------------------------------------------------}
|
||||||
procedure TQtWidget.SlotClose; cdecl;
|
procedure TQtWidget.SlotClose; cdecl;
|
||||||
var
|
var
|
||||||
@ -1066,11 +1077,7 @@ begin
|
|||||||
WriteLn('TQtWidget.SlotClose');
|
WriteLn('TQtWidget.SlotClose');
|
||||||
{$endif}
|
{$endif}
|
||||||
|
|
||||||
FillChar(Msg, SizeOf(Msg), #0);
|
LCLSendCloseQueryMsg(LCLObject);
|
||||||
|
|
||||||
Msg.Msg := LM_CLOSEQUERY;
|
|
||||||
|
|
||||||
DeliverMessage(Msg);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
@ -2370,6 +2377,12 @@ begin
|
|||||||
|
|
||||||
case QEvent_type(Event) of
|
case QEvent_type(Event) of
|
||||||
QEventWindowStateChange: SlotWindowStateChange;
|
QEventWindowStateChange: SlotWindowStateChange;
|
||||||
|
QEventClose :
|
||||||
|
begin
|
||||||
|
Result:=True;
|
||||||
|
QEvent_ignore(Event);
|
||||||
|
SlotClose;
|
||||||
|
end;
|
||||||
else
|
else
|
||||||
// Inherited Callbacks
|
// Inherited Callbacks
|
||||||
inherited EventFilter(Sender, Event);
|
inherited EventFilter(Sender, Event);
|
||||||
|
Loading…
Reference in New Issue
Block a user