mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-20 20:19:27 +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;
|
APoint: TQtPoint;
|
||||||
Pt: TPoint;
|
Pt: TPoint;
|
||||||
begin
|
begin
|
||||||
Result := Handle <> 0;
|
Result := IsValidHandle(Handle);
|
||||||
if Result then
|
if Result then
|
||||||
begin
|
begin
|
||||||
APoint := QtPoint(P.X, P.Y);
|
APoint := QtPoint(P.X, P.Y);
|
||||||
@ -4895,7 +4895,7 @@ var
|
|||||||
APoint: TQtPoint;
|
APoint: TQtPoint;
|
||||||
begin
|
begin
|
||||||
Result := 0;
|
Result := 0;
|
||||||
if Handle <> 0 then
|
if IsValidHandle(Handle) then
|
||||||
begin
|
begin
|
||||||
APoint := QtPoint(P.X, P.Y);
|
APoint := QtPoint(P.X, P.Y);
|
||||||
QWidget_mapFromGlobal(TQtWidget(Handle).GetContainerWidget, @APoint, @APoint);
|
QWidget_mapFromGlobal(TQtWidget(Handle).GetContainerWidget, @APoint, @APoint);
|
||||||
|
Loading…
Reference in New Issue
Block a user