You've already forked lazarus-ccr
jvcllaz: Cleanup, less hints and warnings in DB package
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6872 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -51,7 +51,7 @@ type
|
||||
procedure SetDataSource(Value: TDataSource);
|
||||
procedure SetDataField(const Value: string);
|
||||
procedure SetSearchOptions(const Value: TLocateOptions);
|
||||
procedure CMChanged(var Msg: TLMessage); message CM_CHANGED;
|
||||
procedure CMChanged(var {%H-}Msg: TLMessage); message CM_CHANGED;
|
||||
protected
|
||||
procedure DoEnter; override;
|
||||
procedure DoExit; override;
|
||||
|
@ -144,7 +144,7 @@ type
|
||||
procedure DataChanged; dynamic;
|
||||
procedure DataScrolled; dynamic;
|
||||
procedure Change2(Node: TTreeNode); dynamic;
|
||||
procedure RecordChanged(Field: TField); dynamic;
|
||||
procedure RecordChanged({%H-}Field: TField); dynamic;
|
||||
|
||||
function CanExpand(Node: TTreeNode): Boolean; override;
|
||||
procedure Collapse(Node: TTreeNode); override;
|
||||
@ -200,7 +200,7 @@ type
|
||||
procedure ActiveChanged; override;
|
||||
procedure RecordChanged(Field: TField); override;
|
||||
procedure DataSetChanged; override;
|
||||
procedure DataSetScrolled(Distance: Integer); override;
|
||||
procedure DataSetScrolled({%H-}Distance: Integer); override;
|
||||
public
|
||||
constructor Create(ATreeView: TJvCustomDBTreeView);
|
||||
end;
|
||||
@ -1180,7 +1180,7 @@ begin
|
||||
FDataLink.DataSet.FieldByName(FItemField).Text := Item.pszText;
|
||||
try
|
||||
FDataLink.DataSet.Post;
|
||||
Change2(Self.Selected); {?}
|
||||
Change2(Self.Selected); // ?
|
||||
except
|
||||
on E: Exception do
|
||||
begin
|
||||
@ -1548,8 +1548,8 @@ procedure TJvCustomDBTreeView.CreateWnd;
|
||||
var
|
||||
Node: TTreeNode;
|
||||
temp: string;
|
||||
strLength: Integer;
|
||||
HasChildren: Byte;
|
||||
strLength: Integer = 0;
|
||||
HasChildren: Byte = 0;
|
||||
begin
|
||||
inherited CreateWnd;
|
||||
// tree is restored. Now we must restore information about Master Values
|
||||
|
@ -76,7 +76,7 @@ type
|
||||
procedure ActiveChanged; override;
|
||||
procedure LayoutChanged; override;
|
||||
procedure DataSetChanged; override;
|
||||
procedure DataSetScrolled(Distance: Integer); override;
|
||||
procedure DataSetScrolled({%H-}Distance: Integer); override;
|
||||
end;
|
||||
|
||||
{ TJvLookupControl }
|
||||
@ -181,9 +181,9 @@ type
|
||||
procedure ListLinkDataChanged; virtual;
|
||||
procedure ListLinkDataSetChanged; virtual;
|
||||
procedure Notification(AComponent: TComponent; Operation: TOperation); override;
|
||||
function GetPicture(Current, Empty: Boolean; var TextMargin: Integer): TGraphic; virtual;
|
||||
function GetImageIndex(Current, Empty: Boolean; var TextMargin: Integer): Integer; virtual;
|
||||
procedure UpdateDisplayEmpty(const Value: string); virtual;
|
||||
function GetPicture({%H-}Current, Empty: Boolean; var TextMargin: Integer): TGraphic; virtual;
|
||||
function GetImageIndex({%H-}Current, Empty: Boolean; var TextMargin: Integer): Integer; virtual;
|
||||
procedure UpdateDisplayEmpty(const {%H-}Value: string); virtual;
|
||||
function SearchText(var AValue: string): Boolean;
|
||||
function GetWindowWidth: Integer;
|
||||
property DataField: string read FDataFieldName write SetDataFieldName;
|
||||
@ -245,7 +245,7 @@ type
|
||||
function GetKeyIndex: Integer;
|
||||
procedure ListDataChanged;
|
||||
procedure SelectCurrent;
|
||||
procedure SelectItemAt(X, Y: Integer);
|
||||
procedure SelectItemAt({%H-}X, Y: Integer);
|
||||
procedure SetRowCount(AValue: Integer);
|
||||
procedure StopTimer;
|
||||
procedure StopTracking;
|
||||
@ -254,7 +254,7 @@ type
|
||||
procedure UpdateBufferCount(Rows: Integer);
|
||||
procedure WMCancelMode(var Msg: TLMessage); message LM_CANCELMODE;
|
||||
procedure WMNCHitTest(var Msg: TLMNCHitTest); message LM_NCHITTEST;
|
||||
procedure WMTimer(var Msg: TLMessage); message LM_TIMER;
|
||||
procedure WMTimer(var {%H-}Msg: TLMessage); message LM_TIMER;
|
||||
procedure WMVScroll(var Msg: TLMVScroll); message LM_VSCROLL;
|
||||
protected
|
||||
procedure FontChanged(Sender: TObject); override;
|
||||
@ -284,7 +284,7 @@ type
|
||||
constructor Create(AOwner: TComponent); override;
|
||||
procedure SetBounds(ALeft, ATop, AWidth, AHeight: Integer); override;
|
||||
procedure DrawItemText(ACanvas: TCanvas; Rect: TRect;
|
||||
Selected, IsEmpty: Boolean); virtual;
|
||||
{%H-}Selected, IsEmpty: Boolean); virtual;
|
||||
property RowCount: Integer read FRowCount write SetRowCount stored False;
|
||||
property DisplayValue;
|
||||
property Value;
|
||||
@ -413,7 +413,7 @@ type
|
||||
FMouseOverButton: Boolean;
|
||||
FMouseOver: Boolean;
|
||||
FWhenClosed: Int64;
|
||||
procedure ListMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||
procedure ListMouseUp(Sender: TObject; Button: TMouseButton; {%H-}Shift: TShiftState; X, Y: Integer);
|
||||
procedure StopTracking;
|
||||
procedure TrackButton(X, Y: Integer);
|
||||
function GetMinHeight: Integer;
|
||||
@ -1917,7 +1917,6 @@ begin
|
||||
R := Rect;
|
||||
R.Right := R.Left;
|
||||
S := '';
|
||||
//if Selected then
|
||||
Canvas.FillRect(Rect);
|
||||
ATop := (R.Bottom + R.Top - CanvasMaxTextHeight(ACanvas)) div 2;
|
||||
if FListStyle = lsFixed then
|
||||
@ -1984,7 +1983,8 @@ end;
|
||||
|
||||
procedure TJvDBLookupList.Paint;
|
||||
var
|
||||
I, J, TextHeight, TextMargin: Integer;
|
||||
I, J, TextHeight: Integer;
|
||||
TextMargin: Integer = 0;
|
||||
Image: TGraphic;
|
||||
R, ImageRect: TRect;
|
||||
Selected: Boolean;
|
||||
@ -2892,9 +2892,9 @@ var
|
||||
R: TRect;
|
||||
begin
|
||||
if BiDiMode = bdRightToLeft then
|
||||
SetRect(R, FButtonWidth + 1, 1, ClientWidth - 1, ClientHeight - 1)
|
||||
R := Rect(FButtonWidth + 1, 1, ClientWidth - 1, ClientHeight - 1)
|
||||
else
|
||||
SetRect(R, 1, 1, ClientWidth - FButtonWidth - 1, ClientHeight - 1);
|
||||
R := Rect(1, 1, ClientWidth - FButtonWidth - 1, ClientHeight - 1);
|
||||
InvalidateRect(Self.Handle, @R, False);
|
||||
UpdateWindow(Self.Handle);
|
||||
end;
|
||||
@ -3454,7 +3454,7 @@ begin
|
||||
|
||||
if W > 4 then
|
||||
begin
|
||||
SetRect(R, 1, 1, W - 1, ClientHeight - 1);
|
||||
R := Rect(1, 1, W - 1, ClientHeight - 1);
|
||||
if TextMargin > 0 then
|
||||
Inc(TextMargin);
|
||||
X := 4 + TextMargin;
|
||||
@ -3664,7 +3664,7 @@ end;
|
||||
|
||||
procedure TJvDBLookupCombo.WMSetCursor(var Msg: TLMSetCursor);
|
||||
var
|
||||
Pt: TPoint;
|
||||
Pt: TPoint = (X:0; Y:0);
|
||||
R: TRect;
|
||||
begin
|
||||
GetCursorPos(Pt);
|
||||
|
@ -359,7 +359,7 @@ type
|
||||
procedure SetOnCustomDraw(const Value: TTVCustomDrawEvent);
|
||||
procedure SetOnCustomDrawItem(const Value: TTVCustomDrawItemEvent);
|
||||
protected
|
||||
procedure FocusSet(PrevWnd: THandle); override;
|
||||
procedure FocusSet({%H-}PrevWnd: THandle); override;
|
||||
procedure CreateParams(var Params: TCreateParams); override;
|
||||
procedure ListLinkActiveChanged; override;
|
||||
public
|
||||
@ -573,8 +573,8 @@ var
|
||||
Params: TCreateParams;
|
||||
R: TRect;
|
||||
begin
|
||||
CreateParams(Params);
|
||||
SetRect(R, 0, 0, 0, 0);
|
||||
CreateParams(Params{%H-});
|
||||
R := Rect(0, 0, 0, 0);
|
||||
AdjustWindowRectEx(R, Params.Style, False, Params.ExStyle);
|
||||
Result := R.Bottom - R.Top;
|
||||
end;
|
||||
@ -1463,10 +1463,11 @@ end;
|
||||
|
||||
type
|
||||
TJvDBLookupTreeViewTree = class(TJvDBTreeView)
|
||||
private
|
||||
protected
|
||||
procedure DataScrolled; override;
|
||||
procedure DataChanged; override;
|
||||
procedure Change2(Node: TTreeNode); override;
|
||||
public
|
||||
procedure DefaultHandler(var Message); override;
|
||||
end;
|
||||
|
||||
|
@ -47,7 +47,7 @@ type
|
||||
TJvDataLink = class(TDataLink)
|
||||
protected
|
||||
procedure FocusControl(Field: TFieldRef); overload; override;
|
||||
procedure FocusControl(const Field: TField); reintroduce; overload; virtual;
|
||||
procedure FocusControl(const {%H-}Field: TField); reintroduce; overload; virtual;
|
||||
end;
|
||||
|
||||
TCommit = (ctNone, ctStep, ctAll);
|
||||
@ -57,10 +57,7 @@ type
|
||||
private
|
||||
FErrPos: Integer;
|
||||
public
|
||||
// The dummy parameter is only there for BCB compatibility so that
|
||||
// when the hpp file gets generated, this constructor generates
|
||||
// a C++ constructor that doesn't already exist
|
||||
constructor Create(const AMessage: string; AErrPos: Integer; DummyForBCB: Integer = 0); overload;
|
||||
constructor Create(const AMessage: string; AErrPos: Integer); overload;
|
||||
property ErrPos: Integer read FErrPos;
|
||||
end;
|
||||
|
||||
@ -76,7 +73,7 @@ type
|
||||
procedure SetDataSet(Value: TDataSet);
|
||||
protected
|
||||
function MatchesLookup(Field: TField): Boolean;
|
||||
procedure CheckFieldType(Field: TField); virtual;
|
||||
procedure CheckFieldType({%H-}Field: TField); virtual;
|
||||
procedure ActiveChanged; virtual;
|
||||
function LocateFilter: Boolean; virtual;
|
||||
function LocateKey: Boolean; virtual;
|
||||
@ -219,7 +216,7 @@ begin
|
||||
DatabaseError(Msg);
|
||||
end;
|
||||
|
||||
constructor EJvScriptError.Create(const AMessage: string; AErrPos: Integer; DummyForBCB: Integer);
|
||||
constructor EJvScriptError.Create(const AMessage: string; AErrPos: Integer);
|
||||
begin
|
||||
inherited Create(AMessage);
|
||||
FErrPos := AErrPos;
|
||||
@ -347,7 +344,7 @@ begin
|
||||
if not FLookupExact then
|
||||
Include(Options, loPartialKey);
|
||||
if FLookupValue = '' then
|
||||
VarClear(Value)
|
||||
VarClear(Value{%H-})
|
||||
else
|
||||
Value := FLookupValue;
|
||||
Result := DataSet.Locate(FLookupField.FieldName, Value, Options);
|
||||
|
Reference in New Issue
Block a user