Skip to content

Commit d2cd1e4

Browse files
refactor: lazarus 1.4 -> 1.6
Upgrade the project to lazarus 1.6 with FPC 3.0 Fix compilation error: DateTimeStr: UTF8String -> String Fix compilation error: add extra variable TrackerStrLoop Fix deprecated function use in FileUtil switch to LazFileUtils
1 parent 4e2907e commit d2cd1e4

File tree

4 files changed

+40
-20
lines changed

4 files changed

+40
-20
lines changed

source/code/main.lfm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ object FormTrackerModify: TFormTrackerModify
1616
OnDropFiles = FormDropFiles
1717
OnShow = FormShow
1818
Position = poScreenCenter
19-
LCLVersion = '1.4.4.0'
19+
LCLVersion = '1.6.0.4'
2020
object PageControl: TPageControl
2121
Left = 0
2222
Height = 587

source/code/main.pas

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
interface
3636

3737
uses
38-
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
38+
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls,
3939
ExtCtrls, CheckLst, DecodeTorrent, LCLType, ActnList, Menus, ComCtrls,
4040
Grids, controlergridtorrentdata;
4141

@@ -246,7 +246,7 @@ TFormTrackerModify = class(TForm)
246246

247247
implementation
248248

249-
uses LCLIntf, lazutf8;
249+
uses LCLIntf, lazutf8, LazFileUtils;
250250

251251
const
252252
RECOMENDED_TRACKERS: array[0..2] of UTF8String =
@@ -1055,17 +1055,17 @@ function TFormTrackerModify.ValidTrackerURL(const TrackerURL: UTF8String): boole
10551055

10561056
function TFormTrackerModify.CopyUserInputNewTrackersToList: boolean;
10571057
var
1058-
TrackerStr: UTF8String;
1058+
TrackerStrLoop, TrackerStr: UTF8String;
10591059
begin
10601060
{
10611061
Called after 'update torrent' is selected.
10621062
All the user entery from Memo text field will be add to FTrackerAddedByUserList.
10631063
}
10641064
FTrackerAddedByUserList.Clear;
10651065

1066-
for TrackerStr in MemoNewTrackers.Lines do
1066+
for TrackerStrLoop in MemoNewTrackers.Lines do
10671067
begin
1068-
TrackerStr := UTF8trim(TrackerStr);
1068+
TrackerStr := UTF8trim(TrackerStrLoop);
10691069

10701070
//Skip empty line
10711071
if TrackerStr = '' then
@@ -1813,7 +1813,8 @@ procedure TFormTrackerModify.ViewUpdateBegin(ClearView: boolean);
18131813
procedure TFormTrackerModify.ViewUpdateOneTorrentFileDecoded;
18141814
var
18151815
RowIndex, CountFiles: integer;
1816-
TorrentFileNameStr, TrackerStr, DateTimeStr, PrivateStr: UTF8String;
1816+
TorrentFileNameStr, TrackerStr, PrivateStr: UTF8String;
1817+
DateTimeStr: String;
18171818
TreeNodeTorrent, TreeNodeFiles, TreeNodeTrackers, TreeNodeInfo: TTreeNode;
18181819
begin
18191820
//Called after loading torrent file.

source/project/tracker_editor/trackereditor.lpi

Lines changed: 32 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
<PackageName Value="LCL"/>
3838
</Item1>
3939
</RequiredPackages>
40-
<Units Count="65">
40+
<Units Count="67">
4141
<Unit0>
4242
<Filename Value="trackereditor.lpr"/>
4343
<IsPartOfProject Value="True"/>
@@ -211,9 +211,10 @@
211211
<Unit26>
212212
<Filename Value="C:\lazarus\components\lazutils\fileutil.pas"/>
213213
<UnitName Value="FileUtil"/>
214-
<TopLine Value="151"/>
215-
<CursorPos X="10" Y="189"/>
216-
<UsageCount Value="9"/>
214+
<EditorIndex Value="2"/>
215+
<CursorPos X="116" Y="76"/>
216+
<UsageCount Value="10"/>
217+
<Loaded Value="True"/>
217218
</Unit26>
218219
<Unit27>
219220
<Filename Value="C:\lazarus\fpc\2.6.2\source\rtl\inc\ustringh.inc"/>
@@ -434,11 +435,11 @@
434435
<Unit61>
435436
<Filename Value="..\..\code\bencode.pas"/>
436437
<IsPartOfProject Value="True"/>
437-
<EditorIndex Value="-1"/>
438-
<WindowIndex Value="-1"/>
439-
<TopLine Value="-1"/>
440-
<CursorPos X="-1" Y="-1"/>
438+
<UnitName Value="BEncode"/>
439+
<EditorIndex Value="4"/>
440+
<CursorPos X="42" Y="35"/>
441441
<UsageCount Value="20"/>
442+
<Loaded Value="True"/>
442443
</Unit61>
443444
<Unit62>
444445
<Filename Value="..\..\code\controlergridtorrentdata.pas"/>
@@ -452,23 +453,41 @@
452453
<Unit63>
453454
<Filename Value="..\..\code\decodetorrent.pas"/>
454455
<IsPartOfProject Value="True"/>
455-
<EditorIndex Value="-1"/>
456-
<WindowIndex Value="-1"/>
457-
<TopLine Value="-1"/>
458-
<CursorPos X="-1" Y="-1"/>
456+
<UnitName Value="DecodeTorrent"/>
457+
<EditorIndex Value="3"/>
458+
<TopLine Value="591"/>
459+
<CursorPos X="48" Y="628"/>
459460
<UsageCount Value="20"/>
461+
<Loaded Value="True"/>
460462
</Unit63>
461463
<Unit64>
462464
<Filename Value="..\..\code\main.pas"/>
463465
<IsPartOfProject Value="True"/>
464466
<ComponentName Value="FormTrackerModify"/>
465467
<HasResources Value="True"/>
466468
<ResourceBaseClass Value="Form"/>
467-
<IsVisibleTab Value="True"/>
469+
<TopLine Value="63"/>
470+
<CursorPos X="82" Y="140"/>
468471
<UsageCount Value="20"/>
469472
<Loaded Value="True"/>
470473
<LoadedDesigner Value="True"/>
471474
</Unit64>
475+
<Unit65>
476+
<Filename Value="C:\lazarus\components\lazutils\lazfileutils.pas"/>
477+
<UnitName Value="LazFileUtils"/>
478+
<EditorIndex Value="1"/>
479+
<UsageCount Value="10"/>
480+
<Loaded Value="True"/>
481+
</Unit65>
482+
<Unit66>
483+
<Filename Value="C:\lazarus\fpc\3.0.0\source\rtl\inc\systemh.inc"/>
484+
<IsVisibleTab Value="True"/>
485+
<EditorIndex Value="5"/>
486+
<TopLine Value="387"/>
487+
<CursorPos X="3" Y="429"/>
488+
<UsageCount Value="10"/>
489+
<Loaded Value="True"/>
490+
</Unit66>
472491
</Units>
473492
</ProjectOptions>
474493
<CompilerOptions>
568 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)