<commit_before>/*

  Qt5xHb - bibliotecas de ligao entre Harbour/xHarbour e Qt Framework 5

  Copyright (C) 2012-2017 <NAME> <<EMAIL>>

*/

#include "hbclass.ch"

CLASS QWebChannel INHERIT QObject

   DATA class_flags INIT 0
   DATA self_destruction INIT .F.

   METHOD new
   METHOD delete
   METHOD registerObject
   METHOD deregisterObject
   METHOD blockUpdates
   METHOD setBlockUpdates
   METHOD connectTo
   METHOD disconnectFrom
   METHOD obBlockUpdatesChanged

   DESTRUCTOR destroyObject

END CLASS

PROCEDURE destroyObject () CLASS QWebChannel
   IF ::self_destruction
      ::delete()
   ENDIF
RETURN

#pragma BEGINDUMP

#include <Qt>

#ifndef __XHARBOUR__
#if (QT_VERSION >= QT_VERSION_CHECK(5,4,0))
#include <QWebChannel>
#endif
#endif

#include "qt5xhb_common.h"
#include "qt5xhb_clsid.h"
#include "qt5xhb_utils.h"

#ifdef __XHARBOUR__
#if (QT_VERSION >= QT_VERSION_CHECK(5,4,0))
#include <QWebChannel>
#endif
#endif

/*
explicit QWebChannel(QObject *parent = 0)
*/
HB_FUNC_STATIC( QWEBCHANNEL_NEW )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,4,0))
  QObject * par1 = ISNIL(1)? 0 : (QObject *) _qt5xhb_itemGetPtr(1);
  QWebChannel * o = new QWebChannel ( par1 );
  _qt5xhb_storePointerAndFlag( o, false );
#endif
}


HB_FUNC_STATIC( QWEBCHANNEL_DELETE )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,4,0))
  QWebChannel * obj = (QWebChannel *) hb_itemGetPtr( hb_objSendMsg( hb_stackSelfItem(), "POINTER", 0 ) );
  if( obj )
  {
    delete obj;
    obj = NULL;
    PHB_ITEM self = hb_stackSelfItem();
    PHB_ITEM ptr = hb_itemPutPtr( NULL, NULL );
    hb_objSendMsg( self, "_pointer", 1, ptr );
    hb_itemRelease( ptr );
  }
  hb_itemReturn( hb_stackSelfItem() );
#endif
}



/*
Q_INVOKABLE void registerObject(const QString &id, QObject *object)
*/
HB_FUNC_STATIC( QWEBCHANNEL_REGISTEROBJECT )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,4,0))
  QWebChannel * obj = (QWebChannel *) _qt5xhb_itemGetPtrStackSelfItem();
  if( obj )
  {
    QObject * par2 = (QObject *) _qt5xhb_itemGetPtr(2);
    obj->registerObject ( PQSTRING(1), par2 );
  }
  hb_itemReturn( hb_stackSelfItem() );
#endif
}


/*
Q_INVOKABLE void deregisterObject(QObject *object)
*/
HB_FUNC_STATIC( QWEBCHANNEL_DEREGISTEROBJECT )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,4,0))
  QWebChannel * obj = (QWebChannel *) _qt5xhb_itemGetPtrStackSelfItem();
  if( obj )
  {
    QObject * par1 = (QObject *) _qt5xhb_itemGetPtr(1);
    obj->deregisterObject ( par1 );
  }
  hb_itemReturn( hb_stackSelfItem() );
#endif
}


/*
bool blockUpdates() const
*/
HB_FUNC_STATIC( QWEBCHANNEL_BLOCKUPDATES )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,4,0))
  QWebChannel * obj = (QWebChannel *) _qt5xhb_itemGetPtrStackSelfItem();
  if( obj )
  {
    hb_retl( obj->blockUpdates (  ) );
  }
#endif
}

/*
void setBlockUpdates(bool block)
*/
HB_FUNC_STATIC( QWEBCHANNEL_SETBLOCKUPDATES )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,4,0))
  QWebChannel * obj = (QWebChannel *) _qt5xhb_itemGetPtrStackSelfItem();
  if( obj )
  {
    obj->setBlockUpdates ( (bool) hb_parl(1) );
  }
  hb_itemReturn( hb_stackSelfItem() );
#endif
}


/*
void connectTo(QWebChannelAbstractTransport *transport)
*/
HB_FUNC_STATIC( QWEBCHANNEL_CONNECTTO )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,4,0))
  QWebChannel * obj = (QWebChannel *) _qt5xhb_itemGetPtrStackSelfItem();
  if( obj )
  {
    QWebChannelAbstractTransport * par1 = (QWebChannelAbstractTransport *) _qt5xhb_itemGetPtr(1);
    obj->connectTo ( par1 );
  }
  hb_itemReturn( hb_stackSelfItem() );
#endif
}


/*
void disconnectFrom(QWebChannelAbstractTransport *transport)
*/
HB_FUNC_STATIC( QWEBCHANNEL_DISCONNECTFROM )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,4,0))
  QWebChannel * obj = (QWebChannel *) _qt5xhb_itemGetPtrStackSelfItem();
  if( obj )
  {
    QWebChannelAbstractTransport * par1 = (QWebChannelAbstractTransport *) _qt5xhb_itemGetPtr(1);
    obj->disconnectFrom ( par1 );
  }
  hb_itemReturn( hb_stackSelfItem() );
#endif
}




#pragma ENDDUMP
<commit_msg>QtWebChannel: updated to use the macro PBOOL<commit_after>/*

  Qt5xHb - bibliotecas de ligao entre Harbour/xHarbour e Qt Framework 5

  Copyright (C) 2012-2017 <NAME> <<EMAIL>>

*/

