View Issue Details

IDProjectCategoryView StatusLast Update
0036315LazarusLCLpublic2019-11-16 13:35
ReporterCudaText manAssigned ToZeljan Rikalo 
PrioritynormalSeverityminorReproducibilityalways
Status assignedResolutionopen 
PlatformUbuntu 19.10 x64OSOS Version
Product Version2.1 (SVN)Product Build 
Target VersionFixed in Version 
Summary0036315: Cannot compile Qt5 widgetset on last FPC trunk
DescriptionFPC 3.3.1-r43462 on Linux x64

Compile package LCL 2.1: Exit code 1, Errors: 4, Hints: 1
qt56.pas(12517,37) Error: Enumeration symbols can only have values in the range of -2^31 to 2^31-1
qt56.pas(12529,37) Error: Enumeration symbols can only have values in the range of -2^31 to 2^31-1
qt56.pas(12605,37) Error: Enumeration symbols can only have values in the range of -2^31 to 2^31-1
qt56.pas(12678,37) Error: Enumeration symbols can only have values in the range of -2^31 to 2^31-1

error on lines:
    QStyleCE_CustomBase = $f0000000 );
    QStyleCC_CustomBase = $f0000000 );
   etc
TagsNo tags attached.
Fixed in Revision
LazTarget-
WidgetsetQT5
Attached Files
  • int.diff (1,296 bytes)
    Index: lcl/interfaces/qt5/qt56.pas
    ===================================================================
    --- lcl/interfaces/qt5/qt56.pas	(revision 62240)
    +++ lcl/interfaces/qt5/qt56.pas	(working copy)
    @@ -12514,7 +12514,7 @@
         QStyleCE_ColumnViewGrip,
         QStyleCE_ItemViewItem,
         QStyleCE_ShapedFrame,
    -    QStyleCE_CustomBase = $f0000000 );
    +    QStyleCE_CustomBase = LongInt($f0000000) );
     
       QStyleComplexControl = (  //QStyle::ComplexControl (2)
         QStyleCC_SpinBox,
    @@ -12526,7 +12526,7 @@
         QStyleCC_Dial,
         QStyleCC_GroupBox,
         QStyleCC_MdiControls,
    -    QStyleCC_CustomBase = $f0000000 );
    +    QStyleCC_CustomBase = LongInt($f0000000) );
     
     type
       QStyleSubControl = cardinal; // QStyle::SubControl
    @@ -12602,7 +12602,7 @@
         QStyleCT_GroupBox,
         QStyleCT_MdiControls,
         QStyleCT_ItemViewItem,
    -    QStyleCT_CustomBase = $f0000000 );
    +    QStyleCT_CustomBase = LongInt($f0000000) );
     
       QStyleStandardPixmap = (  //QStyle::StandardPixmap (2)
         QStyleSP_TitleBarMenuButton,
    @@ -12675,7 +12675,7 @@
         QStyleSP_MediaSeekBackward,
         QStyleSP_MediaVolume,
         QStyleSP_MediaVolumeMuted,
    -    QStyleSP_CustomBase = $f0000000 );
    +    QStyleSP_CustomBase = LongInt($f0000000) );
     
     type
       QStylePrimitiveElement = cardinal; //  QStyle::PrimitiveElement (4)
    
    int.diff (1,296 bytes)

Relationships

related to 0036175 resolvedFlorian FPC No clear course of action for dealing with C / C++ header translations with enums that really are greater than 2147483647. 
related to 0036238 feedbackZeljan Rikalo Lazarus Range error in qt56.pas with FPC trunk 

Activities

Sven Barth

2019-11-15 10:51

manager   ~0119310

Last edited: 2019-11-15 10:51

View 2 revisions

A typcast to LongInt for the declarations needs to be inserted. See related issue 0036175

Zeljan Rikalo

2019-11-15 14:51

developer   ~0119315

@Sven, but what will happen longint cast is sent to Qt interface which expects ulong value ?

Zeljan Rikalo

2019-11-15 14:58

developer   ~0119317

Now I see Marco's comment at issue 0036175 about cast to DWORD() instead of longint()....Alexey, can you test with DWORD($80000000) cast ?

CudaText man

2019-11-15 20:39

reporter   ~0119327

Dword(...) did not change this error. Longint(..) did it. fix added.

int.diff (1,296 bytes)
Index: lcl/interfaces/qt5/qt56.pas
===================================================================
--- lcl/interfaces/qt5/qt56.pas	(revision 62240)
+++ lcl/interfaces/qt5/qt56.pas	(working copy)
@@ -12514,7 +12514,7 @@
     QStyleCE_ColumnViewGrip,
     QStyleCE_ItemViewItem,
     QStyleCE_ShapedFrame,
-    QStyleCE_CustomBase = $f0000000 );
+    QStyleCE_CustomBase = LongInt($f0000000) );
 
   QStyleComplexControl = (  //QStyle::ComplexControl (2)
     QStyleCC_SpinBox,
@@ -12526,7 +12526,7 @@
     QStyleCC_Dial,
     QStyleCC_GroupBox,
     QStyleCC_MdiControls,
-    QStyleCC_CustomBase = $f0000000 );
+    QStyleCC_CustomBase = LongInt($f0000000) );
 
 type
   QStyleSubControl = cardinal; // QStyle::SubControl
@@ -12602,7 +12602,7 @@
     QStyleCT_GroupBox,
     QStyleCT_MdiControls,
     QStyleCT_ItemViewItem,
-    QStyleCT_CustomBase = $f0000000 );
+    QStyleCT_CustomBase = LongInt($f0000000) );
 
   QStyleStandardPixmap = (  //QStyle::StandardPixmap (2)
     QStyleSP_TitleBarMenuButton,
@@ -12675,7 +12675,7 @@
     QStyleSP_MediaSeekBackward,
     QStyleSP_MediaVolume,
     QStyleSP_MediaVolumeMuted,
-    QStyleSP_CustomBase = $f0000000 );
+    QStyleSP_CustomBase = LongInt($f0000000) );
 
 type
   QStylePrimitiveElement = cardinal; //  QStyle::PrimitiveElement (4)
int.diff (1,296 bytes)

Zeljan Rikalo

2019-11-16 13:35

developer   ~0119343

Yeah, but longint cast produces "Note: Values in enumeration types have to be ascending" and I'm not sure what exactly is sent to Qt lib when it's casted to longint.
Someone should test what happens when QStyleXXXX_CustomBase casted to longint is sent to Qt lib (or at least prepare example in pascal, and I'll test Qt C and C++ part for value).

Issue History

Date Modified Username Field Change
2019-11-14 22:55 CudaText man New Issue
2019-11-15 10:50 Sven Barth Relationship added related to 0036175
2019-11-15 10:51 Sven Barth Note Added: 0119310
2019-11-15 10:51 Sven Barth Note Edited: 0119310 View Revisions
2019-11-15 14:51 Zeljan Rikalo Assigned To => Zeljan Rikalo
2019-11-15 14:51 Zeljan Rikalo Status new => feedback
2019-11-15 14:51 Zeljan Rikalo LazTarget => -
2019-11-15 14:51 Zeljan Rikalo Note Added: 0119315
2019-11-15 14:53 Zeljan Rikalo Relationship added related to 0036238
2019-11-15 14:58 Zeljan Rikalo Note Added: 0119317
2019-11-15 20:39 CudaText man File Added: int.diff
2019-11-15 20:39 CudaText man Note Added: 0119327
2019-11-15 20:39 CudaText man Status feedback => assigned
2019-11-16 13:35 Zeljan Rikalo Note Added: 0119343