From ff965d788db97c8209512fa14ea1272e77d1ffdc Mon Sep 17 00:00:00 2001 From: juha Date: Tue, 31 Dec 2013 20:58:10 +0000 Subject: [PATCH] Qt: remove a useless test for AWinControl.HandleAllocated in TQtWSWinControl.GetPreferredSize. git-svn-id: trunk@43624 - --- lcl/interfaces/qt/qtwscontrols.pp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lcl/interfaces/qt/qtwscontrols.pp b/lcl/interfaces/qt/qtwscontrols.pp index 3b1000e2b0..2c8dc998d4 100644 --- a/lcl/interfaces/qt/qtwscontrols.pp +++ b/lcl/interfaces/qt/qtwscontrols.pp @@ -278,9 +278,8 @@ end; class procedure TQtWSWinControl.GetPreferredSize(const AWinControl: TWinControl; var PreferredWidth, PreferredHeight: integer; WithThemeSpace: Boolean); begin - if AWinControl.HandleAllocated then - TQtWidget(AWinControl.Handle).PreferredSize(PreferredWidth, - PreferredHeight, WithThemeSpace); + Assert(AWinControl.HandleAllocated, 'GetPreferredSize: Handle not allocated'); + TQtWidget(AWinControl.Handle).PreferredSize(PreferredWidth, PreferredHeight, WithThemeSpace); end; class function TQtWSWinControl.GetText(const AWinControl: TWinControl;