Fixes compilation of qt widgetset.

git-svn-id: trunk@10075 -
This commit is contained in:
sekelsenmat 2006-10-15 21:26:00 +00:00
parent 44d439dd69
commit 43d1567fab
4 changed files with 14 additions and 15 deletions

View File

@ -70,9 +70,9 @@ type
function InitHintFont(HintFont: TObject): Boolean; override; function InitHintFont(HintFont: TObject): Boolean; override;
// create and destroy // create and destroy
function CreateComponent(Sender : TObject): LCLType.THandle; override; // deprecated function CreateComponent(Sender : TObject): THandle; override; // deprecated
function CreateTimer(Interval: integer; TimerFunc: TFNTimerProc): LCLType.THandle; override; function CreateTimer(Interval: integer; TimerFunc: TFNTimerProc): THandle; override;
function DestroyTimer(TimerHandle: LCLType.THandle): boolean; override; function DestroyTimer(TimerHandle: THandle): boolean; override;
// device contexts // device contexts
function IsValidDC(const DC: HDC): Boolean; virtual; function IsValidDC(const DC: HDC): Boolean; virtual;

View File

@ -50,8 +50,7 @@ end;
Creates a new timer and sets the callback event. Creates a new timer and sets the callback event.
------------------------------------------------------------------------------} ------------------------------------------------------------------------------}
function TQtWidgetSet.CreateTimer(Interval: integer; function TQtWidgetSet.CreateTimer(Interval: integer; TimerFunc: TFNTimerProc): THandle;
TimerFunc: TFNTimerProc): LCLType.THandle;
var var
QtTimer: TQtTimer; QtTimer: TQtTimer;
begin begin
@ -67,7 +66,7 @@ end;
Destroys a timer. Destroys a timer.
------------------------------------------------------------------------------} ------------------------------------------------------------------------------}
function TQtWidgetSet.DestroyTimer(TimerHandle: LCLType.THandle): boolean; function TQtWidgetSet.DestroyTimer(TimerHandle: THandle): boolean;
begin begin
TQtTimer(TimerHandle).Free; TQtTimer(TimerHandle).Free;
@ -162,7 +161,7 @@ end;
Deprecated, never call this function Deprecated, never call this function
------------------------------------------------------------------------------} ------------------------------------------------------------------------------}
function TQtWidgetSet.CreateComponent(Sender : TObject): LCLType.THandle; function TQtWidgetSet.CreateComponent(Sender : TObject): THandle;
begin begin
Result := 0; Result := 0;
end; end;

View File

@ -2080,11 +2080,8 @@ begin
// Sets the initial items // Sets the initial items
for I := 0 to TCustomListBox(AWinControl).Items.Count - 1 do for I := 0 to TCustomListBox(AWinControl).Items.Count - 1 do
begin begin
if (AWinControl as TStatusBar).SimplePanel then Text := UTF8Decode(TCustomListBox(AWinControl).Items.Strings[i]);
begin; QListWidget_addItem(QListWidgetH(Widget), @Text);
Text := UTF8Decode((AWinControl as TStatusBar).SimpleText);
showMessage(@Text);
end;
end; end;
// Sets it´ s initial properties // Sets it´ s initial properties
@ -2313,8 +2310,11 @@ begin
Parent := TQtWidget(AWinControl.Parent.Handle).Widget; Parent := TQtWidget(AWinControl.Parent.Handle).Widget;
Widget := QStatusBar_create(Parent); Widget := QStatusBar_create(Parent);
Text := UTF8Decode(AWinControl.Caption); if (AWinControl as TStatusBar).SimplePanel then
showMessage(@Text); begin;
Text := UTF8Decode((AWinControl as TStatusBar).SimpleText);
showMessage(@Text);
end;
// Sets it´ s initial properties // Sets it´ s initial properties
QWidget_setGeometry(Widget, AWinControl.Left, AWinControl.Top, QWidget_setGeometry(Widget, AWinControl.Left, AWinControl.Top,

View File

@ -249,7 +249,7 @@ begin
Hook := QObject_hook_create(QtStatusBar.Widget); Hook := QObject_hook_create(QtStatusBar.Widget);
TEventFilterMethod(Method) := QtStatusBar.EventFilter; TEventFilterMethod(Method) := @QtStatusBar.EventFilter;
QObject_hook_hook_events(Hook, Method); QObject_hook_hook_events(Hook, Method);