2012-05-07 01:04 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbqt/qtcore/hbqt_pointer.cpp
+ Added: hbqt_par_isDerivedFrom() - protection against a null
pointer passed as an argument. This makes possible to detect
if an object is still active when passed. If not, a RTE is
generated. This covers some more potential user mistakes.
This commit is contained in:
@@ -16,6 +16,13 @@
|
||||
The license applies to all entries newer than 2009-04-28.
|
||||
*/
|
||||
|
||||
2012-05-07 01:04 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
|
||||
* contrib/hbqt/qtcore/hbqt_pointer.cpp
|
||||
+ Added: hbqt_par_isDerivedFrom() - protection against a null
|
||||
pointer passed as an argument. This makes possible to detect
|
||||
if an object is still active when passed. If not, a RTE is
|
||||
generated. This covers some more potential user mistakes.
|
||||
|
||||
2012-05-07 00:57 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
|
||||
* contrib/hbqt/qtgui/qth/HBQGraphicsItem.qth
|
||||
* contrib/hbqt/qtgui/qth/HBQGraphicsScene.qth
|
||||
|
||||
@@ -491,7 +491,12 @@ HB_BOOL hbqt_par_isDerivedFrom( int iParam, const char * pszClsName )
|
||||
HB_TRACE( HB_TR_DEBUG, ( "hbqt_par_isDerivedFrom( %i, %s )", iParam, pszClsName ) );
|
||||
|
||||
if( ( pItem = hb_param( iParam, HB_IT_OBJECT ) ) != NULL )
|
||||
return hbqt_obj_isDerivedFrom( pItem, pszClsName );
|
||||
{
|
||||
if( s_hbqt_GCPointerFromItem( pItem ) == NULL )
|
||||
hb_errRT_BASE( EG_ARG, 9999, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
|
||||
else
|
||||
return hbqt_obj_isDerivedFrom( pItem, pszClsName );
|
||||
}
|
||||
|
||||
return HB_FALSE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user