mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-30 03:50:43 +02:00
git-svn-id: trunk@8411 -
This commit is contained in:
parent
95647ebc31
commit
92ced1f2c8
@ -20,8 +20,6 @@
|
||||
|
||||
ToDo:
|
||||
-TIntegerSet missing -> taking my own
|
||||
-StrToInt64 has a bug. It prints infinitly "something happened"
|
||||
-> taking my own
|
||||
|
||||
-many more... see XXX
|
||||
}
|
||||
@ -447,6 +445,14 @@ type
|
||||
procedure SetValue(const NewValue: ansistring); override;
|
||||
end;
|
||||
|
||||
{ TQWordPropertyEditor
|
||||
Default editor for all QWord properties }
|
||||
|
||||
TQWordPropertyEditor = class(TInt64PropertyEditor)
|
||||
public
|
||||
function GetValue: ansistring; override;
|
||||
end;
|
||||
|
||||
{ TFloatPropertyEditor
|
||||
The default property editor for all floating point types (e.g. Float,
|
||||
Single, Double, etc.) }
|
||||
@ -1556,35 +1562,11 @@ const
|
||||
TPropertyEditor, // tkWChar
|
||||
TBoolPropertyEditor, // tkBool
|
||||
TInt64PropertyEditor, // tkInt64
|
||||
nil, // tkQWord
|
||||
TQWordPropertyEditor, // tkQWord
|
||||
nil, // tkDynArray
|
||||
nil // tkInterfaceRaw
|
||||
);
|
||||
|
||||
|
||||
// XXX ToDo: These variables/functions have bugs. Thus I provide my own ------
|
||||
|
||||
function StrToInt64(const s:ansistring):int64;
|
||||
var p:integer;
|
||||
negated:boolean;
|
||||
begin
|
||||
p:=1;
|
||||
while (p<=length(s)) and (s[p]=' ') do inc(p);
|
||||
if (p<=length(s)) and (s[p]='-') then begin
|
||||
negated:=true;
|
||||
inc(p);
|
||||
while (p<=length(s)) and (s[p]=' ') do inc(p);
|
||||
end else begin
|
||||
negated:=false;
|
||||
end;
|
||||
Result:=0;
|
||||
while (p<=length(s)) and (s[p]>='0') and (s[p]<='9') do begin
|
||||
Result:=Result*10+ord(s[p])-ord('0');
|
||||
inc(p);
|
||||
end;
|
||||
if negated then Result:=-Result;
|
||||
end;
|
||||
|
||||
// -----------------------------------------------------------
|
||||
|
||||
function AlignToPtr(const p: Pointer): Pointer;
|
||||
@ -2834,6 +2816,13 @@ begin
|
||||
end;
|
||||
|
||||
|
||||
{ TQWordPropertyEditor }
|
||||
|
||||
function TQWordPropertyEditor.GetValue: ansistring;
|
||||
begin
|
||||
Result := IntToStr(QWord(GetInt64Value));
|
||||
end;
|
||||
|
||||
{ TFloatPropertyEditor }
|
||||
|
||||
function TFloatPropertyEditor.AllEqual: Boolean;
|
||||
|
@ -369,7 +369,7 @@ type
|
||||
Result: LRESULT;
|
||||
end;
|
||||
|
||||
{$if defined(ver1_0) or not(defined(win32))}
|
||||
{$ifndef win32}
|
||||
TLMNoParams = record
|
||||
Msg: Cardinal;
|
||||
Unused: array[0..1] of PtrInt;
|
||||
|
Loading…
Reference in New Issue
Block a user