Hello All

/*
 * QWidget( QWidget * parent = 0, Qt::WindowFlags f = 0 )
 * ~QWidget ()
 */
HB_FUNC( QT_QWIDGET )
{
   void ** ph = ( void ** ) hb_gcAlloc( sizeof( void * ), QObject_release );
   QPointer< QWidget > pObj = new QWidget( hbqt_par_QWidget( 1 ), (
Qt::WindowFlags ) hb_parni( 2 ) ) ;
   * ph = pObj;
   hb_retptrGC( ph );
}

Above is a .prg callable function in QWidget.cpp.

At another function of same .cpp ( or from any other .cpp ) we need to 
create a new instance of same or another class, like 

/*
 * QSize size () const
 */
HB_FUNC( QT_QWIDGET_SIZE )
{
   void ** ph = ( void ** ) hb_gcAlloc( sizeof( void * ), QObject_release );
   * ph = new QSize( hbqt_par_QWidget( 1 )->size() ) ;
   hb_retptrGC( ph );
}

At this point I need to call the constructor function from QSize.cpp but 
that is a .prg callable function. I know that I can execute
    HB_FUNC_EXEC( QT_QSIZE )
but this call effectively transfers its own parameter stack to called
function.
I do not know to send the parametrs which effectively are obtained from
calling
function only, in above case, QSize( hbqt_par_QWidget( 1 )->size() ).
                                                 ^^^^^^^^^^^^^^^^^^^
Is there a way to do so, or any C equivalent funtion which returns the 
hb_retptrGC( ph ); . It must be done dynamically as number and type of
parameters 
are unknown at parse time.

This is not a show=stopper but effectively eliminates the need to generate
sources
with repetitions.

Regards
Pritpal Bedi





-- 
View this message in context: 
http://www.nabble.com/HBQT---HBXBP-%3A-Garbage-Collection-tp25813841p25866026.html
Sent from the Harbour - Dev mailing list archive at Nabble.com.

_______________________________________________
Harbour mailing list
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to