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:
Pritpal Bedi
2012-05-07 08:08:58 +00:00
parent 8fd32d2325
commit c5f23b422e
2 changed files with 13 additions and 1 deletions

View File

@@ -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

View File

@@ -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;
}