View Issue Details

IDProjectCategoryView StatusLast Update
0001410SkyChart1-Softwarepublic15-06-20 19:53
ReporterMattia Verga Assigned ToPatrick Chevalley  
PrioritynormalSeveritymajorReproducibilityhave not tried
Status resolvedResolutionfixed 
PlatformLinux Fedora 
Product Version3.10 
Target Version3.10 
Summary0001410: jdcalendar.pas fails to build on Fedora 23
DescriptionTrying to build Skychart in Fedora 23 causes an error in compiling jdcalendar.pas.

I don't know if it can be related to the recent update of Lazarus in Fedora (now using 1.4-0.1.RC2).

Here it is the build log:
https://kojipkgs.fedoraproject.org//work/tasks/4055/10154055/build.log
TagsNo tags attached.

Activities

Patrick Chevalley

15-06-19 14:06

administrator   ~0003026

Hi Mattia,

Yes there is a change to TEditButton in Lazarus 1.4 that affect jdcalendar.

This is already fixed in trunk and I upload here the patch for 3.10.
Tell me if it work.

Patrick Chevalley

15-06-19 14:07

administrator  

jdcalendar_laz14.patch (1,917 bytes)   
Index: skychart/component/jdcalendar/jdcalendar.pas
===================================================================
--- skychart/component/jdcalendar/jdcalendar.pas	(revision 2854)
+++ skychart/component/jdcalendar/jdcalendar.pas	(working copy)
@@ -26,7 +26,7 @@
 interface
 
 uses
-  SysUtils, Classes, Dialogs, LCLType, Grids, StdCtrls,
+  SysUtils, Classes, Dialogs, LCLType, Grids, StdCtrls, LCLVersion,
   Controls, ExtCtrls, Types, GraphType, Graphics, Forms, Buttons, MaskEdit,
   Math, LResources, EditBtn, enhedits;
 
@@ -138,7 +138,11 @@
 
   { TJDDatePicker }
 
+ {$if (lcl_major<2) and (lcl_minor<3)}
   TJDDatePicker = class(TEditButton)
+ {$ELSE}
+  TJDDatePicker = class(TCustomEditButton)
+ {$ENDIF}
   private
     savejd: double;
     Flabels: TDatesLabelsArray;
@@ -145,7 +149,11 @@
     Fcaption: string;
     procedure UpdDate;
   protected
+    {$if (lcl_major<2) and (lcl_minor<3)}
     procedure DoButtonClick(Sender: TObject); override;
+    {$ELSE}
+    procedure ButtonClick(Sender: TObject);
+    {$ENDIF}
     procedure SetJD(Value: double);
   public
     constructor Create(AOwner: TComponent); override;
@@ -810,7 +818,11 @@
   Color := clBtnFace;
   ReadOnly := True;
   Button.Glyph.LoadFromLazarusResource('BtnDatePicker');
+  {$if (lcl_major<2) and (lcl_minor<3)}
   Button.OnClick := @DoButtonClick;
+  {$ELSE}
+  Button.OnClick := @ButtonClick;
+  {$ENDIF}
   Button.Enabled := True;
   UpdDate;
 end;
@@ -820,11 +832,19 @@
   inherited Destroy;
 end;
 
+{$if (lcl_major<2) and (lcl_minor<3)}
 procedure TJDDatePicker.DoButtonClick(Sender: TObject);//or onClick
+{$ELSE}
+procedure TJDDatePicker.ButtonClick(Sender: TObject);//or onClick
+{$ENDIF}
 var
   CD: TJDCalendarDialog;
 begin
+  {$if (lcl_major<2) and (lcl_minor<3)}
   inherited DoButtonClick(Sender);
+  {$ELSE}
+  inherited ButtonClick;
+  {$ENDIF}
 
   CD := TJDCalendarDialog.Create(Self);
   CD.JD := savejd;
jdcalendar_laz14.patch (1,917 bytes)   

Mattia Verga

15-06-20 09:43

reporter   ~0003027

Hi Patrick,
the patch works and fixes the issue.

Thanks.

Patrick Chevalley

15-06-20 19:53

administrator   ~0003028

Nice.
Thank you for your work to include skychart in Fedora!

Issue History

Date Modified Username Field Change
15-06-19 12:55 Mattia Verga New Issue
15-06-19 14:06 Patrick Chevalley Note Added: 0003026
15-06-19 14:06 Patrick Chevalley Assigned To => Patrick Chevalley
15-06-19 14:06 Patrick Chevalley Status new => feedback
15-06-19 14:06 Patrick Chevalley Target Version 0.3.0 => 3.10
15-06-19 14:07 Patrick Chevalley File Added: jdcalendar_laz14.patch
15-06-20 09:43 Mattia Verga Note Added: 0003027
15-06-20 09:43 Mattia Verga Status feedback => assigned
15-06-20 19:53 Patrick Chevalley Note Added: 0003028
15-06-20 19:53 Patrick Chevalley Status assigned => resolved
15-06-20 19:53 Patrick Chevalley Resolution open => fixed