diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 32c52531e4..d059a69ada 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,19 @@ The license applies to all entries newer than 2009-04-28. */ +2012-06-02 15:43 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) + * contrib/hbqt/qtcore/qth/QChildEvent.qth + * contrib/hbqt/qtcore/qth/QEvent.qth + * contrib/hbqt/qtcore/qth/QLatin1Char.qth + * contrib/hbqt/qtcore/qth/QLatin1String.qth + * contrib/hbqt/qtcore/qth/QMimeData.qth + * contrib/hbqt/qtcore/qth/QObject.qth + * contrib/hbqt/qtcore/qth/QTextDecoder.qth + * contrib/hbqt/qtcore/qth/QTextEncoder.qth + * contrib/hbqt/qtcore/qth/QThread.qth + * contrib/hbqt/qtcore/qth/QTranslator.qth + ! Fixed: constructors. + 2012-06-02 14:40 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) * contrib/hbqt/qtgui/qth/QCalendarWidget.qth * contrib/hbqt/qtgui/qth/QCheckBox.qth diff --git a/harbour/contrib/hbqt/qtcore/qth/QChildEvent.qth b/harbour/contrib/hbqt/qtcore/qth/QChildEvent.qth index dd2cee3329..815c625ebb 100644 --- a/harbour/contrib/hbqt/qtcore/qth/QChildEvent.qth +++ b/harbour/contrib/hbqt/qtcore/qth/QChildEvent.qth @@ -31,6 +31,10 @@ HB_FUNC( QT_QCHILDEVENT ) { __HB_RETPTRGC__( new QChildEvent( ( QEvent::Type ) hb_parni( 1 ), hbqt_par_QObject( 2 ) ) ); } + else + { + hb_errRT_BASE( EG_ARG, 9999, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); + } } diff --git a/harbour/contrib/hbqt/qtcore/qth/QEvent.qth b/harbour/contrib/hbqt/qtcore/qth/QEvent.qth index 25dd2e7558..df0ad63148 100644 --- a/harbour/contrib/hbqt/qtcore/qth/QEvent.qth +++ b/harbour/contrib/hbqt/qtcore/qth/QEvent.qth @@ -35,6 +35,10 @@ HB_FUNC( QT_QEVENT ) { __HB_RETPTRGC__( new QEvent( ( QEvent::Type ) hb_parni( 1 ) ) ); } + else + { + hb_errRT_BASE( EG_ARG, 9999, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); + } } diff --git a/harbour/contrib/hbqt/qtcore/qth/QLatin1Char.qth b/harbour/contrib/hbqt/qtcore/qth/QLatin1Char.qth index b46a747d95..6991ecb6d3 100644 --- a/harbour/contrib/hbqt/qtcore/qth/QLatin1Char.qth +++ b/harbour/contrib/hbqt/qtcore/qth/QLatin1Char.qth @@ -39,6 +39,10 @@ HB_FUNC( QT_QLATIN1CHAR ) { __HB_RETPTRGC__( new QLatin1Char( ( char ) hb_parni( 1 ) ) ); } + else + { + hb_errRT_BASE( EG_ARG, 9999, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); + } } diff --git a/harbour/contrib/hbqt/qtcore/qth/QLatin1String.qth b/harbour/contrib/hbqt/qtcore/qth/QLatin1String.qth index adc185c687..9373250931 100644 --- a/harbour/contrib/hbqt/qtcore/qth/QLatin1String.qth +++ b/harbour/contrib/hbqt/qtcore/qth/QLatin1String.qth @@ -35,6 +35,10 @@ HB_FUNC( QT_QLATIN1STRING ) { __HB_RETPTRGC__( new QLatin1String( hb_parcx( 1 ) ) ); } + else + { + hb_errRT_BASE( EG_ARG, 9999, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); + } } diff --git a/harbour/contrib/hbqt/qtcore/qth/QMimeData.qth b/harbour/contrib/hbqt/qtcore/qth/QMimeData.qth index 66f36a937d..2ef9462da9 100644 --- a/harbour/contrib/hbqt/qtcore/qth/QMimeData.qth +++ b/harbour/contrib/hbqt/qtcore/qth/QMimeData.qth @@ -29,10 +29,7 @@ Destructor = */ HB_FUNC( QT_QMIMEDATA ) { - if( hb_pcount() == 0 ) - { - __HB_RETPTRGC__( new QMimeData() ); - } + __HB_RETPTRGC__( new QMimeData() ); } diff --git a/harbour/contrib/hbqt/qtcore/qth/QObject.qth b/harbour/contrib/hbqt/qtcore/qth/QObject.qth index 102c567d51..ee45297c1a 100644 --- a/harbour/contrib/hbqt/qtcore/qth/QObject.qth +++ b/harbour/contrib/hbqt/qtcore/qth/QObject.qth @@ -32,7 +32,7 @@ HB_FUNC( QT_QOBJECT ) } else { - __HB_RETPTRGC__( new QObject( 0 ) ); + __HB_RETPTRGC__( new QObject() ); } } diff --git a/harbour/contrib/hbqt/qtcore/qth/QTextDecoder.qth b/harbour/contrib/hbqt/qtcore/qth/QTextDecoder.qth index 95aa5dc757..16d831ae70 100644 --- a/harbour/contrib/hbqt/qtcore/qth/QTextDecoder.qth +++ b/harbour/contrib/hbqt/qtcore/qth/QTextDecoder.qth @@ -32,6 +32,10 @@ HB_FUNC( QT_QTEXTDECODER ) { __HB_RETPTRGC__( new QTextDecoder( hbqt_par_QTextCodec( 1 ) ) ); } + else + { + hb_errRT_BASE( EG_ARG, 9999, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); + } } diff --git a/harbour/contrib/hbqt/qtcore/qth/QTextEncoder.qth b/harbour/contrib/hbqt/qtcore/qth/QTextEncoder.qth index 0eb64b05fc..da04e5f826 100644 --- a/harbour/contrib/hbqt/qtcore/qth/QTextEncoder.qth +++ b/harbour/contrib/hbqt/qtcore/qth/QTextEncoder.qth @@ -32,6 +32,10 @@ HB_FUNC( QT_QTEXTENCODER ) { __HB_RETPTRGC__( new QTextEncoder( hbqt_par_QTextCodec( 1 ) ) ); } + else + { + hb_errRT_BASE( EG_ARG, 9999, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); + } } diff --git a/harbour/contrib/hbqt/qtcore/qth/QThread.qth b/harbour/contrib/hbqt/qtcore/qth/QThread.qth index 60f338b70e..06522a31e0 100644 --- a/harbour/contrib/hbqt/qtcore/qth/QThread.qth +++ b/harbour/contrib/hbqt/qtcore/qth/QThread.qth @@ -28,7 +28,14 @@ Destructor = */ HB_FUNC( QT_QTHREAD ) { - __HB_RETPTRGC__( new QThread() ); + if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QOBJECT" ) ) + { + __HB_RETPTRGC__( new QThread( hbqt_par_QObject( 1 ) ) ); + } + else + { + __HB_RETPTRGC__( new QThread() ); + } } diff --git a/harbour/contrib/hbqt/qtcore/qth/QTranslator.qth b/harbour/contrib/hbqt/qtcore/qth/QTranslator.qth index 0cd8479be5..7843147259 100644 --- a/harbour/contrib/hbqt/qtcore/qth/QTranslator.qth +++ b/harbour/contrib/hbqt/qtcore/qth/QTranslator.qth @@ -28,9 +28,9 @@ Destructor = */ HB_FUNC( QT_QTRANSLATOR ) { - if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QTRANSLATOR" ) ) + if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QOBJECT" ) ) { - __HB_RETPTRGC__( new QTranslator( hbqt_par_QTranslator( 1 ) ) ); + __HB_RETPTRGC__( new QTranslator( hbqt_par_QObject( 1 ) ) ); } else {