Hello Przemek

There is a slight change as follows and it works.
This is not a proper change so show me what is the 
proper code skeleton.


   QWidget * hbqt_par_QWidget( int iParam )
   {
      QPointer< QWidget > * pObj;
      QWidget * obj = NULL;

      pObj = ( QPointer< QWidget > * ) hb_parptrGC( &s_gcQWidget, iParam );
      if( pObj == NULL )
      {
         /* Not a QWidget pointer item, check all registered
          * descendant classes
          */
         QT_PARAM_INFO * paramInfo = s_paramList;
         while( paramInfo )
         {
/////////////////      This is the change   ////////////////////////
//////     hbqt_par_Q*() functions are returning pure object without
QPointer<> cast. //////
////////////////                                   ////////////////////////
            obj = ( QWidget * ) paramInfo->pFunc( iParam );
            if( obj )
               return obj;
            paramInfo = paramInfo->pNext;

            #if 0
            pObj = ( QPointer< QWidget > * ) paramInfo->pFunc( iParam );
            if( pObj )
            {
               break;
            }
            paramInfo = paramInfo->pNext;
            #endif
         }
      }

      if( pObj == NULL )
      {
         /* RT ERROR - wrong parameter */
      }
      else
      {
         obj = ( QWidget * ) * pObj;
         if( obj == NULL )
         {
            /* RT ERROR - object deleted by other code */
         }
      }

      return obj;
   }

After your final skeleton I will update the generator to reflect it.
I do not know what other issues will arise out of it but we will know 
those issues when this is implemented first.

Thanks for showing the correct ways.

Regards
Pritpal Bedi


-- 
View this message in context: 
http://www.nabble.com/HBQT---Nearly-lost-how-to-implement-new-GC-tp26033190p26045343.html
Sent from the Harbour - Dev mailing list archive at Nabble.com.

_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to