From aeff3729cc699914c7762f3d6a0706e67d36d14e Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Wed, 27 Apr 2011 10:00:24 +0000 Subject: [PATCH] 2011-04-27 11:59 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * contrib/hbqt/hbmk2_qt.hbs * contrib/hbqt/qtgui/hbqtgui.h * contrib/hbqt/qtgui/qth/QGraphicsPathItem.qth * contrib/hbqt/qtgui/qth/QBrush.qth * contrib/hbqt/qtgui/qth/QGraphicsScene.qth * contrib/hbqt/qtgui/qth/QGraphicsRectItem.qth * contrib/hbqt/qtgui/qth/QGraphicsSceneDragDropEvent.qth * contrib/hbqt/qtgui/qth/QGraphicsPolygonItem.qth * contrib/hbqt/qtgui/qth/QGraphicsLineItem.qth * contrib/hbqt/qtgui/qth/QDropEvent.qth * contrib/hbqt/qtgui/qth/QGraphicsEllipseItem.qth * contrib/hbqt/qtgui/qth/QGraphicsPixmapItem.qth * contrib/hbqt/qtgui/qth/QPixmap.qth * contrib/hbqt/qtcore/hbqt_pointer.cpp * contrib/hbqt/qtcore/hbqt.h * contrib/hbqt/qtcore/qth/QResource.qth * contrib/hbqt/qtcore/qth/QMimeData.qth * contrib/hbqt/qtcore/hbqtcore.h * contrib/hbqt/qtcore/hbqt_hbqslots.cpp * contrib/hbqt/qtcore/hbqt_hbqevents.cpp * contrib/hbqt/qtsql/qth/QSqlQuery.qth * hbqt_par_obj() -> hbqt_par_ptr() * hbqt_gcpointer() -> hbqt_par_ptr() * hbqt_pPtrFromObj() -> hbqt_par_ptr() * hbqt_getObjectGC() -> hbqt_par_ptrGC() * hbqt_detachgcpointer() -> hbqt_par_detach_ptrGC(), retval set to void (from void *) * hbqt_pPtrFromObject() -> hbqt_get_ptr() * hbqt_set_pptr() renamed, cleaned, made static ! hbqt_isObjectType() retval changed to HB_BOOL - hbqt_getqtptr() deleted, unused --- harbour/ChangeLog | 33 +++++++++++ harbour/contrib/hbqt/hbmk2_qt.hbs | 6 +- harbour/contrib/hbqt/qtcore/hbqt.h | 19 +++---- .../contrib/hbqt/qtcore/hbqt_hbqevents.cpp | 6 +- harbour/contrib/hbqt/qtcore/hbqt_hbqslots.cpp | 4 +- harbour/contrib/hbqt/qtcore/hbqt_pointer.cpp | 57 +++++-------------- harbour/contrib/hbqt/qtcore/hbqtcore.h | 6 +- harbour/contrib/hbqt/qtcore/qth/QMimeData.qth | 2 +- harbour/contrib/hbqt/qtcore/qth/QResource.qth | 8 +-- harbour/contrib/hbqt/qtgui/hbqtgui.h | 16 +++--- harbour/contrib/hbqt/qtgui/qth/QBrush.qth | 2 +- harbour/contrib/hbqt/qtgui/qth/QDropEvent.qth | 6 +- .../hbqt/qtgui/qth/QGraphicsEllipseItem.qth | 8 +-- .../hbqt/qtgui/qth/QGraphicsLineItem.qth | 8 +-- .../hbqt/qtgui/qth/QGraphicsPathItem.qth | 10 ++-- .../hbqt/qtgui/qth/QGraphicsPixmapItem.qth | 10 ++-- .../hbqt/qtgui/qth/QGraphicsPolygonItem.qth | 10 ++-- .../hbqt/qtgui/qth/QGraphicsRectItem.qth | 10 ++-- .../contrib/hbqt/qtgui/qth/QGraphicsScene.qth | 8 +-- .../qtgui/qth/QGraphicsSceneDragDropEvent.qth | 10 ++-- harbour/contrib/hbqt/qtgui/qth/QPixmap.qth | 2 +- harbour/contrib/hbqt/qtsql/qth/QSqlQuery.qth | 4 +- 22 files changed, 125 insertions(+), 120 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 1690977ac5..566c08e922 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,39 @@ The license applies to all entries newer than 2009-04-28. */ +2011-04-27 11:59 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * contrib/hbqt/hbmk2_qt.hbs + * contrib/hbqt/qtgui/hbqtgui.h + * contrib/hbqt/qtgui/qth/QGraphicsPathItem.qth + * contrib/hbqt/qtgui/qth/QBrush.qth + * contrib/hbqt/qtgui/qth/QGraphicsScene.qth + * contrib/hbqt/qtgui/qth/QGraphicsRectItem.qth + * contrib/hbqt/qtgui/qth/QGraphicsSceneDragDropEvent.qth + * contrib/hbqt/qtgui/qth/QGraphicsPolygonItem.qth + * contrib/hbqt/qtgui/qth/QGraphicsLineItem.qth + * contrib/hbqt/qtgui/qth/QDropEvent.qth + * contrib/hbqt/qtgui/qth/QGraphicsEllipseItem.qth + * contrib/hbqt/qtgui/qth/QGraphicsPixmapItem.qth + * contrib/hbqt/qtgui/qth/QPixmap.qth + * contrib/hbqt/qtcore/hbqt_pointer.cpp + * contrib/hbqt/qtcore/hbqt.h + * contrib/hbqt/qtcore/qth/QResource.qth + * contrib/hbqt/qtcore/qth/QMimeData.qth + * contrib/hbqt/qtcore/hbqtcore.h + * contrib/hbqt/qtcore/hbqt_hbqslots.cpp + * contrib/hbqt/qtcore/hbqt_hbqevents.cpp + * contrib/hbqt/qtsql/qth/QSqlQuery.qth + * hbqt_par_obj() -> hbqt_par_ptr() + * hbqt_gcpointer() -> hbqt_par_ptr() + * hbqt_pPtrFromObj() -> hbqt_par_ptr() + * hbqt_getObjectGC() -> hbqt_par_ptrGC() + * hbqt_detachgcpointer() -> hbqt_par_detach_ptrGC(), + retval set to void (from void *) + * hbqt_pPtrFromObject() -> hbqt_get_ptr() + * hbqt_set_pptr() renamed, cleaned, made static + ! hbqt_isObjectType() retval changed to HB_BOOL + - hbqt_getqtptr() deleted, unused + 2011-04-27 10:59 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/contrib/hbct/dattime3.c * set _SVID_SOURCE macro before any header files to enable stime() diff --git a/harbour/contrib/hbqt/hbmk2_qt.hbs b/harbour/contrib/hbqt/hbmk2_qt.hbs index e5edaf3875..56d68dd72c 100644 --- a/harbour/contrib/hbqt/hbmk2_qt.hbs +++ b/harbour/contrib/hbqt/hbmk2_qt.hbs @@ -1392,7 +1392,7 @@ METHOD HbQtSource:build() ELSE tmp := s:__enumKey() ENDIF - aadd( aLine, PadR( "#define hbqt_par_" + s:__enumKey() + "( n )", 64 ) + PadR( "( ( " + tmp, 48 ) + "* ) hbqt_gcpointer( n ) )" ) + aadd( aLine, PadR( "#define hbqt_par_" + s:__enumKey() + "( n )", 64 ) + PadR( "( ( " + tmp, 48 ) + "* ) hbqt_par_ptr( n ) )" ) NEXT aadd( aLine, "" ) FOR EACH s IN ::hRef @@ -1783,7 +1783,7 @@ METHOD HbQtSource:getReturnMethod( oMtd, lAddRet ) /* Manage detached Argument */ IF oMtd:nDetach > 0 - aadd( txt_, "hbqt_detachgcpointer( " + hb_ntos( oMtd:nDetach ) + " );" ) + aadd( txt_, "hbqt_par_detach_ptrGC( " + hb_ntos( oMtd:nDetach ) + " );" ) ENDIF nStrCnt := 0 @@ -1910,7 +1910,7 @@ METHOD HbQtSource:getMethodBody( oMtd, cMtdName, aMethods ) cTmp := ::cQtObject + iif( ::isList, "< void * >", "" ) - aadd( txt_, " " + cTmp + " * " + v + " = ( " + cTmp + " * ) hbqt_pPtrFromObj( 0 );" ) + aadd( txt_, " " + cTmp + " * " + v + " = ( " + cTmp + " * ) hbqt_par_ptr( 0 );" ) aadd( txt_, " if( " + v + " )" ) aadd( txt_, " {" ) diff --git a/harbour/contrib/hbqt/qtcore/hbqt.h b/harbour/contrib/hbqt/qtcore/hbqt.h index 31bae38020..986738b708 100644 --- a/harbour/contrib/hbqt/qtcore/hbqt.h +++ b/harbour/contrib/hbqt/qtcore/hbqt.h @@ -95,23 +95,22 @@ extern HB_EXPORT void hbqt_events_register_createobj( QEvent::Type eventtype, QB extern HB_EXPORT void hbqt_events_unregister_createobj( QEvent::Type eventtype ); extern HB_EXPORT void hbqt_slots_register_callback( QByteArray sig, PHBQT_SLOT_FUNC pCallback ); extern HB_EXPORT void hbqt_slots_unregister_callback( QByteArray sig ); -extern HB_EXPORT void * hbqt_gcpointer( int iParam ); -extern HB_EXPORT void * hbqt_detachgcpointer( int iParam ); + +extern HB_EXPORT void * hbqt_par_ptr( int iParam ); +extern HB_EXPORT HBQT_GC_T * hbqt_par_ptrGC( int iParam ); /* returns a pointer to the HBQT_GC_T area */ +extern HB_EXPORT void hbqt_par_detach_ptrGC( int iParam ); +extern HB_EXPORT void hbqt_itemPushReturn( void * ptr, PHB_ITEM pSelf ); +extern HB_EXPORT HB_U32 hbqt_getObjectType( int iParam ); +extern HB_EXPORT HB_BOOL hbqt_isObjectType( int iParam, HB_U32 iType ); /* check if parameter iParam is EXACTLY of type iType */ +extern HB_EXPORT void * hbqt_get_ptr( PHB_ITEM pObj ); + extern HB_EXPORT const HB_GC_FUNCS * hbqt_gcFuncs( void ); -extern HB_EXPORT void * hbqt_pPtrFromObj( int iParam ); -extern HB_EXPORT int hbqt_isObjectType( int iParam, HB_U32 iType ); /* check if parameter iParam is EXACTLY of type iType */ extern HB_EXPORT void hbqt_errRT_ARG( void ); extern HB_EXPORT PHB_ITEM hbqt_defineClassBegin( const char * szClsName, PHB_ITEM s_oClass, const char * szParentClsStr ); extern HB_EXPORT void hbqt_defineClassEnd( PHB_ITEM s_oClass, PHB_ITEM oClass ); -extern HB_EXPORT void * hbqt_getqtptr( void ); extern HB_EXPORT PHB_ITEM hbqt_create_object( void * pObject, const char * pszObjectName ); extern HB_EXPORT PHB_ITEM hbqt_create_objectGC( void * pObject, const char * pszObjectName ); -extern HB_EXPORT void hbqt_itemPushReturn( void * ptr, PHB_ITEM pSelf ); -extern HB_EXPORT void hbqt_set_pptr( void * ptr, PHB_ITEM pSelf ); -extern HB_EXPORT HBQT_GC_T * hbqt_getObjectGC( int iParam ); /* returns a pointer to the HBQT_GC_T area */ extern HB_EXPORT void hbqt_addDeleteList( PHB_ITEM item ); /* populate a list of PHB_ITEM to delete at exit time */ -extern HB_EXPORT HB_U32 hbqt_getObjectType( int iParam ); -extern HB_EXPORT void * hbqt_pPtrFromObject( PHB_ITEM pObj ); HB_EXTERN_END diff --git a/harbour/contrib/hbqt/qtcore/hbqt_hbqevents.cpp b/harbour/contrib/hbqt/qtcore/hbqt_hbqevents.cpp index 7d9cd4e222..774d9fc488 100644 --- a/harbour/contrib/hbqt/qtcore/hbqt_hbqevents.cpp +++ b/harbour/contrib/hbqt/qtcore/hbqt_hbqevents.cpp @@ -112,7 +112,7 @@ HBQEvents::HBQEvents( PHB_ITEM pObj ) : QObject() { if( pObj ) { - QObject * object = ( QObject * ) hbqt_pPtrFromObject( pObj ); + QObject * object = ( QObject * ) hbqt_get_ptr( pObj ); if( object ) { object->installEventFilter( this ); @@ -141,7 +141,7 @@ int HBQEvents::hbConnect( PHB_ITEM pObj, int type, PHB_ITEM bBlock ) if( true ) { - QObject * object = ( QObject * ) hbqt_pPtrFromObject( pObj ); + QObject * object = ( QObject * ) hbqt_get_ptr( pObj ); if( object ) { PHB_ITEM codeblock = hb_itemNew( bBlock ); @@ -184,7 +184,7 @@ int HBQEvents::hbDisconnect( PHB_ITEM pObj, int type ) { int nResult = -1; - QObject * object = ( QObject * ) hbqt_pPtrFromObject( pObj ); + QObject * object = ( QObject * ) hbqt_get_ptr( pObj ); if( object ) { char prop[ 20 ]; diff --git a/harbour/contrib/hbqt/qtcore/hbqt_hbqslots.cpp b/harbour/contrib/hbqt/qtcore/hbqt_hbqslots.cpp index 632d85420e..0d5b4ddda3 100644 --- a/harbour/contrib/hbqt/qtcore/hbqt_hbqslots.cpp +++ b/harbour/contrib/hbqt/qtcore/hbqt_hbqslots.cpp @@ -134,7 +134,7 @@ int HBQSlots::hbConnect( PHB_ITEM pObj, char * pszSignal, PHB_ITEM bBlock ) if( true ) { - QObject * object = ( QObject * ) hbqt_pPtrFromObject( pObj ); + QObject * object = ( QObject * ) hbqt_get_ptr( pObj ); if( object ) { PHB_ITEM pBlock = hb_itemNew( bBlock ); @@ -211,7 +211,7 @@ int HBQSlots::hbDisconnect( PHB_ITEM pObj, char * pszSignal ) { int nResult = 1; - QObject * object = ( QObject * ) hbqt_pPtrFromObject( pObj ); + QObject * object = ( QObject * ) hbqt_get_ptr( pObj ); if( object ) { int i = object->property( pszSignal ).toInt(); diff --git a/harbour/contrib/hbqt/qtcore/hbqt_pointer.cpp b/harbour/contrib/hbqt/qtcore/hbqt_pointer.cpp index 8b0953e3f8..b07745b30f 100644 --- a/harbour/contrib/hbqt/qtcore/hbqt_pointer.cpp +++ b/harbour/contrib/hbqt/qtcore/hbqt_pointer.cpp @@ -97,7 +97,7 @@ const HB_GC_FUNCS * hbqt_gcFuncs( void ) return &QT_gcFuncs; } -static void * hbqt_GCPointerFromItem( PHB_ITEM pObj ) +static void * s_hbqt_GCPointerFromItem( PHB_ITEM pObj ) { static PHB_DYNS s_pDyns_hPPtrAssign = NULL; @@ -118,37 +118,23 @@ static void * hbqt_GCPointerFromItem( PHB_ITEM pObj ) return NULL; } -void * hbqt_par_obj( int iParam ) +void * hbqt_par_ptr( int iParam ) { - HB_TRACE( HB_TR_DEBUG, ( "hbqt_par_obj( %d )", iParam ) ); + HB_TRACE( HB_TR_DEBUG, ( "hbqt_par_ptr( %d )", iParam ) ); - return hbqt_GCPointerFromItem( hb_param( iParam, HB_IT_ANY ) ); + return s_hbqt_GCPointerFromItem( hb_param( iParam, HB_IT_ANY ) ); } -void * hbqt_gcpointer( int iParam ) +void * hbqt_get_ptr( PHB_ITEM pObj ) { - HB_TRACE( HB_TR_DEBUG, ( "hbqt_gcpointer( %d )", iParam ) ); - - return hbqt_GCPointerFromItem( hb_param( iParam, HB_IT_ANY ) ); + return s_hbqt_GCPointerFromItem( pObj ); } -void * hbqt_pPtrFromObj( int iParam ) -{ - HB_TRACE( HB_TR_DEBUG, ( "hbqt_pPtrFromObj( %d )", iParam ) ); - - return hbqt_GCPointerFromItem( hb_param( iParam, HB_IT_ANY ) ); -} - -void * hbqt_pPtrFromObject( PHB_ITEM pObj ) -{ - return hbqt_GCPointerFromItem( pObj ); -} - -void hbqt_set_pptr( void * ptr, PHB_ITEM pSelf ) +static void s_hbqt_set_ptr( PHB_ITEM pSelf, void * ptr ) { static PHB_DYNS s_pDyns_hPPtrAssign = NULL; - HB_TRACE( HB_TR_DEBUG, ( "hbqt_set_pptr( ptr =%p, pSelf=%p )", ptr, pSelf ) ); + HB_TRACE( HB_TR_DEBUG, ( "s_hbqt_set_ptr( pSelf=%p, ptr=%p )", pSelf, ptr ) ); /* get the position of _PPTR member, the leading underscore because I want to write to it */ @@ -173,7 +159,7 @@ void hbqt_set_pptr( void * ptr, PHB_ITEM pSelf ) } else { - HB_TRACE( HB_TR_DEBUG, ( "hbqt_set_pptr(): returns NULL" ) ); + HB_TRACE( HB_TR_DEBUG, ( "s_hbqt_set_ptr(): returns NULL" ) ); return; /* TODO: Still better if RTE. */ } } @@ -188,13 +174,13 @@ void hbqt_itemPushReturn( void* ptr, PHB_ITEM pSelf ) if( ! pSelf ) pSelf = hb_stackSelfItem(); - hbqt_set_pptr( ptr, pSelf ); + s_hbqt_set_ptr( pSelf, ptr ); if( hb_stackReturnItem() != pSelf ) hb_itemReturn( pSelf ); } -HBQT_GC_T * hbqt_getObjectGC( int iParam ) +HBQT_GC_T * hbqt_par_ptrGC( int iParam ) { static PHB_DYNS s_pDyns_hPPtr = NULL; @@ -215,8 +201,7 @@ HBQT_GC_T * hbqt_getObjectGC( int iParam ) return NULL; } - -int hbqt_isObjectType( int iParam, HB_U32 iType ) +HB_BOOL hbqt_isObjectType( int iParam, HB_U32 iType ) { PHB_ITEM pItem; @@ -304,9 +289,9 @@ void hbqt_errRT_ARG( void ) hb_errRT_BASE( EG_ARG, 9999, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); } -void * hbqt_detachgcpointer( int iParam ) +void hbqt_par_detach_ptrGC( int iParam ) { - HB_TRACE( HB_TR_DEBUG, ( "hbqt_detachgcpointer( %d )", iParam ) ); + HB_TRACE( HB_TR_DEBUG, ( "hbqt_par_detach_ptrGC( %d )", iParam ) ); if( HB_ISOBJECT( iParam ) ) { @@ -322,8 +307,6 @@ void * hbqt_detachgcpointer( int iParam ) if( p && p->ph ) p->bNew = false; } - - return NULL; } HB_FUNC( __HBQT_ISPOINTER ) @@ -335,7 +318,7 @@ HB_FUNC( __HBQT_ISPOINTER ) HB_FUNC( HBQT_ISEQUAL ) { - hb_retl( hbqt_pPtrFromObj( 1 ) == hbqt_pPtrFromObj( 2 ) ); + hb_retl( hbqt_par_ptr( 1 ) == hbqt_par_ptr( 2 ) ); } HB_FUNC( __HBQT_ERROR ) @@ -448,16 +431,6 @@ void hbqt_defineClassEnd( PHB_ITEM s_oClass, PHB_ITEM oClass ) } } -void * hbqt_getqtptr( void ) -{ - PHB_ITEM pObj = hb_stackSelfItem(); - HBQT_GC_T * p = ( HBQT_GC_T * ) hb_arrayGetPtrGC( pObj, 1, hbqt_gcFuncs() ); - if( p && p->ph ) - return p->ph; - else - return NULL; -} - PHB_ITEM hbqt_create_object( void * pObject, const char * pszObjectName ) { PHB_ITEM pRetVal; diff --git a/harbour/contrib/hbqt/qtcore/hbqtcore.h b/harbour/contrib/hbqt/qtcore/hbqtcore.h index da2c62a5c4..92d6236fc4 100644 --- a/harbour/contrib/hbqt/qtcore/hbqtcore.h +++ b/harbour/contrib/hbqt/qtcore/hbqtcore.h @@ -19,9 +19,9 @@ extern HB_EXPORT void * hbqt_gcAllocate_HBQString( void * pObj, bool bNew ); HB_EXTERN_END -#define hbqt_par_HBQEvents( n ) ( ( HBQEvents * ) hbqt_gcpointer( n ) ) -#define hbqt_par_HBQSlots( n ) ( ( HBQSlots * ) hbqt_gcpointer( n ) ) -#define hbqt_par_HBQString( n ) ( ( HBQString * ) hbqt_gcpointer( n ) ) +#define hbqt_par_HBQEvents( n ) ( ( HBQEvents * ) hbqt_par_ptr( n ) ) +#define hbqt_par_HBQSlots( n ) ( ( HBQSlots * ) hbqt_par_ptr( n ) ) +#define hbqt_par_HBQString( n ) ( ( HBQString * ) hbqt_par_ptr( n ) ) #define HBQT_TYPE_QSize ( ( HB_U32 ) 0xD1575132 ) diff --git a/harbour/contrib/hbqt/qtcore/qth/QMimeData.qth b/harbour/contrib/hbqt/qtcore/qth/QMimeData.qth index 32b89214bd..d7673918a9 100644 --- a/harbour/contrib/hbqt/qtcore/qth/QMimeData.qth +++ b/harbour/contrib/hbqt/qtcore/qth/QMimeData.qth @@ -65,7 +65,7 @@ QList urls () const # Harbour Callable Function Till QList is not resolved # QStringList * hbUrlList() const{ - QMimeData * _mimedata = ( QMimeData * ) hbqt_pPtrFromObj( 0 ); + QMimeData * _mimedata = ( QMimeData * ) hbqt_par_ptr( 0 ); if( _mimedata ) { QStringList strList; diff --git a/harbour/contrib/hbqt/qtcore/qth/QResource.qth b/harbour/contrib/hbqt/qtcore/qth/QResource.qth index f7217434f1..a51a980335 100644 --- a/harbour/contrib/hbqt/qtcore/qth/QResource.qth +++ b/harbour/contrib/hbqt/qtcore/qth/QResource.qth @@ -56,7 +56,7 @@ void setLocale ( const QLocale & locale ) qint64 size () const bool registerResource ( const QString & rccFileName, const QString & mapRoot = QString() ) { - QResource * _resource = ( QResource * ) hbqt_pPtrFromObj( 0 ); + QResource * _resource = ( QResource * ) hbqt_par_ptr( 0 ); if( _resource ) { int pcount = hb_pcount(); @@ -74,7 +74,7 @@ bool registerResource ( const QString & rccFileName, const QString & mapRoot = Q } bool registerResource_1 ( const uchar * rccData, const QString & mapRoot = QString() ) { - QResource * _resource = ( QResource * ) hbqt_pPtrFromObj( 0 ); + QResource * _resource = ( QResource * ) hbqt_par_ptr( 0 ); if( _resource ) { int pcount = hb_pcount(); @@ -92,7 +92,7 @@ bool registerResource_1 ( const uchar * rccData, const QString & mapRoot = QStri QStringList searchPaths () bool unregisterResource ( const QString & rccFileName, const QString & mapRoot = QString() ) { - QResource * _resource = ( QResource * ) hbqt_pPtrFromObj( 0 ); + QResource * _resource = ( QResource * ) hbqt_par_ptr( 0 ); if( _resource ) { int pcount = hb_pcount(); @@ -110,7 +110,7 @@ bool unregisterResource ( const QString & rccFileName, const QString & mapRoot = } bool unregisterResource_1 ( const uchar * rccData, const QString & mapRoot = QString() ) { - QResource * _resource = ( QResource * ) hbqt_pPtrFromObj( 0 ); + QResource * _resource = ( QResource * ) hbqt_par_ptr( 0 ); if( _resource ) { int pcount = hb_pcount(); diff --git a/harbour/contrib/hbqt/qtgui/hbqtgui.h b/harbour/contrib/hbqt/qtgui/hbqtgui.h index c9ccbe79cb..d063cb8c5f 100644 --- a/harbour/contrib/hbqt/qtgui/hbqtgui.h +++ b/harbour/contrib/hbqt/qtgui/hbqtgui.h @@ -20,14 +20,14 @@ extern HB_EXPORT void * hbqt_gcAllocate_QLayout( void * pObj, bool bNew ); HB_EXTERN_END -#define hbqt_par_QAction( n ) ( ( QAction * ) hbqt_gcpointer( n ) ) -#define hbqt_par_QContextMenuEvent( n ) ( ( QContextMenuEvent * ) hbqt_gcpointer( n ) ) -#define hbqt_par_QPalette( n ) ( ( QPalette * ) hbqt_gcpointer( n ) ) -#define hbqt_par_QRegion( n ) ( ( QRegion * ) hbqt_gcpointer( n ) ) -#define hbqt_par_QPainter( n ) ( ( QPainter * ) hbqt_gcpointer( n ) ) -#define hbqt_par_QPixmap( n ) ( ( QPixmap * ) hbqt_gcpointer( n ) ) -#define hbqt_par_QPrinter( n ) ( ( QPrinter * ) hbqt_gcpointer( n ) ) -#define hbqt_par_QWidget( n ) ( ( QWidget * ) hbqt_gcpointer( n ) ) +#define hbqt_par_QAction( n ) ( ( QAction * ) hbqt_par_ptr( n ) ) +#define hbqt_par_QContextMenuEvent( n ) ( ( QContextMenuEvent * ) hbqt_par_ptr( n ) ) +#define hbqt_par_QPalette( n ) ( ( QPalette * ) hbqt_par_ptr( n ) ) +#define hbqt_par_QRegion( n ) ( ( QRegion * ) hbqt_par_ptr( n ) ) +#define hbqt_par_QPainter( n ) ( ( QPainter * ) hbqt_par_ptr( n ) ) +#define hbqt_par_QPixmap( n ) ( ( QPixmap * ) hbqt_par_ptr( n ) ) +#define hbqt_par_QPrinter( n ) ( ( QPrinter * ) hbqt_par_ptr( n ) ) +#define hbqt_par_QWidget( n ) ( ( QWidget * ) hbqt_par_ptr( n ) ) #define HBQT_TYPE_QBrush ( ( HB_U32 ) 0x94319C70 ) #define HBQT_TYPE_QColor ( ( HB_U32 ) 0x03C0065A ) diff --git a/harbour/contrib/hbqt/qtgui/qth/QBrush.qth b/harbour/contrib/hbqt/qtgui/qth/QBrush.qth index f2ade4765e..beb425e1f1 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QBrush.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QBrush.qth @@ -43,7 +43,7 @@ HB_FUNC( QT_QBRUSH ) { if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) ) { - HBQT_GC_T * q = ( HBQT_GC_T * ) hbqt_getObjectGC( 1 ); + HBQT_GC_T * q = ( HBQT_GC_T * ) hbqt_par_ptrGC( 1 ); if( q ) { if( q->type == HBQT_TYPE_QBrush ) diff --git a/harbour/contrib/hbqt/qtgui/qth/QDropEvent.qth b/harbour/contrib/hbqt/qtgui/qth/QDropEvent.qth index ad06cbe226..15a3819b03 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QDropEvent.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QDropEvent.qth @@ -15,7 +15,7 @@ QObject = no Inherits = QEvent Type = Core -New = +New = Constructor = no @@ -48,11 +48,11 @@ void acceptProposedAction () Qt::DropAction dropAction () const Qt::KeyboardModifiers keyboardModifiers () const -# This function is OK if called as line below, but do not found a way +# This function is OK if called as line below, but do not found a way # how to construct dynamically - no separate keyword ??? # const QMimeData * mimeData () const{ - QDropEvent * p = ( QDropEvent * ) hbqt_pPtrFromObj( 0 ); + QDropEvent * p = ( QDropEvent * ) hbqt_par_ptr( 0 ); if( p ) { hbqt_create_objectGC( hbqt_gcAllocate_QMimeData( ( void* ) p->mimeData(), false ), "hb_QMimeData" ); diff --git a/harbour/contrib/hbqt/qtgui/qth/QGraphicsEllipseItem.qth b/harbour/contrib/hbqt/qtgui/qth/QGraphicsEllipseItem.qth index 37bf7b7ca8..cbef895784 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QGraphicsEllipseItem.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QGraphicsEllipseItem.qth @@ -14,8 +14,8 @@ QObject = no Inherit = QAbstractGraphicsShapeItem -Type = -New = +Type = +New = @@ -36,14 +36,14 @@ HB_FUNC( QT_QGRAPHICSELLIPSEITEM ) } else if( hb_pcount() >= 1 && HB_ISOBJECT( 1 ) ) { - HBQT_GC_T * p = ( HBQT_GC_T * ) hbqt_pPtrFromObj( 1 ); + HBQT_GC_T * p = ( HBQT_GC_T * ) hbqt_par_ptr( 1 ); if( p->type == HBQT_TYPE_QRectF ) { __HB_RETPTRGC__( new QGraphicsEllipseItem( *hbqt_par_QRectF( 1 ), ( HB_ISOBJECT( 2 ) ? hbqt_par_QGraphicsItem( 2 ) : 0 ) ) ); } else { - __HB_RETPTRGC__( new QGraphicsEllipseItem( hbqt_par_QGraphicsItem( 1 ) ) ); + __HB_RETPTRGC__( new QGraphicsEllipseItem( hbqt_par_QGraphicsItem( 1 ) ) ); } } else diff --git a/harbour/contrib/hbqt/qtgui/qth/QGraphicsLineItem.qth b/harbour/contrib/hbqt/qtgui/qth/QGraphicsLineItem.qth index f99322a100..e11ca7dab5 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QGraphicsLineItem.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QGraphicsLineItem.qth @@ -14,8 +14,8 @@ QObject = no Inherit = QGraphicsItem -Type = -New = +Type = +New = @@ -37,14 +37,14 @@ HB_FUNC( QT_QGRAPHICSLINEITEM ) } else if( hb_pcount() >= 1 && HB_ISOBJECT( 1 ) ) { - HBQT_GC_T * p = ( HBQT_GC_T * ) hbqt_pPtrFromObj( 1 ); + HBQT_GC_T * p = ( HBQT_GC_T * ) hbqt_par_ptr( 1 ); if( p->type == HBQT_TYPE_QLineF ) { __HB_RETPTRGC__( new QGraphicsLineItem( *hbqt_par_QLineF( 1 ), ( HB_ISOBJECT( 2 ) ? hbqt_par_QGraphicsItem( 2 ) : 0 ) ) ); } else { - __HB_RETPTRGC__( new QGraphicsLineItem( hbqt_par_QGraphicsItem( 1 ) ) ); + __HB_RETPTRGC__( new QGraphicsLineItem( hbqt_par_QGraphicsItem( 1 ) ) ); } } else diff --git a/harbour/contrib/hbqt/qtgui/qth/QGraphicsPathItem.qth b/harbour/contrib/hbqt/qtgui/qth/QGraphicsPathItem.qth index 0b969bdc8b..08cce1e0f3 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QGraphicsPathItem.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QGraphicsPathItem.qth @@ -14,8 +14,8 @@ QObject = no Inherit = QAbstractGraphicsShapeItem -Type = -New = +Type = +New = @@ -31,20 +31,20 @@ HB_FUNC( QT_QGRAPHICSPATHITEM ) { if( hb_pcount() >= 1 && HB_ISOBJECT( 1 ) ) { - HBQT_GC_T * p = ( HBQT_GC_T * ) hbqt_pPtrFromObj( 1 ); + HBQT_GC_T * p = ( HBQT_GC_T * ) hbqt_par_ptr( 1 ); if( p->type == HBQT_TYPE_QPainterPath ) { __HB_RETPTRGC__( new QGraphicsPathItem( *hbqt_par_QPainterPath( 1 ), ( HB_ISOBJECT( 2 ) ? hbqt_par_QGraphicsItem( 2 ) : 0 ) ) ); } else { - __HB_RETPTRGC__( new QGraphicsPathItem( hbqt_par_QGraphicsItem( 1 ) ) ); + __HB_RETPTRGC__( new QGraphicsPathItem( hbqt_par_QGraphicsItem( 1 ) ) ); } } else { __HB_RETPTRGC__( new QGraphicsPathItem() ); - } + } } diff --git a/harbour/contrib/hbqt/qtgui/qth/QGraphicsPixmapItem.qth b/harbour/contrib/hbqt/qtgui/qth/QGraphicsPixmapItem.qth index 1d6a0616eb..85b247d058 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QGraphicsPixmapItem.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QGraphicsPixmapItem.qth @@ -14,8 +14,8 @@ QObject = no Inherit = QGraphicsItem -Type = -New = +Type = +New = @@ -31,20 +31,20 @@ HB_FUNC( QT_QGRAPHICSPIXMAPITEM ) { if( hb_pcount() >= 1 && HB_ISOBJECT( 1 ) ) { - HBQT_GC_T * p = ( HBQT_GC_T * ) hbqt_pPtrFromObj( 1 ); + HBQT_GC_T * p = ( HBQT_GC_T * ) hbqt_par_ptr( 1 ); if( p->type == HBQT_TYPE_QPixmap ) { __HB_RETPTRGC__( new QGraphicsPixmapItem( *hbqt_par_QPixmap( 1 ), ( HB_ISOBJECT( 2 ) ? hbqt_par_QGraphicsItem( 2 ) : 0 ) ) ); } else { - __HB_RETPTRGC__( new QGraphicsPixmapItem( hbqt_par_QGraphicsItem( 1 ) ) ); + __HB_RETPTRGC__( new QGraphicsPixmapItem( hbqt_par_QGraphicsItem( 1 ) ) ); } } else { __HB_RETPTRGC__( new QGraphicsPixmapItem() ); - } + } } diff --git a/harbour/contrib/hbqt/qtgui/qth/QGraphicsPolygonItem.qth b/harbour/contrib/hbqt/qtgui/qth/QGraphicsPolygonItem.qth index 86e57b8efe..c594c2a761 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QGraphicsPolygonItem.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QGraphicsPolygonItem.qth @@ -14,8 +14,8 @@ QObject = no Inherit = QAbstractGraphicsShapeItem -Type = -New = +Type = +New = @@ -31,20 +31,20 @@ HB_FUNC( QT_QGRAPHICSPOLYGONITEM ) { if( hb_pcount() >= 1 && HB_ISOBJECT( 1 ) ) { - HBQT_GC_T * p = ( HBQT_GC_T * ) hbqt_pPtrFromObj( 1 ); + HBQT_GC_T * p = ( HBQT_GC_T * ) hbqt_par_ptr( 1 ); if( p->type == HBQT_TYPE_QPolygonF ) { __HB_RETPTRGC__( new QGraphicsPolygonItem( *hbqt_par_QPolygonF( 1 ), ( HB_ISOBJECT( 2 ) ? hbqt_par_QGraphicsItem( 2 ) : 0 ) ) ); } else { - __HB_RETPTRGC__( new QGraphicsPolygonItem( hbqt_par_QGraphicsItem( 1 ) ) ); + __HB_RETPTRGC__( new QGraphicsPolygonItem( hbqt_par_QGraphicsItem( 1 ) ) ); } } else { __HB_RETPTRGC__( new QGraphicsPolygonItem() ); - } + } } diff --git a/harbour/contrib/hbqt/qtgui/qth/QGraphicsRectItem.qth b/harbour/contrib/hbqt/qtgui/qth/QGraphicsRectItem.qth index 98dd689778..94fc168217 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QGraphicsRectItem.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QGraphicsRectItem.qth @@ -13,9 +13,9 @@ QObject = no -Inherit = QAbstractGraphicsShapeItem -Type = -New = +Inherit = QAbstractGraphicsShapeItem +Type = +New = @@ -36,14 +36,14 @@ HB_FUNC( QT_QGRAPHICSRECTITEM ) } else if( hb_pcount() >= 1 && HB_ISOBJECT( 1 ) ) { - HBQT_GC_T * p = ( HBQT_GC_T * ) hbqt_pPtrFromObj( 1 ); + HBQT_GC_T * p = ( HBQT_GC_T * ) hbqt_par_ptr( 1 ); if( p->type == HBQT_TYPE_QRectF ) { __HB_RETPTRGC__( new QGraphicsRectItem( *hbqt_par_QRectF( 1 ), ( HB_ISOBJECT( 2 ) ? hbqt_par_QGraphicsItem( 2 ) : 0 ) ) ); } else { - __HB_RETPTRGC__( new QGraphicsRectItem( hbqt_par_QGraphicsItem( 1 ) ) ); + __HB_RETPTRGC__( new QGraphicsRectItem( hbqt_par_QGraphicsItem( 1 ) ) ); } } else diff --git a/harbour/contrib/hbqt/qtgui/qth/QGraphicsScene.qth b/harbour/contrib/hbqt/qtgui/qth/QGraphicsScene.qth index 110bb74eb7..12ee7350f3 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QGraphicsScene.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QGraphicsScene.qth @@ -14,8 +14,8 @@ QObject = yes Inherit = QObject -Type = -New = +Type = +New = @@ -36,14 +36,14 @@ HB_FUNC( QT_QGRAPHICSSCENE ) } else if( hb_pcount() >= 1 && HB_ISOBJECT( 1 ) ) { - HBQT_GC_T * p = ( HBQT_GC_T * ) hbqt_pPtrFromObj( 1 ); + HBQT_GC_T * p = ( HBQT_GC_T * ) hbqt_par_ptr( 1 ); if( p->type == HBQT_TYPE_QRectF ) { __HB_RETPTRGC__( new QGraphicsScene( *hbqt_par_QRectF( 1 ), ( HB_ISOBJECT( 2 ) ? hbqt_par_QObject( 2 ) : 0 ) ) ); } else { - __HB_RETPTRGC__( new QGraphicsScene( hbqt_par_QObject( 1 ) ) ); + __HB_RETPTRGC__( new QGraphicsScene( hbqt_par_QObject( 1 ) ) ); } } else diff --git a/harbour/contrib/hbqt/qtgui/qth/QGraphicsSceneDragDropEvent.qth b/harbour/contrib/hbqt/qtgui/qth/QGraphicsSceneDragDropEvent.qth index afe21ab037..425d85a1e9 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QGraphicsSceneDragDropEvent.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QGraphicsSceneDragDropEvent.qth @@ -14,9 +14,9 @@ QObject = no Inherit = QGraphicsSceneEvent -Type = -New = -Constructor = +Type = +New = +Constructor = @@ -27,7 +27,7 @@ Constructor = #include -/* +/* * QGraphicsSceneDragDropEvent () * ~QGraphicsSceneDragDropEvent () */ @@ -45,7 +45,7 @@ void acceptProposedAction () Qt::MouseButtons buttons () const Qt::DropAction dropAction () const const QMimeData * mimeData () const{ - QGraphicsSceneDragDropEvent * _graphicsscenedragdropevent = ( QGraphicsSceneDragDropEvent * ) hbqt_pPtrFromObj( 0 ); + QGraphicsSceneDragDropEvent * _graphicsscenedragdropevent = ( QGraphicsSceneDragDropEvent * ) hbqt_par_ptr( 0 ); if( _graphicsscenedragdropevent ) { hbqt_create_objectGC( hbqt_gcAllocate_QMimeData( ( void* ) _graphicsscenedragdropevent->mimeData(), false ), "hb_QMimeData" ); diff --git a/harbour/contrib/hbqt/qtgui/qth/QPixmap.qth b/harbour/contrib/hbqt/qtgui/qth/QPixmap.qth index 05a83ceb67..9f695b7e51 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QPixmap.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QPixmap.qth @@ -40,7 +40,7 @@ HB_FUNC( QT_QPIXMAP ) } else if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) ) { - HBQT_GC_T * q = ( HBQT_GC_T * ) hbqt_pPtrFromObj( 1 ); + HBQT_GC_T * q = ( HBQT_GC_T * ) hbqt_par_ptr( 1 ); if( q ) { if( q->type == HBQT_TYPE_QPixmap ) diff --git a/harbour/contrib/hbqt/qtsql/qth/QSqlQuery.qth b/harbour/contrib/hbqt/qtsql/qth/QSqlQuery.qth index a91cdffcd4..d2bd8bdd03 100644 --- a/harbour/contrib/hbqt/qtsql/qth/QSqlQuery.qth +++ b/harbour/contrib/hbqt/qtsql/qth/QSqlQuery.qth @@ -97,7 +97,7 @@ QVariant boundValue ( int pos ) const QMap boundValues () const void clear () const QSqlDriver * driver () const{ - QSqlQuery * p = ( QSqlQuery * ) hbqt_pPtrFromObj( 0 ); + QSqlQuery * p = ( QSqlQuery * ) hbqt_par_ptr( 0 ); if( p ) { hbqt_create_objectGC( hbqt_gcAllocate_QSqlDriver( ( void* ) p->driver(), true ), "hb_QSqlDriver" ); @@ -126,7 +126,7 @@ bool prepare ( const QString & query ) bool previous () QSqlRecord record () const const QSqlResult * result () const{ - QSqlQuery * p = ( QSqlQuery * ) hbqt_pPtrFromObj( 0 ); + QSqlQuery * p = ( QSqlQuery * ) hbqt_par_ptr( 0 ); if( p ) { hbqt_create_objectGC( hbqt_gcAllocate_QSqlResult( ( void* ) p->result(), true ), "hb_QSqlResult" );