From 05a8736097f40fbcff51d610710ee97a47c079bf Mon Sep 17 00:00:00 2001 From: Pritpal Bedi Date: Mon, 26 Oct 2009 15:22:06 +0000 Subject: [PATCH] 2009-10-26 08:20 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com) * contrib/hbqt/generator/hbqtgen.prg ! Fixed to honor Przemek's changes pertaining " LONG is 64bit integer and HB_LONG is declared as LONG not LONGLONG --- harbour/ChangeLog | 5 +++++ harbour/contrib/hbqt/generator/hbqtgen.prg | 16 +++++++++------- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 6f716740ba..db75424100 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,11 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-10-26 08:20 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com) + * contrib/hbqt/generator/hbqtgen.prg + ! Fixed to honor Przemek's changes pertaining " + LONG is 64bit integer and HB_LONG is declared as LONG not LONGLONG + 2009-10-26 15:29 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/contrib/hbqt/qtcore/QLocale.cpp * harbour/contrib/hbqt/qtcore/QByteArray.cpp diff --git a/harbour/contrib/hbqt/generator/hbqtgen.prg b/harbour/contrib/hbqt/generator/hbqtgen.prg index 05b85754c2..8254ce35a5 100644 --- a/harbour/contrib/hbqt/generator/hbqtgen.prg +++ b/harbour/contrib/hbqt/generator/hbqtgen.prg @@ -780,6 +780,15 @@ STATIC FUNCTION ParseProto( cProto, cWidget, txt_, doc_, aEnum, func_ ) ENDIF aA[ PRT_DOC ] := 'n' + cDocNM + CASE aA[ PRT_CAST ] $ "qlonglong,qulonglong" + s := '( ' + aA[ PRT_CAST ] + ' ) hb_parnint( ' + cHBIdx + ' )' + IF !empty( aA[ PRT_DEFAULT ] ) .AND. !( aA[ PRT_DEFAULT ] == "0" ) + aA[ PRT_BODY ] := '( HB_ISNUM( ' + cHBIdx + ' ) ? ' + s + ' : ' + aA[ PRT_DEFAULT ] + ' )' + ELSE + aA[ PRT_BODY ] := s + ENDIF + aA[ PRT_DOC ] := 'n' + cDocNM + CASE aA[ PRT_CAST ] $ cIntLongLong s := 'hb_parnint( ' + cHBIdx + ' )' IF !empty( aA[ PRT_DEFAULT ] ) .AND. !( aA[ PRT_DEFAULT ] == "0" ) @@ -947,27 +956,20 @@ STATIC FUNCTION ParseProto( cProto, cWidget, txt_, doc_, aEnum, func_ ) cPrgRet := 'p' + cDocNM CASE aA[ PRT_L_AND ] .AND. aA[ PRT_L_CONST ] -// cCmd := 'hb_retptr( new ' + aA[ PRT_CAST ] + '( ' + cCmn + ' ) )' -// cCmd := 'hb_retptrGC( hbqt_pToGCPointer( new ' + aA[ PRT_CAST ] + '( ' + cCmn + ' ) ) )' cCmd := Get_Command( aA[ PRT_CAST ], cCmn ) cPrgRet := 'p' + cDocNM CASE aA[ PRT_L_CONST ] -// cCmd := 'hb_retptr( new ' + aA[ PRT_CAST ] + '( ' + cCmn + ' ) )' -// cCmd := 'hb_retptrGC( hbqt_pToGCPointer( new ' + aA[ PRT_CAST ] + '( ' + cCmn + ' ) ) )' cCmd := Get_Command( aA[ PRT_CAST ], cCmn ) cPrgRet := 'p' + cDocNM CASE aA[ PRT_L_AND ] -// cCmd := 'hb_retptr( ( ' + aA[ PRT_CAST ] + '* ) ' + cCmn + ' )' cCmd := Get_Command( aA[ PRT_CAST ], cCmn ) cPrgRet := 'p' + cDocNM OTHERWISE /* No attribute is attached to return value */ IF left( aA[ PRT_CAST ], 1 ) == 'Q' -// cCmd := 'hb_retptr( new ' + aA[ PRT_CAST ] + '( ' + cCmn + ' ) )' -// cCmd := 'hb_retptrGC( hbqt_pToGCPointer( new ' + aA[ PRT_CAST ] + '( ' + cCmn + ' ) ) )' cCmd := Get_Command( aA[ PRT_CAST ], cCmn ) cPrgRet := 'p' + cDocNM