#include "hbclass.ch"

CLASS QWebChannel INHERIT QObject

   DATA class_flags INIT 0
   DATA self_destruction INIT .F.

   METHOD new
   METHOD delete
   METHOD registerObject
   METHOD deregisterObject
   METHOD blockUpdates
   METHOD setBlockUpdates
   METHOD connectTo
   METHOD disconnectFrom
   METHOD obBlockUpdatesChanged

   DESTRUCTOR destroyObject

END CLASS

PROCEDURE destroyObject () CLASS QWebChannel
   IF ::self_destruction
      ::delete()
   ENDIF
RETURN

#pragma BEGINDUMP

#include <Qt>

#ifndef __XHARBOUR__
#if (QT_VERSION >= QT_VERSION_CHECK(5,4,0))
#include <QWebChannel>
#endif
#endif

#include "qt5xhb_common.h"
#include "qt5xhb_clsid.h"
#include "qt5xhb_utils.h"

#ifdef __XHARBOUR__
#if (QT_VERSION >= QT_VERSION_CHECK(5,4,0))
#include <QWebChannel>
#endif
#endif

/*
explicit QWebChannel(QObject *parent = 0)
*/
HB_FUNC_STATIC( QWEBCHANNEL_NEW )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,4,0))
  QObject * par1 = ISNIL(1)? 0 : (QObject *) _qt5xhb_itemGetPtr(1);
  QWebChannel * o = new QWebChannel ( par1 );
  _qt5xhb_storePointerAndFlag( o, false );
#endif
}


HB_FUNC_STATIC( QWEBCHANNEL_DELETE )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,4,0))
  QWebChannel * obj = (QWebChannel *) hb_itemGetPtr( hb_objSendMsg( hb_stackSelfItem(), "POINTER", 0 ) );
  if( obj )
  {
    delete obj;
    obj = NULL;
    PHB_ITEM self = hb_stackSelfItem();
    PHB_ITEM ptr = hb_itemPutPtr( NULL, NULL );
    hb_objSendMsg( self, "_pointer", 1, ptr );
    hb_itemRelease( ptr );
  }
  hb_itemReturn( hb_stackSelfItem() );
#endif
}



/*
Q_INVOKABLE void registerObject(const QString &id, QObject *object)
*/
HB_FUNC_STATIC( QWEBCHANNEL_REGISTEROBJECT )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,4,0))
  QWebChannel * obj = (QWebChannel *) _qt5xhb_itemGetPtrStackSelfItem();
  if( obj )
  {
    QObject * par2 = (QObject *) _qt5xhb_itemGetPtr(2);
    obj->registerObject ( PQSTRING(1), par2 );
  }
  hb_itemReturn( hb_stackSelfItem() );
#endif
}


/*
Q_INVOKABLE void deregisterObject(QObject *object)
*/
HB_FUNC_STATIC( QWEBCHANNEL_DEREGISTEROBJECT )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,4,0))
  QWebChannel * obj = (QWebChannel *) _qt5xhb_itemGetPtrStackSelfItem();
  if( obj )
  {
    QObject * par1 = (QObject *) _qt5xhb_itemGetPtr(1);
    obj->deregisterObject ( par1 );
  }
  hb_itemReturn( hb_stackSelfItem() );
#endif
}


/*
bool blockUpdates() const
*/
HB_FUNC_STATIC( QWEBCHANNEL_BLOCKUPDATES )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,4,0))
  QWebChannel * obj = (QWebChannel *) _qt5xhb_itemGetPtrStackSelfItem();
  if( obj )
  {
    hb_retl( obj->blockUpdates (  ) );
  }
#endif
}

/*
void setBlockUpdates(bool block)
*/
HB_FUNC_STATIC( QWEBCHANNEL_SETBLOCKUPDATES )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,4,0))
  QWebChannel * obj = (QWebChannel *) _qt5xhb_itemGetPtrStackSelfItem();
  if( obj )
  {
    obj->setBlockUpdates ( PBOOL(1) );
  }
  hb_itemReturn( hb_stackSelfItem() );
#endif
}


/*
void connectTo(QWebChannelAbstractTransport *transport)
*/
HB_FUNC_STATIC( QWEBCHANNEL_CONNECTTO )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,4,0))
  QWebChannel * obj = (QWebChannel *) _qt5xhb_itemGetPtrStackSelfItem();
  if( obj )
  {
    QWebChannelAbstractTransport * par1 = (QWebChannelAbstractTransport *) _qt5xhb_itemGetPtr(1);
    obj->connectTo ( par1 );
  }
  hb_itemReturn( hb_stackSelfItem() );
#endif
}


/*
void disconnectFrom(QWebChannelAbstractTransport *transport)
*/
HB_FUNC_STATIC( QWEBCHANNEL_DISCONNECTFROM )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,4,0))
  QWebChannel * obj = (QWebChannel *) _qt5xhb_itemGetPtrStackSelfItem();
  if( obj )
  {
    QWebChannelAbstractTransport * par1 = (QWebChannelAbstractTransport *) _qt5xhb_itemGetPtr(1);
    obj->disconnectFrom ( par1 );
  }
  hb_itemReturn( hb_stackSelfItem() );
#endif
}




#pragma ENDDUMP

{'fraction_non_alphanumeric': 0.11544028950542823, 'fraction_numerical': 0.01881785283474065, 'mean_word_length': 3.7323059360730593, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 47, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2869893', 'n_tokens_mistral': 3431, 'n_tokens_neox': 3174, 'n_words': 579}