2009-06-28 08:44 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)
* harbour/contrib/hbqt/hbqt.h
* harbour/contrib/hbqt/hbqt_qftp.cpp
* harbour/contrib/hbqt/hbqt_qhttp.cpp
* harbour/contrib/hbqt/qth/QFtp.qth
* harbour/contrib/hbqt/qth/QHttp.qth
* harbour/contrib/hbqt/TQFtp.prg
* harbour/contrib/hbqt/TQHttp.prg
! Fixed ( char * ) argument usage in QFtp and QHttp classes.
Infact <qint64 read( char * data, qint64 length )> are written
as is in the header. I could not find a solution to
auto generate it because of <length> argument which could
never be known to first parameter.
This commit is contained in:
@@ -17,6 +17,20 @@
|
||||
past entries belonging to author(s): Viktor Szakats.
|
||||
*/
|
||||
|
||||
2009-06-28 08:44 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)
|
||||
* harbour/contrib/hbqt/hbqt.h
|
||||
* harbour/contrib/hbqt/hbqt_qftp.cpp
|
||||
* harbour/contrib/hbqt/hbqt_qhttp.cpp
|
||||
* harbour/contrib/hbqt/qth/QFtp.qth
|
||||
* harbour/contrib/hbqt/qth/QHttp.qth
|
||||
* harbour/contrib/hbqt/TQFtp.prg
|
||||
* harbour/contrib/hbqt/TQHttp.prg
|
||||
! Fixed ( char * ) argument usage in QFtp and QHttp classes.
|
||||
Infact <qint64 read( char * data, qint64 length )> are written
|
||||
as is in the header. I could not find a solution to
|
||||
auto generate it because of <length> argument which could
|
||||
never be known to first parameter.
|
||||
|
||||
2009-06-27 20:47 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)
|
||||
* harbour/contrib/hbxbp/Makefile
|
||||
* harbour/contrib/hbxbp/xbp.ch
|
||||
|
||||
@@ -81,7 +81,6 @@ CREATE CLASS QFtp INHERIT QObject
|
||||
METHOD put( pDev, cFile, nType ) INLINE Qt_QFtp_put( ::pPtr, pDev, cFile, nType )
|
||||
METHOD put_1( pData, cFile, nType ) INLINE Qt_QFtp_put_1( ::pPtr, pData, cFile, nType )
|
||||
METHOD rawCommand( cCommand ) INLINE Qt_QFtp_rawCommand( ::pPtr, cCommand )
|
||||
METHOD read( pData, nMaxlen ) INLINE Qt_QFtp_read( ::pPtr, pData, nMaxlen )
|
||||
METHOD readAll() INLINE Qt_QFtp_readAll( ::pPtr )
|
||||
METHOD remove( cFile ) INLINE Qt_QFtp_remove( ::pPtr, cFile )
|
||||
METHOD rename( cOldname, cNewname ) INLINE Qt_QFtp_rename( ::pPtr, cOldname, cNewname )
|
||||
|
||||
@@ -78,7 +78,6 @@ CREATE CLASS QHttp INHERIT QObject
|
||||
METHOD lastResponse() INLINE Qt_QHttp_lastResponse( ::pPtr )
|
||||
METHOD post( cPath, pData, pTo ) INLINE Qt_QHttp_post( ::pPtr, cPath, pData, pTo )
|
||||
METHOD post_1( cPath, pData, pTo ) INLINE Qt_QHttp_post_1( ::pPtr, cPath, pData, pTo )
|
||||
METHOD read( pData, nMaxlen ) INLINE Qt_QHttp_read( ::pPtr, pData, nMaxlen )
|
||||
METHOD readAll() INLINE Qt_QHttp_readAll( ::pPtr )
|
||||
METHOD request( pHeader, pData, pTo ) INLINE Qt_QHttp_request( ::pPtr, pHeader, pData, pTo )
|
||||
METHOD request_1( pHeader, pData, pTo ) INLINE Qt_QHttp_request_1( ::pPtr, pHeader, pData, pTo )
|
||||
|
||||
@@ -335,7 +335,7 @@
|
||||
#define hbqt_par_QString( n ) ( ( QString ) hb_parcx( n ) )
|
||||
#define hbqt_par_QRgb( n ) ( hb_parnint( n ) )
|
||||
#define hbqt_par_Bool( n ) ( hb_parl( n ) )
|
||||
#define hbqt_par_char( n ) ( ( char * ) hb_parcx( n ) )
|
||||
#define hbqt_par_char( n ) ( hb_parcx( n ) )
|
||||
|
||||
#define hbqt_ret_QWidget( p ) ( hb_retptr( ( QWidget* ) p ) )
|
||||
#define hbqt_ret_QAbstractItemDelegate( p ) ( hb_retptr( ( QAbstractItemDelegate* ) p ) )
|
||||
|
||||
@@ -72,6 +72,21 @@ HB_FUNC( QT_QFTP )
|
||||
hb_retptr( new QFtp( hbqt_par_QObject( 1 ) ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* qint64 read ( char * data, qint64 maxlen )
|
||||
*/
|
||||
HB_FUNC( QT_QFTP_READ )
|
||||
{
|
||||
char * iData = ( char * ) hb_xgrab( hb_parnint( 3 ) );
|
||||
qint64 iRead;
|
||||
|
||||
iRead = hbqt_par_QFtp( 1 )->read( iData, hb_parnint( 3 ) );
|
||||
|
||||
hb_retnint( iRead );
|
||||
hb_storclen( iData, iRead, 2 );
|
||||
hb_xfree( iData );
|
||||
}
|
||||
|
||||
/*
|
||||
* qint64 bytesAvailable () const
|
||||
*/
|
||||
@@ -216,14 +231,6 @@ HB_FUNC( QT_QFTP_RAWCOMMAND )
|
||||
hb_retni( hbqt_par_QFtp( 1 )->rawCommand( hbqt_par_QString( 2 ) ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* qint64 read ( char * data, qint64 maxlen )
|
||||
*/
|
||||
HB_FUNC( QT_QFTP_READ )
|
||||
{
|
||||
hb_retnint( hbqt_par_QFtp( 1 )->read( hbqt_par_char( 2 ), hb_parnint( 3 ) ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* QByteArray readAll ()
|
||||
*/
|
||||
|
||||
@@ -74,6 +74,21 @@ HB_FUNC( QT_QHTTP )
|
||||
hb_retptr( new QHttp( hbqt_par_QObject( 1 ) ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* qint64 read ( char * data, qint64 maxlen )
|
||||
*/
|
||||
HB_FUNC( QT_QHTTP_READ )
|
||||
{
|
||||
char * iData = ( char * ) hb_xgrab( hb_parnint( 3 ) );
|
||||
qint64 iRead;
|
||||
|
||||
iRead = hbqt_par_QHttp( 1 )->read( iData, hb_parnint( 3 ) );
|
||||
|
||||
hb_retnint( iRead );
|
||||
hb_storclen( iData, iRead, 2 );
|
||||
hb_xfree( iData );
|
||||
}
|
||||
|
||||
/*
|
||||
* qint64 bytesAvailable () const
|
||||
*/
|
||||
@@ -194,14 +209,6 @@ HB_FUNC( QT_QHTTP_POST_1 )
|
||||
hb_retni( hbqt_par_QHttp( 1 )->post( hbqt_par_QString( 2 ), *hbqt_par_QByteArray( 3 ), hbqt_par_QIODevice( 4 ) ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* qint64 read ( char * data, qint64 maxlen )
|
||||
*/
|
||||
HB_FUNC( QT_QHTTP_READ )
|
||||
{
|
||||
hb_retnint( hbqt_par_QHttp( 1 )->read( hbqt_par_char( 2 ), hb_parnint( 3 ) ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* QByteArray readAll ()
|
||||
*/
|
||||
|
||||
@@ -74,6 +74,21 @@ HB_FUNC( QT_QFTP )
|
||||
{
|
||||
hb_retptr( new QFtp( hbqt_par_QObject( 1 ) ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* qint64 read ( char * data, qint64 maxlen )
|
||||
*/
|
||||
HB_FUNC( QT_QFTP_READ )
|
||||
{
|
||||
char * iData = ( char * ) hb_xgrab( hb_parnint( 3 ) );
|
||||
qint64 iRead;
|
||||
|
||||
iRead = hbqt_par_QFtp( 1 )->read( iData, hb_parnint( 3 ) );
|
||||
|
||||
hb_retnint( iRead );
|
||||
hb_storclen( iData, iRead, 2 );
|
||||
hb_xfree( iData );
|
||||
}
|
||||
</CODE>
|
||||
|
||||
<ENUMS>
|
||||
@@ -103,7 +118,9 @@ int mkdir ( const QString & dir )
|
||||
int put ( QIODevice * dev, const QString & file, TransferType type = Binary )
|
||||
int put ( const QByteArray & data, const QString & file, TransferType type = Binary )
|
||||
int rawCommand ( const QString & command )
|
||||
qint64 read ( char * data, qint64 maxlen )
|
||||
# Never uncomment it : See above
|
||||
// qint64 read ( char * data, qint64 maxlen )
|
||||
#
|
||||
QByteArray readAll ()
|
||||
int remove ( const QString & file )
|
||||
int rename ( const QString & oldname, const QString & newname )
|
||||
|
||||
@@ -76,6 +76,21 @@ HB_FUNC( QT_QHTTP )
|
||||
{
|
||||
hb_retptr( new QHttp( hbqt_par_QObject( 1 ) ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* qint64 read ( char * data, qint64 maxlen )
|
||||
*/
|
||||
HB_FUNC( QT_QHTTP_READ )
|
||||
{
|
||||
char * iData = ( char * ) hb_xgrab( hb_parnint( 3 ) );
|
||||
qint64 iRead;
|
||||
|
||||
iRead = hbqt_par_QHttp( 1 )->read( iData, hb_parnint( 3 ) );
|
||||
|
||||
hb_retnint( iRead );
|
||||
hb_storclen( iData, iRead, 2 );
|
||||
hb_xfree( iData );
|
||||
}
|
||||
</CODE>
|
||||
|
||||
<ENUMS>
|
||||
@@ -100,7 +115,11 @@ int head ( const QString & path )
|
||||
QHttpResponseHeader lastResponse () const
|
||||
int post ( const QString & path, QIODevice * data, QIODevice * to = 0 )
|
||||
int post ( const QString & path, const QByteArray & data, QIODevice * to = 0 )
|
||||
qint64 read ( char * data, qint64 maxlen )
|
||||
#
|
||||
# NEVER UNCOMMENT IT
|
||||
// qint64 read ( char * data, qint64 maxlen )
|
||||
#
|
||||
#
|
||||
QByteArray readAll ()
|
||||
int request ( const QHttpRequestHeader & header, QIODevice * data = 0, QIODevice * to = 0 )
|
||||
int request ( const QHttpRequestHeader & header, const QByteArray & data, QIODevice * to = 0 )
|
||||
|
||||
Reference in New Issue
Block a user