mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-02 12:20:38 +02:00
Qt: use IsValidHandle() to check handle in ClientToScreen() and ScreenToClient()
git-svn-id: trunk@31588 -
This commit is contained in:
parent
fd126a05a7
commit
156bee63ed
@ -156,7 +156,7 @@ var
|
||||
APoint: TQtPoint;
|
||||
Pt: TPoint;
|
||||
begin
|
||||
Result := Handle <> 0;
|
||||
Result := IsValidHandle(Handle);
|
||||
if Result then
|
||||
begin
|
||||
APoint := QtPoint(P.X, P.Y);
|
||||
@ -4895,7 +4895,7 @@ var
|
||||
APoint: TQtPoint;
|
||||
begin
|
||||
Result := 0;
|
||||
if Handle <> 0 then
|
||||
if IsValidHandle(Handle) then
|
||||
begin
|
||||
APoint := QtPoint(P.X, P.Y);
|
||||
QWidget_mapFromGlobal(TQtWidget(Handle).GetContainerWidget, @APoint, @APoint);
|
||||
|
Loading…
Reference in New Issue
Block a user