2011-02-11 21:33 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* contrib/hbqt/qtcore/hbqt_pointer.cpp
* contrib/hbqt/qtcore/hbqt.h
+ Added int hbqt_IsObjectType( int iParam, int iType ).
[Francesco Perillo - with some of my mods]
This commit is contained in:
@@ -16,6 +16,12 @@
|
||||
The license applies to all entries newer than 2009-04-28.
|
||||
*/
|
||||
|
||||
2011-02-11 21:33 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* contrib/hbqt/qtcore/hbqt_pointer.cpp
|
||||
* contrib/hbqt/qtcore/hbqt.h
|
||||
+ Added int hbqt_IsObjectType( int iParam, int iType ).
|
||||
[Francesco Perillo - with some of my mods]
|
||||
|
||||
2011-02-11 19:27 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* src/rtl/base64d.c
|
||||
! Err...
|
||||
|
||||
@@ -93,6 +93,7 @@ extern HB_EXPORT void * hbqt_gcpointer( int iParam );
|
||||
extern HB_EXPORT void * hbqt_detachgcpointer( int iParam );
|
||||
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, int iType );
|
||||
extern HB_EXPORT void hbqt_errRT_ARG( void );
|
||||
|
||||
HB_EXTERN_END
|
||||
|
||||
@@ -186,6 +186,36 @@ void * hbqt_pPtrFromObj( int iParam )
|
||||
}
|
||||
}
|
||||
|
||||
int hbqt_IsObjectType( int iParam, int iType )
|
||||
{
|
||||
PHB_ITEM pItem;
|
||||
|
||||
HB_TRACE( HB_TR_DEBUG, ( "hbqt_IsObjectType( %d )", iParam ) );
|
||||
|
||||
if( ( pItem = hb_param( iParam, HB_IT_OBJECT ) ) != NULL )
|
||||
{
|
||||
HBQT_GC_T * p;
|
||||
|
||||
hb_vmPushSymbol( hb_dynsymSymbol( hb_dynsymFindName( "PPTR" ) ) );
|
||||
hb_vmPush( pItem );
|
||||
hb_vmSend( 0 );
|
||||
|
||||
pItem = hb_param( -1, HB_IT_POINTER );
|
||||
|
||||
if( pItem )
|
||||
{
|
||||
p = ( HBQT_GC_T * ) hb_itemGetPtrGC( pItem, hbqt_gcFuncs() );
|
||||
|
||||
if( p && p->ph )
|
||||
return p->type == iType;
|
||||
}
|
||||
}
|
||||
|
||||
/* hbqt_errRT_ARG(); */ /* NOTE: Could not check type for whatever reason */
|
||||
|
||||
return HB_FALSE;
|
||||
}
|
||||
|
||||
HB_FUNC( HBQT_ISOBJECT )
|
||||
{
|
||||
PHB_ITEM pParam = hb_param( 1, HB_IT_OBJECT );
|
||||
|
||||
Reference in New Issue
Block a user