mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-15 12:19:13 +02:00
Merged revision(s) 48840 #990754d7c0, 48842 #aac691fd52 from trunk:
Qt: do not report stalled focus changes if widget is invisible. issue #27960 ........ Qt: cleanup unused local variables, removed one warning. issue #27951 ........ git-svn-id: branches/fixes_1_4@48861 -
This commit is contained in:
parent
3ee89bd2da
commit
9cf3760120
@ -392,7 +392,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
if not (Obj is TQtWidget) then
|
if not (Obj is TQtWidget) then
|
||||||
raise Exception.Create('QtObjectFromWidgetH: QObject_property returned '
|
raise Exception.Create('QtObjectFromWidgetH: QObject_property returned '
|
||||||
+ 'a variant which is not TQtWidget but ' + dbgsName(Obj));
|
+ 'a variant which is not TQtWidget ' + dbgHex(PtrUInt(Obj)));
|
||||||
QtWg := TQtWidget(Obj);
|
QtWg := TQtWidget(Obj);
|
||||||
//Write('Converted successfully, Control=');
|
//Write('Converted successfully, Control=');
|
||||||
if QtWg<>nil then
|
if QtWg<>nil then
|
||||||
|
@ -1005,8 +1005,14 @@ begin
|
|||||||
{$IF DEFINED(VerboseFocus) OR DEFINED(DebugQtFocus)}
|
{$IF DEFINED(VerboseFocus) OR DEFINED(DebugQtFocus)}
|
||||||
WriteLn('> ** TQtWidgetSet.FocusChanged: old: ', dbgHex(PtrUInt(aold)), ' new: ', dbgHex(PtrUInt(anew)));
|
WriteLn('> ** TQtWidgetSet.FocusChanged: old: ', dbgHex(PtrUInt(aold)), ' new: ', dbgHex(PtrUInt(anew)));
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
OldWidget := GetFirstQtObjectFromWidgetH(aold);
|
if (AOld <> nil) and not QWidget_isVisible(AOld) then
|
||||||
NewWidget := GetFirstQtObjectFromWidgetH(anew);
|
OldWidget := nil
|
||||||
|
else
|
||||||
|
OldWidget := GetFirstQtObjectFromWidgetH(aold);
|
||||||
|
if (ANew <> nil) and not QWidget_isVisible(ANew) then
|
||||||
|
NewWidget := nil
|
||||||
|
else
|
||||||
|
NewWidget := GetFirstQtObjectFromWidgetH(anew);
|
||||||
|
|
||||||
if OldWidget = NewWidget then
|
if OldWidget = NewWidget then
|
||||||
begin
|
begin
|
||||||
|
@ -307,9 +307,8 @@ class procedure TQtWSCustomTabControl.MovePage(const ATabControl: TCustomTabCont
|
|||||||
var
|
var
|
||||||
TabWidget: TQtTabWidget;
|
TabWidget: TQtTabWidget;
|
||||||
Index: Integer;
|
Index: Integer;
|
||||||
Page: TQtPage;
|
|
||||||
begin
|
begin
|
||||||
Page := TQtPage(AChild.Handle);
|
AChild.HandleNeeded; {create handle if it does not exist yet}
|
||||||
TabWidget := TQtTabWidget(ATabControl.Handle);
|
TabWidget := TQtTabWidget(ATabControl.Handle);
|
||||||
Index := AChild.PageIndex;
|
Index := AChild.PageIndex;
|
||||||
if Index < 0 then
|
if Index < 0 then
|
||||||
|
@ -176,7 +176,9 @@ var
|
|||||||
R: TRect;
|
R: TRect;
|
||||||
P: TQtPoint;
|
P: TQtPoint;
|
||||||
AHint: WideString;
|
AHint: WideString;
|
||||||
|
{$IFDEF HASX11}
|
||||||
PaintData: TSysTrayIconPaintData;
|
PaintData: TSysTrayIconPaintData;
|
||||||
|
{$ENDIF}
|
||||||
begin
|
begin
|
||||||
Result := False;
|
Result := False;
|
||||||
if Sender <> FSysTrayWidget then
|
if Sender <> FSysTrayWidget then
|
||||||
|
@ -3965,7 +3965,10 @@ end;
|
|||||||
procedure TQtWidget.SlotMove(Event: QEventH); cdecl;
|
procedure TQtWidget.SlotMove(Event: QEventH); cdecl;
|
||||||
var
|
var
|
||||||
Msg: TLMMove;
|
Msg: TLMMove;
|
||||||
APos, ACurrPos: TQtPoint;
|
APos: TQtPoint;
|
||||||
|
{$IFDEF HASX11}
|
||||||
|
ACurrPos: TQtPoint;
|
||||||
|
{$ENDIF}
|
||||||
FrameRect, WindowRect: TRect;
|
FrameRect, WindowRect: TRect;
|
||||||
begin
|
begin
|
||||||
{$ifdef VerboseQt}
|
{$ifdef VerboseQt}
|
||||||
@ -8711,6 +8714,7 @@ begin
|
|||||||
{$endif}
|
{$endif}
|
||||||
if SliderPressed and not InUpdate then
|
if SliderPressed and not InUpdate then
|
||||||
begin
|
begin
|
||||||
|
Msg.Msg := 0; // shutup compiler
|
||||||
FillChar(Msg, SizeOf(Msg), #0);
|
FillChar(Msg, SizeOf(Msg), #0);
|
||||||
Msg.Msg := LM_CHANGED;
|
Msg.Msg := LM_CHANGED;
|
||||||
DeliverMessage(Msg);
|
DeliverMessage(Msg);
|
||||||
@ -11593,7 +11597,6 @@ var
|
|||||||
v: QVariantH;
|
v: QVariantH;
|
||||||
WStr: WideString;
|
WStr: WideString;
|
||||||
DataStr: WideString;
|
DataStr: WideString;
|
||||||
ASelected: Boolean;
|
|
||||||
ImgList: TCustomImageList;
|
ImgList: TCustomImageList;
|
||||||
AImageIndex: TImageIndex;
|
AImageIndex: TImageIndex;
|
||||||
Bmp: TBitmap;
|
Bmp: TBitmap;
|
||||||
@ -13671,7 +13674,7 @@ var
|
|||||||
R: TRect;
|
R: TRect;
|
||||||
TopItem: Integer;
|
TopItem: Integer;
|
||||||
i: Integer;
|
i: Integer;
|
||||||
j, x: Integer;
|
j: Integer;
|
||||||
ChildCount: Integer;
|
ChildCount: Integer;
|
||||||
VHeight: Integer; // viewport height
|
VHeight: Integer; // viewport height
|
||||||
RowHeight: Integer;
|
RowHeight: Integer;
|
||||||
|
@ -1437,7 +1437,7 @@ begin
|
|||||||
F := DTFlagsToQtFlags(Flags);
|
F := DTFlagsToQtFlags(Flags);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{$warning HARDCODED WORKAROUND for qt-4.7.1 QPainter bug.}
|
{Workaround for qt-4.7 QPainter bug.It's fixed in qt-4.7.4. DO NOT REMOVE}
|
||||||
{ Bug triggers when we try to paint multiline text which contains 1
|
{ Bug triggers when we try to paint multiline text which contains 1
|
||||||
space. eg "Save project\nCtrl+S". In this case QPainter draws
|
space. eg "Save project\nCtrl+S". In this case QPainter draws
|
||||||
Save
|
Save
|
||||||
|
@ -395,8 +395,10 @@ const
|
|||||||
var
|
var
|
||||||
Widget: TQtMainWindow;
|
Widget: TQtMainWindow;
|
||||||
R: TRect;
|
R: TRect;
|
||||||
|
{$IFDEF HASX11}
|
||||||
ActiveWin: HWND;
|
ActiveWin: HWND;
|
||||||
W: QWidgetH;
|
W: QWidgetH;
|
||||||
|
{$ENDIF}
|
||||||
Flags: Cardinal;
|
Flags: Cardinal;
|
||||||
|
|
||||||
function ShowNonModalOverModal: Boolean;
|
function ShowNonModalOverModal: Boolean;
|
||||||
|
Loading…
Reference in New Issue
Block a user