diff --git a/harbour/ChangeLog b/harbour/ChangeLog index d63467f0ef..5953f52645 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,12 @@ The license applies to all entries newer than 2009-04-28. */ +2012-06-03 11:16 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) + * contrib/hbqt/qtcore/qth/HBQString.qth + * contrib/hbqt/qtcore/qth/QFileInfo.qth + * contrib/hbqt/qtnetwork/qth/QNetworkProxy.qth + - Eliminated: any hbqt_par_QString() occurances. + 2012-06-03 03:02 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) * contrib/hbqt/qtcore/hbqt_bind.cpp + Implemented: requested by the group protocol - to handle diff --git a/harbour/contrib/hbqt/qtcore/qth/HBQString.qth b/harbour/contrib/hbqt/qtcore/qth/HBQString.qth index 915e3b70a2..4df0750709 100644 --- a/harbour/contrib/hbqt/qtcore/qth/HBQString.qth +++ b/harbour/contrib/hbqt/qtcore/qth/HBQString.qth @@ -45,7 +45,9 @@ HB_FUNC( QT_HBQSTRING ) { if( hb_pcount() == 1 && HB_ISCHAR( 1 ) ) { - __HB_RETPTRGC__( new HBQString( hbqt_par_QString( 1 ) ) ); + void * pText01 = NULL; + __HB_RETPTRGC__( new HBQString( hb_parstr_utf8( 1, &pText01, NULL ) ) ); + hb_strfree( pText01 ); } else if( hb_pcount() == 1 && HB_ISPOINTER( 1 ) ) { diff --git a/harbour/contrib/hbqt/qtcore/qth/QFileInfo.qth b/harbour/contrib/hbqt/qtcore/qth/QFileInfo.qth index 4cb8e37f0a..093e2abba0 100644 --- a/harbour/contrib/hbqt/qtcore/qth/QFileInfo.qth +++ b/harbour/contrib/hbqt/qtcore/qth/QFileInfo.qth @@ -50,7 +50,9 @@ HB_FUNC( QT_QFILEINFO ) } if( hb_pcount() == 2 && hbqt_par_isDerivedFrom( 1, "QDIR" ) && HB_ISCHAR( 2 ) ) { - __HB_RETPTRGC__( new QFileInfo( *hbqt_par_QDir( 1 ), hbqt_par_QString( 2 ) ) ); + void * pText01 = NULL; + __HB_RETPTRGC__( new QFileInfo( *hbqt_par_QDir( 1 ), hb_parstr_utf8( 2, &pText01, NULL ) ) ); + hb_strfree( pText01 ); } else { diff --git a/harbour/contrib/hbqt/qtnetwork/qth/QNetworkProxy.qth b/harbour/contrib/hbqt/qtnetwork/qth/QNetworkProxy.qth index 0808d6a434..3854fcb903 100644 --- a/harbour/contrib/hbqt/qtnetwork/qth/QNetworkProxy.qth +++ b/harbour/contrib/hbqt/qtnetwork/qth/QNetworkProxy.qth @@ -36,15 +36,39 @@ HB_FUNC( QT_QNETWORKPROXY ) { __HB_RETPTRGC__( new QNetworkProxy( *hbqt_par_QNetworkProxy( 1 ) ) ); } - else if( hb_pcount() >= 2 && HB_ISNUM( 1 ) && HB_ISCHAR( 2 ) ) + else if( hb_pcount() == 1 && HB_ISNUM( 1 ) ) + { + __HB_RETPTRGC__( new QNetworkProxy( ( QNetworkProxy::ProxyType ) hb_parni( 1 ) ) ); + } + else if( hb_pcount() == 2 && HB_ISNUM( 1 ) && HB_ISCHAR( 2 ) ) { void * pText01 = NULL; - __HB_RETPTRGC__( new QNetworkProxy( ( QNetworkProxy::ProxyType ) hb_parni( 1 ), hb_parstr_utf8( 2, &pText01, NULL ), ( quint16 ) hb_parni( 3 ), QString(), QString() ) ); + __HB_RETPTRGC__( new QNetworkProxy( ( QNetworkProxy::ProxyType ) hb_parni( 1 ), hb_parstr_utf8( 2, &pText01, NULL ) ) ); hb_strfree( pText01 ); } - else if( hb_pcount() >= 1 && HB_ISNUM( 1 ) ) + else if( hb_pcount() == 3 && HB_ISNUM( 1 ) && HB_ISCHAR( 2 ) && HB_ISNUM( 3 ) ) { - __HB_RETPTRGC__( new QNetworkProxy( ( QNetworkProxy::ProxyType ) hb_parni( 1 ), QString(), ( quint16 ) ( HB_ISNUM( 3 ) ? hb_parni( 3 ) : 0 ), ( HB_ISCHAR( 4 ) ? hbqt_par_QString( 4 ) : QString() ), ( HB_ISCHAR( 5 ) ? hbqt_par_QString( 5 ) : QString() ) ) ); + void * pText01 = NULL; + __HB_RETPTRGC__( new QNetworkProxy( ( QNetworkProxy::ProxyType ) hb_parni( 1 ), hb_parstr_utf8( 2, &pText01, NULL ), hb_parni( 3 ) ) ); + hb_strfree( pText01 ); + } + else if( hb_pcount() == 4 && HB_ISNUM( 1 ) && HB_ISCHAR( 2 ) && HB_ISNUM( 3 ) && HB_ISCHAR( 4 ) ) + { + void * pText01 = NULL; + void * pText02 = NULL; + __HB_RETPTRGC__( new QNetworkProxy( ( QNetworkProxy::ProxyType ) hb_parni( 1 ), hb_parstr_utf8( 2, &pText01, NULL ), hb_parni( 3 ), hb_parstr_utf8( 4, &pText02, NULL ) ) ); + hb_strfree( pText01 ); + hb_strfree( pText02 ); + } + else if( hb_pcount() == 5 && HB_ISNUM( 1 ) && HB_ISCHAR( 2 ) && HB_ISNUM( 3 ) && HB_ISCHAR( 4 ) && HB_ISCHAR( 5 ) ) + { + void * pText01 = NULL; + void * pText02 = NULL; + void * pText03 = NULL; + __HB_RETPTRGC__( new QNetworkProxy( ( QNetworkProxy::ProxyType ) hb_parni( 1 ), hb_parstr_utf8( 2, &pText01, NULL ), hb_parni( 3 ), hb_parstr_utf8( 4, &pText02, NULL ), hb_parstr_utf8( 5, &pText03, NULL ) ) ); + hb_strfree( pText01 ); + hb_strfree( pText02 ); + hb_strfree( pText03 ); } else {