Changeset 72 for trunk/Packages/Common


Ignore:
Timestamp:
Mar 6, 2016, 12:10:38 AM (9 years ago)
Author:
chronos
Message:
  • Modified: Built with FPC 3.0.0. Fixed various compiler messages.
Location:
trunk/Packages/Common
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/Packages/Common/Common.lpk

    r61 r72  
    44    <PathDelim Value="\"/>
    55    <Name Value="Common"/>
     6    <Type Value="RunAndDesignTime"/>
    67    <AddToProjectUsesSection Value="True"/>
    78    <Author Value="Chronos (robie@centrum.cz)"/>
     
    1213        <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
    1314      </SearchPaths>
     15      <Other>
     16        <CompilerMessages>
     17          <IgnoredMessages idx5024="True"/>
     18        </CompilerMessages>
     19      </Other>
    1420    </CompilerOptions>
    1521    <Description Value="Various libraries"/>
     
    110116      <OutDir Value="Languages"/>
    111117    </i18n>
    112     <Type Value="RunAndDesignTime"/>
    113118    <RequiredPkgs Count="2">
    114119      <Item1>
  • trunk/Packages/Common/Common.pas

    r61 r72  
    55unit Common;
    66
     7{$warn 5023 off : no warning about unused units}
    78interface
    89
  • trunk/Packages/Common/UApplicationInfo.pas

    r59 r72  
    66
    77uses
    8   SysUtils, Registry, Classes, Forms, URegistry;
     8  SysUtils, Classes, Forms, URegistry;
    99
    1010type
  • trunk/Packages/Common/UCommon.pas

    r59 r72  
    88  {$IFDEF Windows}Windows,{$ENDIF}
    99  Classes, SysUtils, StrUtils, Dialogs, Process, LCLIntf,
    10   FileUtil; //, ShFolder, ShellAPI;
     10  FileUtil, LazFileUtils; //, ShFolder, ShellAPI;
    1111
    1212type
     
    9191  I: Integer;
    9292begin
     93  Result := '';
    9394  for I := 1 to Length(Source) do begin
    9495    Result := Result + LowerCase(IntToHex(Ord(Source[I]), 2));
     
    105106  Path := IncludeTrailingPathDelimiter(APath);
    106107
    107   Find := FindFirst(UTF8Decode(Path + AFileSpec), faAnyFile xor faDirectory, SearchRec);
     108  Find := FindFirst(Path + AFileSpec, faAnyFile xor faDirectory, SearchRec);
    108109  while Find = 0 do begin
    109     DeleteFileUTF8(Path + UTF8Encode(SearchRec.Name));
     110    DeleteFileUTF8(Path + SearchRec.Name);
    110111
    111112    Find := SysUtils.FindNext(SearchRec);
     
    416417
    417418procedure OpenWebPage(URL: string);
    418 var
    419   Process: TProcess;
    420   Browser, Params: string;
    421419begin
    422420  OpenURL(URL);
    423   {try
    424     Process := TProcess.Create(nil);
    425     Browser := '';
    426     //FindDefaultBrowser(Browser, Params);
    427     //Process.Executable := Browser;
    428     //Process.Parameters.Add(Format(Params, [ApplicationInfo.HomePage]);
    429     Process.CommandLine := 'cmd.exe /c start ' + URL;
    430     Process.Options := [poNoConsole];
    431     Process.Execute;
    432   finally
    433     Process.Free;
    434   end;}
    435421end;
    436422
  • trunk/Packages/Common/UDebugLog.pas

    r59 r72  
    66
    77uses
    8   Classes, SysUtils, FileUtil, SpecializedList, SyncObjs;
     8  Classes, SysUtils, FileUtil, SpecializedList, SyncObjs, LazFileUtils;
    99
    1010type
     
    104104    if ExtractFileDir(FileName) <> '' then
    105105      ForceDirectoriesUTF8(ExtractFileDir(FileName));
    106     if FileExistsUTF8(FileName) then LogFile := TFileStream.Create(UTF8Decode(FileName), fmOpenWrite)
    107       else LogFile := TFileStream.Create(UTF8Decode(FileName), fmCreate);
     106    if FileExistsUTF8(FileName) then LogFile := TFileStream.Create(FileName, fmOpenWrite)
     107      else LogFile := TFileStream.Create(FileName, fmCreate);
    108108    LogFile.Seek(0, soFromEnd);
    109109    Text := FormatDateTime('hh:nn:ss.zzz', Now) + ': ' + Text + LineEnding;
  • trunk/Packages/Common/UFindFile.pas

    r59 r72  
    2424
    2525uses
    26   SysUtils, Classes, Graphics, Controls, Forms, Dialogs, FileCtrl;
     26  SysUtils, Classes, Graphics, Controls, Forms, Dialogs;
    2727
    2828type
     
    116116  if ffaAnyFile in FileAttr then Attr := Attr + faAnyFile;
    117117
    118   if SysUtils.FindFirst(UTF8Decode(inPath + FileMask), Attr, Rec) = 0 then
     118  if SysUtils.FindFirst(inPath + FileMask, Attr, Rec) = 0 then
    119119  try
    120120    repeat
     
    127127  If not InSubFolders then Exit;
    128128
    129   if SysUtils.FindFirst(UTF8Decode(inPath + '*.*'), faDirectory, Rec) = 0 then
     129  if SysUtils.FindFirst(inPath + '*.*', faDirectory, Rec) = 0 then
    130130  try
    131131    repeat
  • trunk/Packages/Common/ULastOpenedList.pas

    r59 r72  
    139139    OpenKey(Context.Key, True);
    140140    for I := 0 to Items.Count - 1 do
    141       WriteString('File' + IntToStr(I), UTF8Decode(Items[I]));
     141      WriteString('File' + IntToStr(I), Items[I]);
    142142  finally
    143143    Free;
  • trunk/Packages/Common/UListViewSort.pas

    r59 r72  
    119119var
    120120  I: Integer;
    121   NewColumn: TGridColumn;
    122121begin
    123122  with FStringGrid1 do begin
    124123    Columns.Clear;
    125124    while Columns.Count > ListView.Columns.Count do Columns.Delete(Columns.Count - 1);
    126     while Columns.Count < ListView.Columns.Count do NewColumn := Columns.Add;
     125    while Columns.Count < ListView.Columns.Count do Columns.Add;
    127126    for I := 0 to ListView.Columns.Count - 1 do begin
    128127      Columns[I].Width := ListView.Columns[I].Width;
  • trunk/Packages/Common/UScaleDPI.pas

    r61 r72  
    2727    function ScaleX(Size: Integer; FromDPI: Integer): Integer;
    2828    function ScaleY(Size: Integer; FromDPI: Integer): Integer;
    29     constructor Create(AOwner: TComponent);
     29    constructor Create(AOwner: TComponent); override;
    3030  published
    3131    property AutoDetect: Boolean read FAutoDetect write SetAutoDetect;
  • trunk/Packages/Common/UURI.pas

    r59 r72  
    8989function LeftCutString(var Source: string; out Output: string; Delimiter: string; Allowed: string = ''): Boolean;
    9090var
    91   I, J: Integer;
     91  I: Integer;
    9292  Matched: Boolean;
    9393begin
     
    113113function RightCutString(var Source: string; out Output: string; Delimiter: string; Allowed: string = ''): Boolean;
    114114var
    115   I, J: Integer;
     115  I: Integer;
    116116  Matched: Boolean;
    117117begin
     
    202202
    203203procedure TURI.SetAsString(Value: string);
    204 var
    205   HostAddr: string;
    206   HostPort: string;
    207204begin
    208205  LeftCutString(Value, Scheme, ':');
  • trunk/Packages/Common/UXMLUtils.pas

    r54 r72  
    1010
    1111function XMLTimeToDateTime(XMLDateTime: string): TDateTime;
    12 function DateTimeToXMLTime(Value: TDateTime; ApplyLocalBias: Boolean = True): WideString;
     12function DateTimeToXMLTime(Value: TDateTime; ApplyLocalBias: Boolean = True): string;
    1313
    1414
     
    3535function LeftCutString(var Source: string; out Output: string; Delimiter: string; Allowed: string = ''): Boolean;
    3636var
    37   I, J: Integer;
     37  I: Integer;
    3838  Matched: Boolean;
    3939begin
     
    106106end;
    107107
    108 function DateTimeToXMLTime(Value: TDateTime; ApplyLocalBias: Boolean = True): WideString;
     108function DateTimeToXMLTime(Value: TDateTime; ApplyLocalBias: Boolean = True): string;
    109109const
    110110  Neg: array[Boolean] of string =  ('+', '-');
Note: See TracChangeset for help on using the changeset viewer.