Hi Pritpal,

> I implemented it for method calls only. There are a couple of 
> functions which require pointer only so this macro is usable
> for those instances. 
> 
> Qt_Connect_Signal()/Qt_DisConnect_Signal(), Qt_findChild(), 
> and like functions. I just do not know how to retrieve "PPTR" from 
> an object in C++.

Here it is:

   if( HB_IS_OBJECT( pParam ) && hb_objHasMsg( pParam, "PPTR" ) && 0 )
   {
      hb_vmPushDynSym( hb_dynsymGetCase( "PPTR" ) );
      hb_vmPush( pParam );
      hb_vmSend( 0 );
      {
         PHB_ITEM pReturn = hb_stackReturnItem();

         QGC_POINTER * p = ( QGC_POINTER * ) hb_itemGetPtrGC( pReturn, 
gcFuncs() );

         if( p && p->ph )
            pRetVal = p->ph;
         else
            pRetVal = hb_itemGetPtr( pReturn ); /* TOFIX: This is dangerous. */
      }
   }

And there is also HBQT_ISEQUALGCQTPOINTER.

Brgds,
Viktor

_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to