2010-01-18 19:57 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* src/common/hbwince.c
- Deleted definition of FreeResource(). It's noe used anywhere
in Harbour, and its declaration was also missing.
* contrib/hbqt/hbqt.h
* contrib/hbqt/hbqt_destruct.cpp
- Deleted no longer used macros: hbqt_ret_*().
+ Added TOFIX to hbqt_par_*() where essentially the GC
pointer type checking is completely worked around, which
makes it easy to create GPFs by passing wrong pointer
type to functions. Probably its unavoidable to introduce
parameter validation to HBQT wrappers. Such validation
could decide which types are accepted (f.e. objects and
parent objects, whether NULL is accepted or rejected).
If not accepted a proper RTE should be thrown instead
of letting the app GPF.
+ Added two TOFIXes where low-level parameter
retrieving function returns NULL.
This commit is contained in:
@@ -17,6 +17,26 @@
|
||||
past entries belonging to author(s): Viktor Szakats.
|
||||
*/
|
||||
|
||||
2010-01-18 19:57 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* src/common/hbwince.c
|
||||
- Deleted definition of FreeResource(). It's noe used anywhere
|
||||
in Harbour, and its declaration was also missing.
|
||||
|
||||
* contrib/hbqt/hbqt.h
|
||||
* contrib/hbqt/hbqt_destruct.cpp
|
||||
- Deleted no longer used macros: hbqt_ret_*().
|
||||
+ Added TOFIX to hbqt_par_*() where essentially the GC
|
||||
pointer type checking is completely worked around, which
|
||||
makes it easy to create GPFs by passing wrong pointer
|
||||
type to functions. Probably its unavoidable to introduce
|
||||
parameter validation to HBQT wrappers. Such validation
|
||||
could decide which types are accepted (f.e. objects and
|
||||
parent objects, whether NULL is accepted or rejected).
|
||||
If not accepted a proper RTE should be thrown instead
|
||||
of letting the app GPF.
|
||||
+ Added two TOFIXes where low-level parameter
|
||||
retrieving function returns NULL.
|
||||
|
||||
2010-01-18 09:55 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)
|
||||
* contrib/hbide/hbide.prg
|
||||
* contrib/hbide/ideactions.prg
|
||||
@@ -33,7 +53,7 @@
|
||||
+ Prepared: to allow extended book-"Mark" feature.
|
||||
+ Prepared: to handle extended syntax highlighting.
|
||||
! More artifacts I must be missing.
|
||||
|
||||
|
||||
2010-01-18 09:14 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)
|
||||
* contrib/hbqt/hbqt.h
|
||||
* contrib/hbqt/hbqt_base.cpp
|
||||
@@ -61,12 +81,12 @@
|
||||
+ contrib/hbqt/qth/HBEvents.qth
|
||||
+ contrib/hbqt/qth/HBSlots.qth
|
||||
+ Prepared to bring Events/Slots management on OO level.
|
||||
Stll not activated as I have some technical issues on
|
||||
Stll not activated as I have some technical issues on
|
||||
c++ level. Just a matter of time...
|
||||
|
||||
* contrib/hbqt/generator/hbqtgen.prg
|
||||
* contrib/hbqt/generator/qt45.qtp
|
||||
|
||||
|
||||
+ This commit is generally towards separation of static/auto
|
||||
generated parts of classes which has been hanging in for
|
||||
manual updates to the structures indivisually if changes
|
||||
|
||||
@@ -86,6 +86,8 @@ extern void * hbqt_pPtrFromItem( PHB_ITEM pObj );
|
||||
|
||||
#include "hbqt_garbage.h"
|
||||
|
||||
/* TOFIX: Here basically we're using GC pointers without pointer type identification,
|
||||
which means that it's very easy to cause a GPF by passing wrong type. */
|
||||
#define hbqt_par_ExtensionOption( n ) ( ( ExtensionOption * ) hbqt_gcpointer( n ) )
|
||||
#define hbqt_par_IUnknown( n ) ( ( IUnknown * ) hbqt_gcpointer( n ) )
|
||||
#define hbqt_par_QAbstractButton( n ) ( ( QAbstractButton * ) hbqt_gcpointer( n ) )
|
||||
@@ -398,9 +400,4 @@ extern void * hbqt_pPtrFromItem( PHB_ITEM pObj );
|
||||
#define hbqt_par_Bool( n ) ( hb_parl( n ) )
|
||||
#define hbqt_par_char( n ) ( hb_parcx( n ) )
|
||||
|
||||
#define hbqt_ret_QWidget( p ) ( hb_retptr( ( QWidget* ) p ) )
|
||||
#define hbqt_ret_QAbstractItemDelegate( p ) ( hb_retptr( ( QAbstractItemDelegate* ) p ) )
|
||||
#define hbqt_ret_QAbstractItemModel( p ) ( hb_retptr( ( QAbstractItemModel* ) p ) )
|
||||
#define hbqt_ret_QPrinter( p ) ( hb_retptr( ( QPrinter* ) p ) )
|
||||
|
||||
#endif /* __HBQT_H */
|
||||
|
||||
@@ -119,7 +119,7 @@ void * hbqt_pPtrFromItem( PHB_ITEM pObj )
|
||||
else if( hb_itemType( pObj ) == HB_IT_POINTER )
|
||||
return hbqt_gcpointerFromItem( pObj );
|
||||
else
|
||||
return NULL;
|
||||
return NULL; /* TODO: Still better if RTE. */
|
||||
}
|
||||
|
||||
void * hbqt_pPtrFromObj( int iParam )
|
||||
@@ -137,7 +137,7 @@ void * hbqt_pPtrFromObj( int iParam )
|
||||
else if( hb_itemType( pObj ) == HB_IT_POINTER )
|
||||
return hbqt_gcpointer( iParam );
|
||||
else
|
||||
return NULL;
|
||||
return NULL; /* TODO: Still better if RTE. */
|
||||
}
|
||||
|
||||
HB_FUNC( HBQT_SETCODECFORCSTRINGS )
|
||||
|
||||
@@ -333,12 +333,6 @@ int WINAPI MulDiv( int nNumber, int nNumerator, int nDenominator )
|
||||
}
|
||||
#endif /* __MINGW32CE__ */
|
||||
|
||||
BOOL WINAPI FreeResource( HGLOBAL h )
|
||||
{
|
||||
HB_SYMBOL_UNUSED( h );
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL WINAPI Arc( HDC h, int p1, int p2, int p3, int p4, int p5, int p6, int p7, int p8 )
|
||||
{
|
||||
HB_SYMBOL_UNUSED( h );
|
||||
|
||||
Reference in New Issue
Block a user