From 1eeb32a3f6a1e77bfe98cdde13698eb81d175eab Mon Sep 17 00:00:00 2001 From: Pritpal Bedi Date: Mon, 7 May 2012 06:42:13 +0000 Subject: [PATCH] 2012-05-06 23:36 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) * contrib/hbqt/qtcore/qth/QAbstractEventDispatcher.qth * contrib/hbqt/qtcore/qth/QBitArray.qth * contrib/hbqt/qtcore/qth/QBuffer.qth * contrib/hbqt/qtcore/qth/QByteArray.qth * contrib/hbqt/qtcore/qth/QChar.qth * contrib/hbqt/qtcore/qth/QChildEvent.qth * contrib/hbqt/qtcore/qth/QDataStream.qth * contrib/hbqt/qtcore/qth/QDate.qth * contrib/hbqt/qtcore/qth/QDateTime.qth * contrib/hbqt/qtcore/qth/QDir.qth * contrib/hbqt/qtcore/qth/QEvent.qth * contrib/hbqt/qtcore/qth/QEventLoop.qth * contrib/hbqt/qtcore/qth/QFile.qth * contrib/hbqt/qtcore/qth/QFileInfo.qth * contrib/hbqt/qtcore/qth/QFileSystemWatcher.qth * contrib/hbqt/qtcore/qth/QGenericArgument.qth * contrib/hbqt/qtcore/qth/QGenericReturnArgument.qth * contrib/hbqt/qtcore/qth/QIODevice.qth * contrib/hbqt/qtcore/qth/QLatin1Char.qth * contrib/hbqt/qtcore/qth/QLatin1String.qth * contrib/hbqt/qtcore/qth/QLine.qth * contrib/hbqt/qtcore/qth/QLineF.qth * contrib/hbqt/qtcore/qth/QList.qth * contrib/hbqt/qtcore/qth/QLocale.qth * contrib/hbqt/qtcore/qth/QModelIndex.qth * contrib/hbqt/qtcore/qth/QObject.qth * contrib/hbqt/qtcore/qth/QPoint.qth * contrib/hbqt/qtcore/qth/QPointF.qth * contrib/hbqt/qtcore/qth/QProcess.qth * contrib/hbqt/qtcore/qth/QRect.qth * contrib/hbqt/qtcore/qth/QRectF.qth * contrib/hbqt/qtcore/qth/QRegExp.qth * contrib/hbqt/qtcore/qth/QResource.qth * contrib/hbqt/qtcore/qth/QSettings.qth * contrib/hbqt/qtcore/qth/QSignalMapper.qth * contrib/hbqt/qtcore/qth/QSize.qth * contrib/hbqt/qtcore/qth/QSizeF.qth * contrib/hbqt/qtcore/qth/QStringList.qth * contrib/hbqt/qtcore/qth/QStringRef.qth * contrib/hbqt/qtcore/qth/QTextBoundaryFinder.qth * contrib/hbqt/qtcore/qth/QTextDecoder.qth * contrib/hbqt/qtcore/qth/QTextEncoder.qth * contrib/hbqt/qtcore/qth/QTextStream.qth * contrib/hbqt/qtcore/qth/QTime.qth * contrib/hbqt/qtcore/qth/QTimeLine.qth * contrib/hbqt/qtcore/qth/QTimer.qth * contrib/hbqt/qtcore/qth/QTranslator.qth * contrib/hbqt/qtcore/qth/QUrl.qth - Replaced: HB_ISOBJECT( n ) => hbqt_par_isDerivedFrom( n, "QXXX" ) --- harbour/ChangeLog | 51 ++++++++++ .../qtcore/qth/QAbstractEventDispatcher.qth | 2 +- harbour/contrib/hbqt/qtcore/qth/QBitArray.qth | 2 +- harbour/contrib/hbqt/qtcore/qth/QBuffer.qth | 14 ++- .../contrib/hbqt/qtcore/qth/QByteArray.qth | 2 +- harbour/contrib/hbqt/qtcore/qth/QChar.qth | 2 +- .../contrib/hbqt/qtcore/qth/QChildEvent.qth | 2 +- .../contrib/hbqt/qtcore/qth/QDataStream.qth | 15 ++- harbour/contrib/hbqt/qtcore/qth/QDate.qth | 2 +- harbour/contrib/hbqt/qtcore/qth/QDateTime.qth | 17 ++-- harbour/contrib/hbqt/qtcore/qth/QDir.qth | 2 +- harbour/contrib/hbqt/qtcore/qth/QEvent.qth | 2 +- .../contrib/hbqt/qtcore/qth/QEventLoop.qth | 9 +- harbour/contrib/hbqt/qtcore/qth/QFile.qth | 17 ++-- harbour/contrib/hbqt/qtcore/qth/QFileInfo.qth | 15 ++- .../hbqt/qtcore/qth/QFileSystemWatcher.qth | 21 ++-- .../hbqt/qtcore/qth/QGenericArgument.qth | 2 +- .../qtcore/qth/QGenericReturnArgument.qth | 2 +- harbour/contrib/hbqt/qtcore/qth/QIODevice.qth | 3 +- .../contrib/hbqt/qtcore/qth/QLatin1Char.qth | 2 +- .../contrib/hbqt/qtcore/qth/QLatin1String.qth | 2 +- harbour/contrib/hbqt/qtcore/qth/QLine.qth | 4 +- harbour/contrib/hbqt/qtcore/qth/QLineF.qth | 8 +- harbour/contrib/hbqt/qtcore/qth/QList.qth | 2 +- harbour/contrib/hbqt/qtcore/qth/QLocale.qth | 2 +- .../contrib/hbqt/qtcore/qth/QModelIndex.qth | 2 +- harbour/contrib/hbqt/qtcore/qth/QObject.qth | 2 +- harbour/contrib/hbqt/qtcore/qth/QPoint.qth | 2 +- harbour/contrib/hbqt/qtcore/qth/QPointF.qth | 2 +- harbour/contrib/hbqt/qtcore/qth/QProcess.qth | 2 +- harbour/contrib/hbqt/qtcore/qth/QRect.qth | 19 ++-- harbour/contrib/hbqt/qtcore/qth/QRectF.qth | 19 ++-- harbour/contrib/hbqt/qtcore/qth/QRegExp.qth | 2 +- harbour/contrib/hbqt/qtcore/qth/QResource.qth | 10 +- harbour/contrib/hbqt/qtcore/qth/QSettings.qth | 96 +++++++++++++++---- .../contrib/hbqt/qtcore/qth/QSignalMapper.qth | 9 +- harbour/contrib/hbqt/qtcore/qth/QSize.qth | 2 +- harbour/contrib/hbqt/qtcore/qth/QSizeF.qth | 2 +- .../contrib/hbqt/qtcore/qth/QStringList.qth | 2 +- .../contrib/hbqt/qtcore/qth/QStringRef.qth | 2 +- .../hbqt/qtcore/qth/QTextBoundaryFinder.qth | 4 +- .../contrib/hbqt/qtcore/qth/QTextDecoder.qth | 2 +- .../contrib/hbqt/qtcore/qth/QTextEncoder.qth | 2 +- .../contrib/hbqt/qtcore/qth/QTextStream.qth | 19 ++-- harbour/contrib/hbqt/qtcore/qth/QTime.qth | 2 +- harbour/contrib/hbqt/qtcore/qth/QTimeLine.qth | 8 +- harbour/contrib/hbqt/qtcore/qth/QTimer.qth | 9 +- .../contrib/hbqt/qtcore/qth/QTranslator.qth | 4 +- harbour/contrib/hbqt/qtcore/qth/QUrl.qth | 2 +- 49 files changed, 274 insertions(+), 153 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index e140d69552..58974c6820 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,57 @@ The license applies to all entries newer than 2009-04-28. */ +2012-05-06 23:36 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) + * contrib/hbqt/qtcore/qth/QAbstractEventDispatcher.qth + * contrib/hbqt/qtcore/qth/QBitArray.qth + * contrib/hbqt/qtcore/qth/QBuffer.qth + * contrib/hbqt/qtcore/qth/QByteArray.qth + * contrib/hbqt/qtcore/qth/QChar.qth + * contrib/hbqt/qtcore/qth/QChildEvent.qth + * contrib/hbqt/qtcore/qth/QDataStream.qth + * contrib/hbqt/qtcore/qth/QDate.qth + * contrib/hbqt/qtcore/qth/QDateTime.qth + * contrib/hbqt/qtcore/qth/QDir.qth + * contrib/hbqt/qtcore/qth/QEvent.qth + * contrib/hbqt/qtcore/qth/QEventLoop.qth + * contrib/hbqt/qtcore/qth/QFile.qth + * contrib/hbqt/qtcore/qth/QFileInfo.qth + * contrib/hbqt/qtcore/qth/QFileSystemWatcher.qth + * contrib/hbqt/qtcore/qth/QGenericArgument.qth + * contrib/hbqt/qtcore/qth/QGenericReturnArgument.qth + * contrib/hbqt/qtcore/qth/QIODevice.qth + * contrib/hbqt/qtcore/qth/QLatin1Char.qth + * contrib/hbqt/qtcore/qth/QLatin1String.qth + * contrib/hbqt/qtcore/qth/QLine.qth + * contrib/hbqt/qtcore/qth/QLineF.qth + * contrib/hbqt/qtcore/qth/QList.qth + * contrib/hbqt/qtcore/qth/QLocale.qth + * contrib/hbqt/qtcore/qth/QModelIndex.qth + * contrib/hbqt/qtcore/qth/QObject.qth + * contrib/hbqt/qtcore/qth/QPoint.qth + * contrib/hbqt/qtcore/qth/QPointF.qth + * contrib/hbqt/qtcore/qth/QProcess.qth + * contrib/hbqt/qtcore/qth/QRect.qth + * contrib/hbqt/qtcore/qth/QRectF.qth + * contrib/hbqt/qtcore/qth/QRegExp.qth + * contrib/hbqt/qtcore/qth/QResource.qth + * contrib/hbqt/qtcore/qth/QSettings.qth + * contrib/hbqt/qtcore/qth/QSignalMapper.qth + * contrib/hbqt/qtcore/qth/QSize.qth + * contrib/hbqt/qtcore/qth/QSizeF.qth + * contrib/hbqt/qtcore/qth/QStringList.qth + * contrib/hbqt/qtcore/qth/QStringRef.qth + * contrib/hbqt/qtcore/qth/QTextBoundaryFinder.qth + * contrib/hbqt/qtcore/qth/QTextDecoder.qth + * contrib/hbqt/qtcore/qth/QTextEncoder.qth + * contrib/hbqt/qtcore/qth/QTextStream.qth + * contrib/hbqt/qtcore/qth/QTime.qth + * contrib/hbqt/qtcore/qth/QTimeLine.qth + * contrib/hbqt/qtcore/qth/QTimer.qth + * contrib/hbqt/qtcore/qth/QTranslator.qth + * contrib/hbqt/qtcore/qth/QUrl.qth + - Replaced: HB_ISOBJECT( n ) => hbqt_par_isDerivedFrom( n, "QXXX" ) + 2012-05-06 16:11 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) * contrib/hbqt/qtgui/qth/QBitmap.qth * contrib/hbqt/qtgui/qth/QBrush.qth diff --git a/harbour/contrib/hbqt/qtcore/qth/QAbstractEventDispatcher.qth b/harbour/contrib/hbqt/qtcore/qth/QAbstractEventDispatcher.qth index 0e90877694..20f57a1029 100644 --- a/harbour/contrib/hbqt/qtcore/qth/QAbstractEventDispatcher.qth +++ b/harbour/contrib/hbqt/qtcore/qth/QAbstractEventDispatcher.qth @@ -27,7 +27,7 @@ New = */ HB_FUNC( QT_QABSTRACTEVENTDISPATCHER ) { - if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) ) + if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QOBJECT" ) ) { __HB_RETPTRGC__( new QAbstractEventDispatcher( hbqt_par_QObject( 1 ) ) ); } diff --git a/harbour/contrib/hbqt/qtcore/qth/QBitArray.qth b/harbour/contrib/hbqt/qtcore/qth/QBitArray.qth index dc68ea02b5..9c7f375aa3 100644 --- a/harbour/contrib/hbqt/qtcore/qth/QBitArray.qth +++ b/harbour/contrib/hbqt/qtcore/qth/QBitArray.qth @@ -28,7 +28,7 @@ New = */ HB_FUNC( QT_QBITARRAY ) { - if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) ) + if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QBITARRAY" ) ) { __HB_RETPTRGC__( new QBitArray( *hbqt_par_QBitArray( 1 ) ) ); } diff --git a/harbour/contrib/hbqt/qtcore/qth/QBuffer.qth b/harbour/contrib/hbqt/qtcore/qth/QBuffer.qth index 9ed5d56151..9ddb6f5bf7 100644 --- a/harbour/contrib/hbqt/qtcore/qth/QBuffer.qth +++ b/harbour/contrib/hbqt/qtcore/qth/QBuffer.qth @@ -35,13 +35,21 @@ New = */ HB_FUNC( QT_QBUFFER ) { - if( hb_pcount() >= 1 && HB_ISOBJECT( 1 ) ) + if( hb_pcount() == 2 && hbqt_par_isDerivedFrom( 1, "QBYTEARRAY" ) && hbqt_par_isDerivedFrom( 2, "QOBJECT" ) ) { - __HB_RETPTRGC__( new QBuffer( hbqt_par_QByteArray( 1 ), HB_ISOBJECT( 2 ) ? hbqt_par_QObject( 2 ) : 0 ) ); + __HB_RETPTRGC__( new QBuffer( hbqt_par_QByteArray( 1 ), hbqt_par_QObject( 2 ) ) ); + } + else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QBYTEARRAY" ) ) + { + __HB_RETPTRGC__( new QBuffer( hbqt_par_QByteArray( 1 ), 0 ) ); + } + else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QOBJECT" ) ) + { + __HB_RETPTRGC__( new QBuffer( hbqt_par_QObject( 1 ) ) ); } else { - __HB_RETPTRGC__( new QBuffer( HB_ISOBJECT( 1 ) ? hbqt_par_QObject( 1 ) : 0 ) ); + __HB_RETPTRGC__( new QBuffer() ); } } diff --git a/harbour/contrib/hbqt/qtcore/qth/QByteArray.qth b/harbour/contrib/hbqt/qtcore/qth/QByteArray.qth index bb298e7ed1..7407f55129 100644 --- a/harbour/contrib/hbqt/qtcore/qth/QByteArray.qth +++ b/harbour/contrib/hbqt/qtcore/qth/QByteArray.qth @@ -32,7 +32,7 @@ ClubMethods = no */ HB_FUNC( QT_QBYTEARRAY ) { - if( hb_pcount() >= 1 && HB_ISOBJECT( 1 ) ) + if( hb_pcount() >= 1 && hbqt_par_isDerivedFrom( 1, "QBYTEARRAY" ) ) { __HB_RETPTRGC__( new QByteArray( *hbqt_par_QByteArray( 1 ) ) ); } diff --git a/harbour/contrib/hbqt/qtcore/qth/QChar.qth b/harbour/contrib/hbqt/qtcore/qth/QChar.qth index 6382e4cfa3..a381787b56 100644 --- a/harbour/contrib/hbqt/qtcore/qth/QChar.qth +++ b/harbour/contrib/hbqt/qtcore/qth/QChar.qth @@ -43,7 +43,7 @@ Destructor = no */ HB_FUNC( QT_QCHAR ) { - if( hb_pcount() >= 1 && HB_ISOBJECT( 1 ) ) + if( hb_pcount() >= 1 && hbqt_par_isDerivedFrom( 1, "QLATIN1CHAR" ) ) { __HB_RETPTRGC__( new QChar( *hbqt_par_QLatin1Char( 1 ) ) ); } diff --git a/harbour/contrib/hbqt/qtcore/qth/QChildEvent.qth b/harbour/contrib/hbqt/qtcore/qth/QChildEvent.qth index fe322b88bd..36c1009889 100644 --- a/harbour/contrib/hbqt/qtcore/qth/QChildEvent.qth +++ b/harbour/contrib/hbqt/qtcore/qth/QChildEvent.qth @@ -70,7 +70,7 @@ New = */ HB_FUNC( QT_QCHILDEVENT ) { - if( hb_pcount() == 2 && HB_ISNUM( 1 ) && HB_ISOBJECT( 2 ) ) + if( hb_pcount() == 2 && HB_ISNUM( 1 ) && hbqt_par_isDerivedFrom( 2, "QOBJECT" ) ) { __HB_RETPTRGC__( new QChildEvent( ( QEvent::Type ) hb_parni( 1 ), hbqt_par_QObject( 2 ) ) ); } diff --git a/harbour/contrib/hbqt/qtcore/qth/QDataStream.qth b/harbour/contrib/hbqt/qtcore/qth/QDataStream.qth index 7f3fb6b185..19f275f642 100644 --- a/harbour/contrib/hbqt/qtcore/qth/QDataStream.qth +++ b/harbour/contrib/hbqt/qtcore/qth/QDataStream.qth @@ -31,16 +31,13 @@ Destructor = */ HB_FUNC( QT_QDATASTREAM ) { - if( hb_pcount() >= 1 && HB_ISOBJECT( 1 ) ) + if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QIODEVICE" ) ) { - if( hbqt_par_isDerivedFrom( 1, "QIODEVICE" ) ) - { - __HB_RETPTRGC__( new QDataStream( hbqt_par_QIODevice( 1 ) ) ); - } - else if( hbqt_par_isDerivedFrom( 1, "QBYTEARRAY" ) ) - { - __HB_RETPTRGC__( new QDataStream( *hbqt_par_QByteArray( 1 ) ) ); - } + __HB_RETPTRGC__( new QDataStream( hbqt_par_QIODevice( 1 ) ) ); + } + else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QBYTEARRAY" ) ) + { + __HB_RETPTRGC__( new QDataStream( *hbqt_par_QByteArray( 1 ) ) ); } if( hb_pcount() == 2 && hbqt_par_isDerivedFrom( 1, "QBYTEARRAY" ) && HB_ISNUM( 2 ) ) { diff --git a/harbour/contrib/hbqt/qtcore/qth/QDate.qth b/harbour/contrib/hbqt/qtcore/qth/QDate.qth index 57564f9f05..624bea68bf 100644 --- a/harbour/contrib/hbqt/qtcore/qth/QDate.qth +++ b/harbour/contrib/hbqt/qtcore/qth/QDate.qth @@ -28,7 +28,7 @@ Destructor = */ HB_FUNC( QT_QDATE ) { - if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) ) + if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QDATE" ) ) { __HB_RETPTRGC__( new QDate( *hbqt_par_QDate( 1 ) ) ); } diff --git a/harbour/contrib/hbqt/qtcore/qth/QDateTime.qth b/harbour/contrib/hbqt/qtcore/qth/QDateTime.qth index d79397182c..f4bf226e82 100644 --- a/harbour/contrib/hbqt/qtcore/qth/QDateTime.qth +++ b/harbour/contrib/hbqt/qtcore/qth/QDateTime.qth @@ -31,18 +31,15 @@ New = */ HB_FUNC( QT_QDATETIME ) { - if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) ) + if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QDATE" ) ) { - if( hbqt_par_isDerivedFrom( 1, "QDATE" ) ) - { - __HB_RETPTRGC__( new QDateTime( *hbqt_par_QDate( 1 ) ) ); - } - else if( hbqt_par_isDerivedFrom( 1, "QDATETIME" ) ) - { - __HB_RETPTRGC__( new QDateTime( *hbqt_par_QDateTime( 1 ) ) ); - } + __HB_RETPTRGC__( new QDateTime( *hbqt_par_QDate( 1 ) ) ); } - else if( hb_pcount() >= 2 && HB_ISOBJECT( 2 ) && HB_ISOBJECT( 3 ) ) + else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QDATETIME" ) ) + { + __HB_RETPTRGC__( new QDateTime( *hbqt_par_QDateTime( 1 ) ) ); + } + else if( hb_pcount() >= 2 && hbqt_par_isDerivedFrom( 2, "QDATE" ) && hbqt_par_isDerivedFrom( 3, "QTIME" ) ) { __HB_RETPTRGC__( new QDateTime( *hbqt_par_QDate( 1 ), *hbqt_par_QTime( 2 ), HB_ISNUM( 3 ) ? ( Qt::TimeSpec ) hb_parni( 3 ) : Qt::LocalTime ) ); } diff --git a/harbour/contrib/hbqt/qtcore/qth/QDir.qth b/harbour/contrib/hbqt/qtcore/qth/QDir.qth index 860ffcc208..f2a11c9f86 100644 --- a/harbour/contrib/hbqt/qtcore/qth/QDir.qth +++ b/harbour/contrib/hbqt/qtcore/qth/QDir.qth @@ -31,7 +31,7 @@ New = pParent */ HB_FUNC( QT_QDIR ) { - if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) ) + if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QDIR" ) ) { __HB_RETPTRGC__( new QDir( *hbqt_par_QDir( 1 ) ) ); } diff --git a/harbour/contrib/hbqt/qtcore/qth/QEvent.qth b/harbour/contrib/hbqt/qtcore/qth/QEvent.qth index 1a125c4ba8..fd7551ccb5 100644 --- a/harbour/contrib/hbqt/qtcore/qth/QEvent.qth +++ b/harbour/contrib/hbqt/qtcore/qth/QEvent.qth @@ -27,7 +27,7 @@ New = nType */ HB_FUNC( QT_QEVENT ) { - if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) ) + if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QEVENT" ) ) { __HB_RETPTRGC__( new QEvent( *hbqt_par_QEvent( 1 ) ) ); } diff --git a/harbour/contrib/hbqt/qtcore/qth/QEventLoop.qth b/harbour/contrib/hbqt/qtcore/qth/QEventLoop.qth index 80967070d0..36441d849d 100644 --- a/harbour/contrib/hbqt/qtcore/qth/QEventLoop.qth +++ b/harbour/contrib/hbqt/qtcore/qth/QEventLoop.qth @@ -29,7 +29,14 @@ HB_FUNC( QT_QEVENTLOOP ) { if( hb_pcount() >= 0 ) { - __HB_RETPTRGC__( new QEventLoop( HB_ISOBJECT( 1 ) ? hbqt_par_QObject( 1 ) : 0 ) ); + if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QOBJECT" ) ) + { + __HB_RETPTRGC__( new QEventLoop( hbqt_par_QObject( 1 ) ) ); + } + else + { + __HB_RETPTRGC__( new QEventLoop( 0 ) ); + } } } diff --git a/harbour/contrib/hbqt/qtcore/qth/QFile.qth b/harbour/contrib/hbqt/qtcore/qth/QFile.qth index 900911ed9c..fca00a261b 100644 --- a/harbour/contrib/hbqt/qtcore/qth/QFile.qth +++ b/harbour/contrib/hbqt/qtcore/qth/QFile.qth @@ -30,16 +30,13 @@ Destructor = */ HB_FUNC( QT_QFILE ) { - if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) ) + if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QFILE" ) ) { - if( hbqt_par_isDerivedFrom( 1, "QFILE" ) ) - { - __HB_RETPTRGC__( new QFile( hbqt_par_QFile( 1 ) ) ); - } - else if( hbqt_par_isDerivedFrom( 1, "QOBJECT" ) ) - { - __HB_RETPTRGC__( new QFile( hbqt_par_QObject( 1 ) ) ); - } + __HB_RETPTRGC__( new QFile( hbqt_par_QFile( 1 ) ) ); + } + else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QOBJECT" ) ) + { + __HB_RETPTRGC__( new QFile( hbqt_par_QObject( 1 ) ) ); } else if( hb_pcount() == 1 && HB_ISCHAR( 1 ) ) { @@ -47,7 +44,7 @@ HB_FUNC( QT_QFILE ) __HB_RETPTRGC__( new QFile( hb_parstr_utf8( 1, &pText01, NULL ) ) ); hb_strfree( pText01 ); } - else if( hb_pcount() == 2 && HB_ISCHAR( 1 ) && HB_ISOBJECT( 2 ) ) + else if( hb_pcount() == 2 && HB_ISCHAR( 1 ) && hbqt_par_isDerivedFrom( 2, "QOBJECT" ) ) { void * pText01 = NULL; __HB_RETPTRGC__( new QFile( hb_parstr_utf8( 1, &pText01, NULL ), hbqt_par_QObject( 2 ) ) ); diff --git a/harbour/contrib/hbqt/qtcore/qth/QFileInfo.qth b/harbour/contrib/hbqt/qtcore/qth/QFileInfo.qth index 862d988263..70311a825b 100644 --- a/harbour/contrib/hbqt/qtcore/qth/QFileInfo.qth +++ b/harbour/contrib/hbqt/qtcore/qth/QFileInfo.qth @@ -40,16 +40,13 @@ HB_FUNC( QT_QFILEINFO ) __HB_RETPTRGC__( new QFileInfo( hb_parstr_utf8( 1, &pText01, NULL ) ) ); hb_strfree( pText01 ); } - else if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) ) + else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QFILE" ) ) { - if( hbqt_par_isDerivedFrom( 1, "QFILE" ) ) - { - __HB_RETPTRGC__( new QFileInfo( *hbqt_par_QFile( 1 ) ) ); - } - else if( hbqt_par_isDerivedFrom( 1, "QFILEINFO" ) ) - { - __HB_RETPTRGC__( new QFileInfo( *hbqt_par_QFileInfo( 1 ) ) ); - } + __HB_RETPTRGC__( new QFileInfo( *hbqt_par_QFile( 1 ) ) ); + } + else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QFILEINFO" ) ) + { + __HB_RETPTRGC__( new QFileInfo( *hbqt_par_QFileInfo( 1 ) ) ); } if( hb_pcount() == 2 && hbqt_par_isDerivedFrom( 1, "QDIR" ) && HB_ISCHAR( 2 ) ) { diff --git a/harbour/contrib/hbqt/qtcore/qth/QFileSystemWatcher.qth b/harbour/contrib/hbqt/qtcore/qth/QFileSystemWatcher.qth index 004e2cf42a..71236b8826 100644 --- a/harbour/contrib/hbqt/qtcore/qth/QFileSystemWatcher.qth +++ b/harbour/contrib/hbqt/qtcore/qth/QFileSystemWatcher.qth @@ -28,22 +28,15 @@ Destructor = HB_FUNC( QT_QFILESYSTEMWATCHER ) { - if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) ) + if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QSTRINGLIST" ) ) { - if( hbqt_par_isDerivedFrom( 1, "QSTRINGLIST" ) ) - { - __HB_RETPTRGC__( new QFileSystemWatcher( *hbqt_par_QStringList( 1 ) ) ); - } - else if( hbqt_par_isDerivedFrom( 1, "QOBJECT" ) ) - { - __HB_RETPTRGC__( new QFileSystemWatcher( hbqt_par_QObject( 1 ) ) ); - } - else - { - __HB_RETPTRGC__( new QFileSystemWatcher() ); - } + __HB_RETPTRGC__( new QFileSystemWatcher( *hbqt_par_QStringList( 1 ) ) ); } - else if( hb_pcount() == 2 && HB_ISOBJECT( 1 ) && HB_ISOBJECT( 2 ) ) + else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QOBJECT" ) ) + { + __HB_RETPTRGC__( new QFileSystemWatcher( hbqt_par_QObject( 1 ) ) ); + } + else if( hb_pcount() == 2 && hbqt_par_isDerivedFrom( 1, "QSTRINGLIST" ) && hbqt_par_isDerivedFrom( 2, "QOBJECT" ) ) { __HB_RETPTRGC__( new QFileSystemWatcher( *hbqt_par_QStringList( 1 ), hbqt_par_QObject( 2 ) ) ); } diff --git a/harbour/contrib/hbqt/qtcore/qth/QGenericArgument.qth b/harbour/contrib/hbqt/qtcore/qth/QGenericArgument.qth index e7329a1c8e..f055c44d7f 100644 --- a/harbour/contrib/hbqt/qtcore/qth/QGenericArgument.qth +++ b/harbour/contrib/hbqt/qtcore/qth/QGenericArgument.qth @@ -34,7 +34,7 @@ New = */ HB_FUNC( QT_QGENERICARGUMENT ) { - if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) ) + if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QGENERICARGUMENT" ) ) { __HB_RETPTRGC__( new QGenericArgument( *hbqt_par_QGenericArgument( 1 ) ) ); } diff --git a/harbour/contrib/hbqt/qtcore/qth/QGenericReturnArgument.qth b/harbour/contrib/hbqt/qtcore/qth/QGenericReturnArgument.qth index f196d31335..0fc2d10044 100644 --- a/harbour/contrib/hbqt/qtcore/qth/QGenericReturnArgument.qth +++ b/harbour/contrib/hbqt/qtcore/qth/QGenericReturnArgument.qth @@ -34,7 +34,7 @@ New = */ HB_FUNC( QT_QGENERICRETURNARGUMENT ) { - if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) ) + if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QGENERICRETURNARGUMENT" ) ) { __HB_RETPTRGC__( new QGenericReturnArgument( *hbqt_par_QGenericReturnArgument( 1 ) ) ); } diff --git a/harbour/contrib/hbqt/qtcore/qth/QIODevice.qth b/harbour/contrib/hbqt/qtcore/qth/QIODevice.qth index 89e1bb5f24..44bd33ccf5 100644 --- a/harbour/contrib/hbqt/qtcore/qth/QIODevice.qth +++ b/harbour/contrib/hbqt/qtcore/qth/QIODevice.qth @@ -29,7 +29,7 @@ Constructor = no */ HB_FUNC( QT_QIODEVICE ) { - if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) ) + if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QOBJECT" ) ) { // __HB_RETPTRGC__( new QIODevice( hbqt_par_QObject( 1 ) ) ); } @@ -89,3 +89,4 @@ void readyRead () + \ No newline at end of file diff --git a/harbour/contrib/hbqt/qtcore/qth/QLatin1Char.qth b/harbour/contrib/hbqt/qtcore/qth/QLatin1Char.qth index 4be3578dea..4cf41ca7ee 100644 --- a/harbour/contrib/hbqt/qtcore/qth/QLatin1Char.qth +++ b/harbour/contrib/hbqt/qtcore/qth/QLatin1Char.qth @@ -27,7 +27,7 @@ New = */ HB_FUNC( QT_QLATIN1CHAR ) { - if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) ) + if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QLatin1Char" ) ) { __HB_RETPTRGC__( new QLatin1Char( *hbqt_par_QLatin1Char( 1 ) ) ); } diff --git a/harbour/contrib/hbqt/qtcore/qth/QLatin1String.qth b/harbour/contrib/hbqt/qtcore/qth/QLatin1String.qth index a09647b1f3..dba6e2e685 100644 --- a/harbour/contrib/hbqt/qtcore/qth/QLatin1String.qth +++ b/harbour/contrib/hbqt/qtcore/qth/QLatin1String.qth @@ -27,7 +27,7 @@ New = */ HB_FUNC( QT_QLATIN1STRING ) { - if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) ) + if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QLATIN1STRING" ) ) { __HB_RETPTRGC__( new QLatin1String( *hbqt_par_QLatin1String( 1 ) ) ); } diff --git a/harbour/contrib/hbqt/qtcore/qth/QLine.qth b/harbour/contrib/hbqt/qtcore/qth/QLine.qth index b9f25a3a87..1762434dbd 100644 --- a/harbour/contrib/hbqt/qtcore/qth/QLine.qth +++ b/harbour/contrib/hbqt/qtcore/qth/QLine.qth @@ -30,11 +30,11 @@ New = */ HB_FUNC( QT_QLINE ) { - if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) ) + if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QLINE" ) ) { __HB_RETPTRGC__( new QLine( *hbqt_par_QLine( 1 ) ) ); } - else if( hb_pcount() == 2 && HB_ISOBJECT( 1 ) && HB_ISOBJECT( 2 ) ) + else if( hb_pcount() == 2 && hbqt_par_isDerivedFrom( 1, "QPOINT" ) && hbqt_par_isDerivedFrom( 2, "QPOINT" ) ) { __HB_RETPTRGC__( new QLine( *hbqt_par_QPoint( 1 ), *hbqt_par_QPoint( 2 ) ) ); } diff --git a/harbour/contrib/hbqt/qtcore/qth/QLineF.qth b/harbour/contrib/hbqt/qtcore/qth/QLineF.qth index 6f8faf9ece..e7d2e002df 100644 --- a/harbour/contrib/hbqt/qtcore/qth/QLineF.qth +++ b/harbour/contrib/hbqt/qtcore/qth/QLineF.qth @@ -30,11 +30,15 @@ Destructor = */ HB_FUNC( QT_QLINEF ) { - if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) ) + if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QLINEF" ) ) { __HB_RETPTRGC__( new QLineF( *hbqt_par_QLineF( 1 ) ) ); } - else if( hb_pcount() == 2 && HB_ISOBJECT( 1 ) && HB_ISOBJECT( 2 ) ) + else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QLINE" ) ) + { + __HB_RETPTRGC__( new QLineF( *hbqt_par_QLine( 1 ) ) ); + } + else if( hb_pcount() == 2 && hbqt_par_isDerivedFrom( 1, "QPOINT" ) && hbqt_par_isDerivedFrom( 2, "QPOINT" ) ) { __HB_RETPTRGC__( new QLineF( *hbqt_par_QPoint( 1 ), *hbqt_par_QPoint( 2 ) ) ); } diff --git a/harbour/contrib/hbqt/qtcore/qth/QList.qth b/harbour/contrib/hbqt/qtcore/qth/QList.qth index 37626df393..20390040e3 100644 --- a/harbour/contrib/hbqt/qtcore/qth/QList.qth +++ b/harbour/contrib/hbqt/qtcore/qth/QList.qth @@ -30,7 +30,7 @@ List = yes */ HB_FUNC( QT_QLIST ) { - if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) ) + if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QLIST" ) ) { __HB_RETPTRGC__( new QList< void * >( *hbqt_par_QList( 1 ) ) ); } diff --git a/harbour/contrib/hbqt/qtcore/qth/QLocale.qth b/harbour/contrib/hbqt/qtcore/qth/QLocale.qth index 83dc876178..bc88791328 100644 --- a/harbour/contrib/hbqt/qtcore/qth/QLocale.qth +++ b/harbour/contrib/hbqt/qtcore/qth/QLocale.qth @@ -30,7 +30,7 @@ Destructor = */ HB_FUNC( QT_QLOCALE ) { - if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) ) + if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QLOCALE" ) ) { __HB_RETPTRGC__( new QLocale( *hbqt_par_QLocale( 1 ) ) ); } diff --git a/harbour/contrib/hbqt/qtcore/qth/QModelIndex.qth b/harbour/contrib/hbqt/qtcore/qth/QModelIndex.qth index d3d8021a8d..6e8cb9b880 100644 --- a/harbour/contrib/hbqt/qtcore/qth/QModelIndex.qth +++ b/harbour/contrib/hbqt/qtcore/qth/QModelIndex.qth @@ -29,7 +29,7 @@ New = */ HB_FUNC( QT_QMODELINDEX ) { - if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) ) + if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QMODELINDEX" ) ) { __HB_RETPTRGC__( new QModelIndex( *hbqt_par_QModelIndex( 1 ) ) ); } diff --git a/harbour/contrib/hbqt/qtcore/qth/QObject.qth b/harbour/contrib/hbqt/qtcore/qth/QObject.qth index 97d3ef4bca..a960fdd58a 100644 --- a/harbour/contrib/hbqt/qtcore/qth/QObject.qth +++ b/harbour/contrib/hbqt/qtcore/qth/QObject.qth @@ -26,7 +26,7 @@ Calls = QT_QObject */ HB_FUNC( QT_QOBJECT ) { - if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) ) + if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QOBJECT" ) ) { __HB_RETPTRGC__( new QObject( hbqt_par_QObject( 1 ) ) ); } diff --git a/harbour/contrib/hbqt/qtcore/qth/QPoint.qth b/harbour/contrib/hbqt/qtcore/qth/QPoint.qth index 803d58fb33..a1e3809db0 100644 --- a/harbour/contrib/hbqt/qtcore/qth/QPoint.qth +++ b/harbour/contrib/hbqt/qtcore/qth/QPoint.qth @@ -33,7 +33,7 @@ HB_FUNC( QT_QPOINT ) { __HB_RETPTRGC__( new QPoint( hb_parni( 1 ), hb_parni( 2 ) ) ); } - else if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) ) + else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QPOINT" ) ) { __HB_RETPTRGC__( new QPoint( *hbqt_par_QPoint( 1 ) ) ); } diff --git a/harbour/contrib/hbqt/qtcore/qth/QPointF.qth b/harbour/contrib/hbqt/qtcore/qth/QPointF.qth index efca8fb8d6..d600d253bb 100644 --- a/harbour/contrib/hbqt/qtcore/qth/QPointF.qth +++ b/harbour/contrib/hbqt/qtcore/qth/QPointF.qth @@ -33,7 +33,7 @@ HB_FUNC( QT_QPOINTF ) { __HB_RETPTRGC__( new QPointF( ( qreal ) hb_parnd( 1 ), ( qreal ) hb_parnd( 2 ) ) ); } - else if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) ) + else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QPOINT" ) ) { __HB_RETPTRGC__( new QPointF( *hbqt_par_QPoint( 1 ) ) ); } diff --git a/harbour/contrib/hbqt/qtcore/qth/QProcess.qth b/harbour/contrib/hbqt/qtcore/qth/QProcess.qth index 7d1f5b9d35..d0c77905ba 100644 --- a/harbour/contrib/hbqt/qtcore/qth/QProcess.qth +++ b/harbour/contrib/hbqt/qtcore/qth/QProcess.qth @@ -27,7 +27,7 @@ New = */ HB_FUNC( QT_QPROCESS ) { - if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) ) + if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QOBJECT" ) ) { __HB_RETPTRGC__( new QProcess( hbqt_par_QObject( 1 ) ) ); } diff --git a/harbour/contrib/hbqt/qtcore/qth/QRect.qth b/harbour/contrib/hbqt/qtcore/qth/QRect.qth index c3b500bf6c..98ce519694 100644 --- a/harbour/contrib/hbqt/qtcore/qth/QRect.qth +++ b/harbour/contrib/hbqt/qtcore/qth/QRect.qth @@ -35,20 +35,13 @@ HB_FUNC( QT_QRECT ) { __HB_RETPTRGC__( new QRect( *hbqt_par_QRect( 1 ) ) ); } - else if( hb_pcount() == 2 && hbqt_par_isDerivedFrom( 1, "QPOINT" ) && HB_ISOBJECT( 2 ) ) + else if( hb_pcount() == 2 && hbqt_par_isDerivedFrom( 1, "QPOINT" ) && hbqt_par_isDerivedFrom( 2, "QPOINT" ) ) { - if( hbqt_par_isDerivedFrom( 2, "QPOINT" ) ) - { - __HB_RETPTRGC__( new QRect( *hbqt_par_QPoint( 1 ), *hbqt_par_QPoint( 2 ) ) ); - } - else if( hbqt_par_isDerivedFrom( 2, "QSIZE" ) ) - { - __HB_RETPTRGC__( new QRect( *hbqt_par_QPoint( 1 ), *hbqt_par_QSize( 2 ) ) ); - } - else - { - __HB_RETPTRGC__( new QRect() ); - } + __HB_RETPTRGC__( new QRect( *hbqt_par_QPoint( 1 ), *hbqt_par_QPoint( 2 ) ) ); + } + else if( hb_pcount() == 2 && hbqt_par_isDerivedFrom( 1, "QPOINT" ) && hbqt_par_isDerivedFrom( 2, "QSIZE" ) ) + { + __HB_RETPTRGC__( new QRect( *hbqt_par_QPoint( 1 ), *hbqt_par_QSize( 2 ) ) ); } else if( hb_pcount() == 4 && HB_ISNUM( 1 ) && HB_ISNUM( 2 ) && HB_ISNUM( 3 ) && HB_ISNUM( 4 ) ) { diff --git a/harbour/contrib/hbqt/qtcore/qth/QRectF.qth b/harbour/contrib/hbqt/qtcore/qth/QRectF.qth index c84a919b5b..36d5b5a404 100644 --- a/harbour/contrib/hbqt/qtcore/qth/QRectF.qth +++ b/harbour/contrib/hbqt/qtcore/qth/QRectF.qth @@ -35,20 +35,13 @@ HB_FUNC( QT_QRECTF ) { __HB_RETPTRGC__( new QRectF( *hbqt_par_QRectF( 1 ) ) ); } - else if( hb_pcount() == 2 && hbqt_par_isDerivedFrom( 1, "QPOINT" ) && HB_ISOBJECT( 2 ) ) + else if( hb_pcount() == 2 && hbqt_par_isDerivedFrom( 1, "QPOINT" ) && hbqt_par_isDerivedFrom( 2, "QPOINTF" ) ) { - if( hbqt_par_isDerivedFrom( 2, "QPOINTF" ) ) - { - __HB_RETPTRGC__( new QRectF( *hbqt_par_QPointF( 1 ), *hbqt_par_QPointF( 2 ) ) ); - } - else if( hbqt_par_isDerivedFrom( 2, "QSIZEF" ) ) - { - __HB_RETPTRGC__( new QRectF( *hbqt_par_QPointF( 1 ), *hbqt_par_QSizeF( 2 ) ) ); - } - else - { - __HB_RETPTRGC__( new QRectF() ); - } + __HB_RETPTRGC__( new QRectF( *hbqt_par_QPointF( 1 ), *hbqt_par_QPointF( 2 ) ) ); + } + else if( hb_pcount() == 2 && hbqt_par_isDerivedFrom( 1, "QPOINT" ) && hbqt_par_isDerivedFrom( 2, "QSIZEF" ) ) + { + __HB_RETPTRGC__( new QRectF( *hbqt_par_QPointF( 1 ), *hbqt_par_QSizeF( 2 ) ) ); } else if( hb_pcount() == 4 && HB_ISNUM( 1 ) && HB_ISNUM( 2 ) && HB_ISNUM( 3 ) && HB_ISNUM( 4 ) ) { diff --git a/harbour/contrib/hbqt/qtcore/qth/QRegExp.qth b/harbour/contrib/hbqt/qtcore/qth/QRegExp.qth index 91d724af6c..864f75d145 100644 --- a/harbour/contrib/hbqt/qtcore/qth/QRegExp.qth +++ b/harbour/contrib/hbqt/qtcore/qth/QRegExp.qth @@ -30,7 +30,7 @@ Destructor = */ HB_FUNC( QT_QREGEXP ) { - if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) ) + if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QREGEXP" ) ) { __HB_RETPTRGC__( new QRegExp( *hbqt_par_QRegExp( 1 ) ) ); } diff --git a/harbour/contrib/hbqt/qtcore/qth/QResource.qth b/harbour/contrib/hbqt/qtcore/qth/QResource.qth index 59179069fd..2b6f78525f 100644 --- a/harbour/contrib/hbqt/qtcore/qth/QResource.qth +++ b/harbour/contrib/hbqt/qtcore/qth/QResource.qth @@ -30,10 +30,16 @@ ClubMethods = no */ HB_FUNC( QT_QRESOURCE ) { - if( hb_pcount() >= 1 && HB_ISCHAR( 1 ) ) + if( hb_pcount() == 2 && HB_ISCHAR( 1 ) && hbqt_par_isDerivedFrom( 2, "QLOCALE" ) ) { void * pText01 = NULL; - __HB_RETPTRGC__( new QResource( hb_parstr_utf8( 1, &pText01, NULL ), HB_ISOBJECT( 2 ) ? *hbqt_par_QLocale( 2 ) : QLocale() ) ); + __HB_RETPTRGC__( new QResource( hb_parstr_utf8( 1, &pText01, NULL ), *hbqt_par_QLocale( 2 ) ) ); + hb_strfree( pText01 ); + } + if( hb_pcount() == 1 && HB_ISCHAR( 1 ) ) + { + void * pText01 = NULL; + __HB_RETPTRGC__( new QResource( hb_parstr_utf8( 1, &pText01, NULL ), QLocale() ) ); hb_strfree( pText01 ); } else diff --git a/harbour/contrib/hbqt/qtcore/qth/QSettings.qth b/harbour/contrib/hbqt/qtcore/qth/QSettings.qth index ca9e8baa55..71a8dd54e9 100644 --- a/harbour/contrib/hbqt/qtcore/qth/QSettings.qth +++ b/harbour/contrib/hbqt/qtcore/qth/QSettings.qth @@ -31,38 +31,98 @@ New = */ HB_FUNC( QT_QSETTINGS ) { - if( hb_pcount() >= 2 && HB_ISCHAR( 1 ) && HB_ISCHAR( 2 ) ) + if( hb_pcount() == 3 && HB_ISCHAR( 1 ) && HB_ISCHAR( 2 ) && hbqt_par_isDerivedFrom( 3, "QOBJECT" ) ) { void * pText01 = NULL; void * pText02 = NULL; - __HB_RETPTRGC__( new QSettings( hb_parstr_utf8( 1, &pText01, NULL ), hb_parstr_utf8( 2, &pText02, NULL ), HB_ISOBJECT( 3 ) ? hbqt_par_QObject( 3 ) : 0 ) ); + __HB_RETPTRGC__( new QSettings( hb_parstr_utf8( 1, &pText01, NULL ), hb_parstr_utf8( 2, &pText02, NULL ), hbqt_par_QObject( 3 ) ) ); hb_strfree( pText01 ); hb_strfree( pText02 ); } - else if( hb_pcount() >= 2 && HB_ISCHAR( 1 ) && HB_ISNUM( 2 ) ) - { - void * pText01 = NULL; - __HB_RETPTRGC__( new QSettings( hb_parstr_utf8( 1, &pText01, NULL ), ( QSettings::Format ) hb_parni( 2 ), HB_ISOBJECT( 3 ) ? hbqt_par_QObject( 3 ) : 0 ) ); - hb_strfree( pText01 ); - } - else if( hb_pcount() >= 2 && HB_ISNUM( 1 ) && HB_ISCHAR( 2 ) ) - { - void * pText01 = NULL; - __HB_RETPTRGC__( new QSettings( ( QSettings::Scope ) hb_parni( 1 ), hb_parstr_utf8( 2, &pText01, NULL ), HB_ISCHAR( 3 ) ? hbqt_par_QString( 3 ) : QString(), HB_ISOBJECT( 4 ) ? hbqt_par_QObject( 4 ) : 0 ) ); - hb_strfree( pText01 ); - } - else if( hb_pcount() >= 4 && HB_ISNUM( 1 ) && HB_ISNUM( 2 ) && HB_ISCHAR( 3 ) && HB_ISCHAR( 4 ) ) + if( hb_pcount() == 2 && HB_ISCHAR( 1 ) && HB_ISCHAR( 2 ) ) { void * pText01 = NULL; void * pText02 = NULL; - __HB_RETPTRGC__( new QSettings( ( QSettings::Format ) hb_parni( 1 ), ( QSettings::Scope ) hb_parni( 2 ), hb_parstr_utf8( 3, &pText01, NULL ), hb_parstr_utf8( 4, &pText02, NULL ), HB_ISOBJECT( 5 ) ? hbqt_par_QObject( 5 ) : 0 ) ); + __HB_RETPTRGC__( new QSettings( hb_parstr_utf8( 1, &pText01, NULL ), hb_parstr_utf8( 2, &pText02, NULL ), 0 ) ); hb_strfree( pText01 ); hb_strfree( pText02 ); } - else if( hb_pcount() >= 3 && HB_ISNUM( 1 ) && HB_ISNUM( 2 ) && HB_ISCHAR( 3 ) ) + else if( hb_pcount() == 3 && HB_ISCHAR( 1 ) && HB_ISNUM( 2 ) && hbqt_par_isDerivedFrom( 3, "QOBJECT" ) ) { void * pText01 = NULL; - __HB_RETPTRGC__( new QSettings( ( QSettings::Format ) hb_parni( 1 ), ( QSettings::Scope ) hb_parni( 2 ), hb_parstr_utf8( 3, &pText01, NULL ), QString(), HB_ISOBJECT( 5 ) ? hbqt_par_QObject( 5 ) : 0 ) ); + __HB_RETPTRGC__( new QSettings( hb_parstr_utf8( 1, &pText01, NULL ), ( QSettings::Format ) hb_parni( 2 ), hbqt_par_QObject( 3 ) ) ); + hb_strfree( pText01 ); + } + else if( hb_pcount() == 2 && HB_ISCHAR( 1 ) && HB_ISNUM( 2 ) ) + { + void * pText01 = NULL; + __HB_RETPTRGC__( new QSettings( hb_parstr_utf8( 1, &pText01, NULL ), ( QSettings::Format ) hb_parni( 2 ), 0 ) ); + hb_strfree( pText01 ); + } + else if( hb_pcount() == 3 && HB_ISCHAR( 1 ) && HB_ISNUM( 2 ) && hbqt_par_isDerivedFrom( 3, "QOBJECT" ) ) + { + void * pText01 = NULL; + __HB_RETPTRGC__( new QSettings( hb_parstr_utf8( 1, &pText01, NULL ), ( QSettings::Format ) hb_parni( 2 ), hbqt_par_QObject( 3 ) ) ); + hb_strfree( pText01 ); + } + else if( hb_pcount() == 4 && HB_ISNUM( 1 ) && HB_ISCHAR( 2 ) && HB_ISCHAR( 3 ) && hbqt_par_isDerivedFrom( 4, "QOBJECT" ) ) + { + void * pText01 = NULL; + void * pText02 = NULL; + __HB_RETPTRGC__( new QSettings( ( QSettings::Scope ) hb_parni( 1 ), hb_parstr_utf8( 2, &pText01, NULL ), hb_parstr_utf8( 3, &pText02, NULL ), hbqt_par_QObject( 4 ) ) ); + hb_strfree( pText01 ); + hb_strfree( pText02 ); + } + else if( hb_pcount() == 4 && HB_ISNUM( 1 ) && HB_ISCHAR( 2 ) && HB_ISCHAR( 3 ) ) + { + void * pText01 = NULL; + void * pText02 = NULL; + __HB_RETPTRGC__( new QSettings( ( QSettings::Scope ) hb_parni( 1 ), hb_parstr_utf8( 2, &pText01, NULL ), hb_parstr_utf8( 3, &pText02, NULL ), 0 ) ); + hb_strfree( pText01 ); + hb_strfree( pText02 ); + } + else if( hb_pcount() == 2 && HB_ISNUM( 1 ) && HB_ISCHAR( 2 ) ) + { + void * pText01 = NULL; + __HB_RETPTRGC__( new QSettings( ( QSettings::Scope ) hb_parni( 1 ), hb_parstr_utf8( 2, &pText01, NULL ), QString(), 0 ) ); + hb_strfree( pText01 ); + } + else if( hb_pcount() == 5 && HB_ISNUM( 1 ) && HB_ISNUM( 2 ) && HB_ISCHAR( 3 ) && HB_ISCHAR( 4 ) && hbqt_par_isDerivedFrom( 5, "QOBJECT" ) ) + { + void * pText01 = NULL; + void * pText02 = NULL; + __HB_RETPTRGC__( new QSettings( ( QSettings::Format ) hb_parni( 1 ), ( QSettings::Scope ) hb_parni( 2 ), hb_parstr_utf8( 3, &pText01, NULL ), hb_parstr_utf8( 4, &pText02, NULL ), hbqt_par_QObject( 5 ) ) ); + hb_strfree( pText01 ); + hb_strfree( pText02 ); + } + else if( hb_pcount() == 4 && HB_ISNUM( 1 ) && HB_ISNUM( 2 ) && HB_ISCHAR( 3 ) && HB_ISCHAR( 4 ) ) + { + void * pText01 = NULL; + void * pText02 = NULL; + __HB_RETPTRGC__( new QSettings( ( QSettings::Format ) hb_parni( 1 ), ( QSettings::Scope ) hb_parni( 2 ), hb_parstr_utf8( 3, &pText01, NULL ), hb_parstr_utf8( 4, &pText02, NULL ), 0 ) ); + hb_strfree( pText01 ); + hb_strfree( pText02 ); + } + else if( hb_pcount() == 5 && HB_ISNUM( 1 ) && HB_ISNUM( 2 ) && HB_ISCHAR( 3 ) && HB_ISCHAR( 4 ) && hbqt_par_isDerivedFrom( 5, "QOBJECT" ) ) + { + void * pText01 = NULL; + void * pText02 = NULL; + __HB_RETPTRGC__( new QSettings( ( QSettings::Format ) hb_parni( 1 ), ( QSettings::Scope ) hb_parni( 2 ), hb_parstr_utf8( 3, &pText01, NULL ), hb_parstr_utf8( 4, &pText02, NULL ), hbqt_par_QObject( 5 ) ) ); + hb_strfree( pText01 ); + hb_strfree( pText02 ); + } + else if( hb_pcount() == 4 && HB_ISNUM( 1 ) && HB_ISNUM( 2 ) && HB_ISCHAR( 3 ) && HB_ISCHAR( 4 ) ) + { + void * pText01 = NULL; + void * pText02 = NULL; + __HB_RETPTRGC__( new QSettings( ( QSettings::Format ) hb_parni( 1 ), ( QSettings::Scope ) hb_parni( 2 ), hb_parstr_utf8( 3, &pText01, NULL ), hb_parstr_utf8( 4, &pText02, NULL ), 0 ) ); + hb_strfree( pText01 ); + hb_strfree( pText02 ); + } + else if( hb_pcount() == 3 && HB_ISNUM( 1 ) && HB_ISNUM( 2 ) && HB_ISCHAR( 3 ) ) + { + void * pText01 = NULL; + __HB_RETPTRGC__( new QSettings( ( QSettings::Format ) hb_parni( 1 ), ( QSettings::Scope ) hb_parni( 2 ), hb_parstr_utf8( 3, &pText01, NULL ), QString(), 0 ) ); hb_strfree( pText01 ); } else diff --git a/harbour/contrib/hbqt/qtcore/qth/QSignalMapper.qth b/harbour/contrib/hbqt/qtcore/qth/QSignalMapper.qth index 295b8c03bb..26a6df3af0 100644 --- a/harbour/contrib/hbqt/qtcore/qth/QSignalMapper.qth +++ b/harbour/contrib/hbqt/qtcore/qth/QSignalMapper.qth @@ -26,7 +26,14 @@ New = pParent */ HB_FUNC( QT_QSIGNALMAPPER ) { - __HB_RETPTRGC__( new QSignalMapper( HB_ISOBJECT( 1 ) ? hbqt_par_QObject( 1 ) : 0 ) ); + if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QOBJECT" ) ) + { + __HB_RETPTRGC__( new QSignalMapper( hbqt_par_QObject( 1 ) ) ); + } + else + { + __HB_RETPTRGC__( new QSignalMapper( 0 ) ); + } } diff --git a/harbour/contrib/hbqt/qtcore/qth/QSize.qth b/harbour/contrib/hbqt/qtcore/qth/QSize.qth index de47016b81..adb6e0c939 100644 --- a/harbour/contrib/hbqt/qtcore/qth/QSize.qth +++ b/harbour/contrib/hbqt/qtcore/qth/QSize.qth @@ -33,7 +33,7 @@ HB_FUNC( QT_QSIZE ) { __HB_RETPTRGC__( new QSize( hb_parni( 1 ), hb_parni( 2 ) ) ); } - else if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) ) + else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QSIZE" ) ) { __HB_RETPTRGC__( new QSize( *hbqt_par_QSize( 1 ) ) ); } diff --git a/harbour/contrib/hbqt/qtcore/qth/QSizeF.qth b/harbour/contrib/hbqt/qtcore/qth/QSizeF.qth index 405a4216ee..fd4e88dcb6 100644 --- a/harbour/contrib/hbqt/qtcore/qth/QSizeF.qth +++ b/harbour/contrib/hbqt/qtcore/qth/QSizeF.qth @@ -33,7 +33,7 @@ HB_FUNC( QT_QSIZEF ) { __HB_RETPTRGC__( new QSizeF( hb_parnd( 1 ), hb_parnd( 2 ) ) ); } - else if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) ) + else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QSIZEF" ) ) { __HB_RETPTRGC__( new QSizeF( *hbqt_par_QSizeF( 1 ) ) ); } diff --git a/harbour/contrib/hbqt/qtcore/qth/QStringList.qth b/harbour/contrib/hbqt/qtcore/qth/QStringList.qth index 4c05aa1bbb..7d39f2da92 100644 --- a/harbour/contrib/hbqt/qtcore/qth/QStringList.qth +++ b/harbour/contrib/hbqt/qtcore/qth/QStringList.qth @@ -30,7 +30,7 @@ New = */ HB_FUNC( QT_QSTRINGLIST ) { - if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) ) + if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QSTRINGLIST" ) ) { __HB_RETPTRGC__( new QStringList( *hbqt_par_QStringList( 1 ) ) ); } diff --git a/harbour/contrib/hbqt/qtcore/qth/QStringRef.qth b/harbour/contrib/hbqt/qtcore/qth/QStringRef.qth index fcf9b75f91..1c1c33add8 100644 --- a/harbour/contrib/hbqt/qtcore/qth/QStringRef.qth +++ b/harbour/contrib/hbqt/qtcore/qth/QStringRef.qth @@ -37,7 +37,7 @@ HB_FUNC( QT_QSTRINGREF ) __HB_RETPTRGC__( new QStringRef( ( const QString * ) hb_parstr_utf8( 1, &pText01, NULL ) ) ); hb_strfree( pText01 ); } - else if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) ) + else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QSTRINGREF" ) ) { __HB_RETPTRGC__( new QStringRef( * hbqt_par_QStringRef( 1 ) ) ); } diff --git a/harbour/contrib/hbqt/qtcore/qth/QTextBoundaryFinder.qth b/harbour/contrib/hbqt/qtcore/qth/QTextBoundaryFinder.qth index 858faf637a..fc8c5b16bd 100644 --- a/harbour/contrib/hbqt/qtcore/qth/QTextBoundaryFinder.qth +++ b/harbour/contrib/hbqt/qtcore/qth/QTextBoundaryFinder.qth @@ -31,7 +31,7 @@ New = */ HB_FUNC( QT_QTEXTBOUNDARYFINDER ) { - if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) ) + if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QTEXTBOUNDARYFINDER" ) ) { __HB_RETPTRGC__( new QTextBoundaryFinder( *hbqt_par_QTextBoundaryFinder( 1 ) ) ); } @@ -41,7 +41,7 @@ HB_FUNC( QT_QTEXTBOUNDARYFINDER ) __HB_RETPTRGC__( new QTextBoundaryFinder( ( QTextBoundaryFinder::BoundaryType ) hb_parni( 1 ), hb_parstr_utf8( 2, &pText01, NULL ) ) ); hb_strfree( pText01 ); } - else if( hb_pcount() >= 3 && HB_ISNUM( 1 ) && HB_ISOBJECT( 2 ) && HB_ISNUM( 3 ) ) + else if( hb_pcount() >= 3 && HB_ISNUM( 1 ) && hbqt_par_isDerivedFrom( 2, "QCHAR" ) && HB_ISNUM( 3 ) ) { __HB_RETPTRGC__( new QTextBoundaryFinder( ( QTextBoundaryFinder::BoundaryType ) hb_parni( 1 ), hbqt_par_QChar( 2 ), hb_parni( 3 ), HB_ISCHAR( 4 ) ? ( unsigned char * ) hb_parc( 4 ) : 0, hb_parni( 5 ) ) ); } diff --git a/harbour/contrib/hbqt/qtcore/qth/QTextDecoder.qth b/harbour/contrib/hbqt/qtcore/qth/QTextDecoder.qth index d4adafc2b0..e81d0fc6c9 100644 --- a/harbour/contrib/hbqt/qtcore/qth/QTextDecoder.qth +++ b/harbour/contrib/hbqt/qtcore/qth/QTextDecoder.qth @@ -28,7 +28,7 @@ New = pTextCodec */ HB_FUNC( QT_QTEXTDECODER ) { - if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) ) + if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QTEXTCODEC" ) ) { __HB_RETPTRGC__( new QTextDecoder( hbqt_par_QTextCodec( 1 ) ) ); } diff --git a/harbour/contrib/hbqt/qtcore/qth/QTextEncoder.qth b/harbour/contrib/hbqt/qtcore/qth/QTextEncoder.qth index 3f7c7c87df..c4a39d465c 100644 --- a/harbour/contrib/hbqt/qtcore/qth/QTextEncoder.qth +++ b/harbour/contrib/hbqt/qtcore/qth/QTextEncoder.qth @@ -28,7 +28,7 @@ New = */ HB_FUNC( QT_QTEXTENCODER ) { - if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) ) + if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QTEXTCODEC" ) ) { __HB_RETPTRGC__( new QTextEncoder( hbqt_par_QTextCodec( 1 ) ) ); } diff --git a/harbour/contrib/hbqt/qtcore/qth/QTextStream.qth b/harbour/contrib/hbqt/qtcore/qth/QTextStream.qth index 5c05e07065..e569a0a085 100644 --- a/harbour/contrib/hbqt/qtcore/qth/QTextStream.qth +++ b/harbour/contrib/hbqt/qtcore/qth/QTextStream.qth @@ -32,20 +32,19 @@ New = cText, nIOMode */ HB_FUNC( QT_QTEXTSTREAM ) { - if( hb_pcount() >= 1 && HB_ISOBJECT( 1 ) ) + if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QIODEVICE" ) ) { - if( hbqt_par_isDerivedFrom( 1, "QIODEVICE" ) ) - { - __HB_RETPTRGC__( new QTextStream( hbqt_par_QIODevice( 1 ) ) ); - } - else if( hbqt_par_isDerivedFrom( 1, "QBYTEARRAY" ) ) - { - __HB_RETPTRGC__( new QTextStream( hbqt_par_QByteArray( 1 ), ( QIODevice::OpenMode ) ( HB_ISNUM( 2 ) ? hb_parni( 2 ) : QIODevice::ReadWrite ) ) ); - } + __HB_RETPTRGC__( new QTextStream( hbqt_par_QIODevice( 1 ) ) ); + } + else if( hb_pcount() >= 1 && hbqt_par_isDerivedFrom( 1, "QBYTEARRAY" ) ) + { + __HB_RETPTRGC__( new QTextStream( hbqt_par_QByteArray( 1 ), ( QIODevice::OpenMode ) ( HB_ISNUM( 2 ) ? hb_parni( 2 ) : QIODevice::ReadWrite ) ) ); } else if( hb_pcount() >= 1 && HB_ISCHAR( 1 ) ) { - __HB_RETPTRGC__( new QTextStream( hb_parcx( 1 ), ( QIODevice::OpenMode ) ( HB_ISNUM( 2 ) ? hb_parni( 2 ) : QIODevice::ReadWrite ) ) ); + void * pText01 = NULL; + __HB_RETPTRGC__( new QTextStream( hb_parstr_utf8( 1, &pText01, NULL ), ( QIODevice::OpenMode ) ( HB_ISNUM( 2 ) ? hb_parni( 2 ) : QIODevice::ReadWrite ) ) ); + hb_strfree( pText01 ); } else { diff --git a/harbour/contrib/hbqt/qtcore/qth/QTime.qth b/harbour/contrib/hbqt/qtcore/qth/QTime.qth index bb00d666c1..17cc8ef7d8 100644 --- a/harbour/contrib/hbqt/qtcore/qth/QTime.qth +++ b/harbour/contrib/hbqt/qtcore/qth/QTime.qth @@ -28,7 +28,7 @@ Destructor = */ HB_FUNC( QT_QTIME ) { - if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) ) + if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QTIME" ) ) { __HB_RETPTRGC__( new QTime( *hbqt_par_QTime( 1 ) ) ); } diff --git a/harbour/contrib/hbqt/qtcore/qth/QTimeLine.qth b/harbour/contrib/hbqt/qtcore/qth/QTimeLine.qth index 5e8a8b728b..6803ebda89 100644 --- a/harbour/contrib/hbqt/qtcore/qth/QTimeLine.qth +++ b/harbour/contrib/hbqt/qtcore/qth/QTimeLine.qth @@ -28,9 +28,13 @@ New = */ HB_FUNC( QT_QTIMELINE ) { - if( hb_pcount() >= 1 && HB_ISNUM( 1 ) ) + if( hb_pcount() == 2 && HB_ISNUM( 1 ) && hbqt_par_isDerivedFrom( 2, "QOBJECT" ) ) { - __HB_RETPTRGC__( new QTimeLine( hb_parni( 1 ), HB_ISOBJECT( 2 ) ? hbqt_par_QObject( 2 ) : 0 ) ); + __HB_RETPTRGC__( new QTimeLine( hb_parni( 1 ), hbqt_par_QObject( 2 ) ) ); + } + else if( hb_pcount() == 1 && HB_ISNUM( 1 ) ) + { + __HB_RETPTRGC__( new QTimeLine( hb_parni( 1 ) ) ); } else { diff --git a/harbour/contrib/hbqt/qtcore/qth/QTimer.qth b/harbour/contrib/hbqt/qtcore/qth/QTimer.qth index 69b76cd36a..15a0166e48 100644 --- a/harbour/contrib/hbqt/qtcore/qth/QTimer.qth +++ b/harbour/contrib/hbqt/qtcore/qth/QTimer.qth @@ -26,7 +26,14 @@ New = pParent */ HB_FUNC( QT_QTIMER ) { - __HB_RETPTRGC__( new QTimer( HB_ISOBJECT( 1 ) ? hbqt_par_QObject( 1 ) : 0 ) ); + if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QOBJECT" ) ) + { + __HB_RETPTRGC__( new QTimer( hbqt_par_QObject( 1 ) ) ); + } + else + { + __HB_RETPTRGC__( new QTimer() ); + } } diff --git a/harbour/contrib/hbqt/qtcore/qth/QTranslator.qth b/harbour/contrib/hbqt/qtcore/qth/QTranslator.qth index 49a6977f94..73f8664b87 100644 --- a/harbour/contrib/hbqt/qtcore/qth/QTranslator.qth +++ b/harbour/contrib/hbqt/qtcore/qth/QTranslator.qth @@ -28,13 +28,13 @@ Destructor = */ HB_FUNC( QT_QTRANSLATOR ) { - if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) ) + if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QTRANSLATOR" ) ) { __HB_RETPTRGC__( new QTranslator( hbqt_par_QTranslator( 1 ) ) ); } else { - __HB_RETPTRGC__( new QTranslator( HB_ISOBJECT( 1 ) ? hbqt_par_QObject( 1 ) : 0 ) ); + __HB_RETPTRGC__( new QTranslator() ); } } diff --git a/harbour/contrib/hbqt/qtcore/qth/QUrl.qth b/harbour/contrib/hbqt/qtcore/qth/QUrl.qth index fbc35efe39..c3f092bc12 100644 --- a/harbour/contrib/hbqt/qtcore/qth/QUrl.qth +++ b/harbour/contrib/hbqt/qtcore/qth/QUrl.qth @@ -37,7 +37,7 @@ HB_FUNC( QT_QURL ) __HB_RETPTRGC__( new QUrl( hb_parstr_utf8( 1, &pText01, NULL ) ) ); hb_strfree( pText01 ); } - else if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) ) + else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QURL" ) ) { __HB_RETPTRGC__( new QUrl( *hbqt_par_QUrl( 1 ) ) ); }