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" )
This commit is contained in:
Pritpal Bedi
2012-05-07 06:42:13 +00:00
parent 1c224790af
commit 1eeb32a3f6
49 changed files with 274 additions and 153 deletions

View File

@@ -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

View File

@@ -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 ) ) );
}

View File

@@ -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 ) ) );
}

View File

@@ -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() );
}
}
</CODE>

View File

@@ -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 ) ) );
}

View File

@@ -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 ) ) );
}

View File

@@ -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 ) ) );
}

View File

@@ -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 ) )
{

View File

@@ -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 ) ) );
}

View File

@@ -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 ) );
}

View File

@@ -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 ) ) );
}

View File

@@ -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 ) ) );
}

View File

@@ -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 ) );
}
}
}
</CODE>

View File

@@ -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 ) ) );

View File

@@ -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 ) )
{

View File

@@ -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 ) ) );
}

View File

@@ -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 ) ) );
}

View File

@@ -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 ) ) );
}

View File

@@ -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 ()
<VARIABLES>
</VARIABLES>

View File

@@ -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 ) ) );
}

View File

@@ -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 ) ) );
}

View File

@@ -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 ) ) );
}

View File

@@ -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 ) ) );
}

View File

@@ -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 ) ) );
}

View File

@@ -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 ) ) );
}

View File

@@ -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 ) ) );
}

View File

@@ -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 ) ) );
}

View File

@@ -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 ) ) );
}

View File

@@ -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 ) ) );
}

View File

@@ -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 ) ) );
}

View File

@@ -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 ) )
{

View File

@@ -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 ) )
{

View File

@@ -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 ) ) );
}

View File

@@ -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

View File

@@ -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

View File

@@ -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 ) );
}
}
</CODE>

View File

@@ -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 ) ) );
}

View File

@@ -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 ) ) );
}

View File

@@ -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 ) ) );
}

View File

@@ -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 ) ) );
}

View File

@@ -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 ) ) );
}

View File

@@ -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 ) ) );
}

View File

@@ -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 ) ) );
}

View File

@@ -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
{

View File

@@ -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 ) ) );
}

View File

@@ -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
{

View File

@@ -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() );
}
}
</CODE>

View File

@@ -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() );
}
}
</CODE>

View File

@@ -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 ) ) );
}