diff --git a/harbour/ChangeLog b/harbour/ChangeLog index c3af7b8bd9..40063c8f63 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,85 @@ The license applies to all entries newer than 2009-04-28. */ +2012-05-07 20:08 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) + * contrib/hbqt/qtgui/qth/QDeclarativeEngine.qth + * contrib/hbqt/qtgui/qth/QDeclarativeError.qth + * contrib/hbqt/qtgui/qth/QDeclarativeItem.qth + * contrib/hbqt/qtgui/qth/QDeclarativeListReference.qth + * contrib/hbqt/qtgui/qth/QDeclarativePropertyMap.qth + * contrib/hbqt/qtgui/qth/QDeclarativeScriptString.qth + * contrib/hbqt/qtgui/qth/QDialogButtonBox.qth + * contrib/hbqt/qtgui/qth/QDockWidget.qth + * contrib/hbqt/qtgui/qth/QDoubleValidator.qth + * contrib/hbqt/qtgui/qth/QDragEnterEvent.qth + * contrib/hbqt/qtgui/qth/QDragLeaveEvent.qth + * contrib/hbqt/qtgui/qth/QDragMoveEvent.qth + * contrib/hbqt/qtgui/qth/QDropEvent.qth + * contrib/hbqt/qtgui/qth/QFileDialog.qth + * contrib/hbqt/qtgui/qth/QFileOpenEvent.qth + * contrib/hbqt/qtgui/qth/QFocusEvent.qth + * contrib/hbqt/qtgui/qth/QFont.qth + * contrib/hbqt/qtgui/qth/QFontDialog.qth + * contrib/hbqt/qtgui/qth/QFontInfo.qth + * contrib/hbqt/qtgui/qth/QGraphicsGridLayout.qth + * contrib/hbqt/qtgui/qth/QGraphicsItemAnimation.qth + * contrib/hbqt/qtgui/qth/QGraphicsItemGroup.qth + * contrib/hbqt/qtgui/qth/QGraphicsLinearLayout.qth + * contrib/hbqt/qtgui/qth/QGraphicsProxyWidget.qth + * contrib/hbqt/qtgui/qth/QGraphicsSimpleTextItem.qth + * contrib/hbqt/qtgui/qth/QGraphicsSvgItem.qth + * contrib/hbqt/qtgui/qth/QGraphicsTextItem.qth + * contrib/hbqt/qtgui/qth/QGraphicsWidget.qth + * contrib/hbqt/qtgui/qth/QHelpEvent.qth + * contrib/hbqt/qtgui/qth/QHideEvent.qth + * contrib/hbqt/qtgui/qth/QHoverEvent.qth + * contrib/hbqt/qtgui/qth/QImage.qth + * contrib/hbqt/qtgui/qth/QInputEvent.qth + * contrib/hbqt/qtgui/qth/QInputMethodEvent.qth + * contrib/hbqt/qtgui/qth/QIntValidator.qth + * contrib/hbqt/qtgui/qth/QItemDelegate.qth + * contrib/hbqt/qtgui/qth/QItemEditorFactory.qth + * contrib/hbqt/qtgui/qth/QItemSelectionModel.qth + * contrib/hbqt/qtgui/qth/QKeyEvent.qth + * contrib/hbqt/qtgui/qth/QKeySequence.qth + * contrib/hbqt/qtgui/qth/QLabel.qth + * contrib/hbqt/qtgui/qth/QLinearGradient.qth + * contrib/hbqt/qtgui/qth/QListWidget.qth + * contrib/hbqt/qtgui/qth/QMainWindow.qth + * contrib/hbqt/qtgui/qth/QMdiArea.qth + * contrib/hbqt/qtgui/qth/QMdiSubWindow.qth + * contrib/hbqt/qtgui/qth/QMenu.qth + * contrib/hbqt/qtgui/qth/QMenuBar.qth + * contrib/hbqt/qtgui/qth/QMessageBox.qth + * contrib/hbqt/qtgui/qth/QMouseEvent.qth + * contrib/hbqt/qtgui/qth/QMoveEvent.qth + * contrib/hbqt/qtgui/qth/QPainter.qth + * contrib/hbqt/qtgui/qth/QPaintEvent.qth + * contrib/hbqt/qtgui/qth/QPalette.qth + * contrib/hbqt/qtgui/qth/QPicture.qth + * contrib/hbqt/qtgui/qth/QPlainTextDocumentLayout.qth + * contrib/hbqt/qtgui/qth/QPlainTextEdit.qth + * contrib/hbqt/qtgui/qth/QPrinter.qth + * contrib/hbqt/qtgui/qth/QPushButton.qth + * contrib/hbqt/qtgui/qth/QRadialGradient.qth + * contrib/hbqt/qtgui/qth/QRadioButton.qth + * contrib/hbqt/qtgui/qth/QRegExpValidator.qth + * contrib/hbqt/qtgui/qth/QResizeEvent.qth + * contrib/hbqt/qtgui/qth/QShortcutEvent.qth + * contrib/hbqt/qtgui/qth/QShowEvent.qth + * contrib/hbqt/qtgui/qth/QSizePolicy.qth + * contrib/hbqt/qtgui/qth/QSortFilterProxyModel.qth + * contrib/hbqt/qtgui/qth/QSpacerItem.qth + * contrib/hbqt/qtgui/qth/QTableWidgetItem.qth + * contrib/hbqt/qtgui/qth/QTextBlock.qth + * contrib/hbqt/qtgui/qth/QTextBlockFormat.qth + * contrib/hbqt/qtgui/qth/QToolBar.qth + * contrib/hbqt/qtgui/qth/QWheelEvent.qth + * contrib/hbqt/qtgui/qth/QWidget.qth + * contrib/hbqt/qtgui/qth/QWindowStateChangeEvent.qth + - Replaced: HB_ISOBJECT( n ) => hbqt_par_isDerivedFrom( n, "QXXX" ) + + Added: RTE where needed. + 2012-05-07 01:04 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) * contrib/hbqt/qtcore/hbqt_pointer.cpp + Added: hbqt_par_isDerivedFrom() - protection against a null diff --git a/harbour/contrib/hbqt/qtgui/qth/QDeclarativeEngine.qth b/harbour/contrib/hbqt/qtgui/qth/QDeclarativeEngine.qth index ff3c4246df..7f92750d2c 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QDeclarativeEngine.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QDeclarativeEngine.qth @@ -72,7 +72,7 @@ Version = 0x040700 */ HB_FUNC( QT_QDECLARATIVEENGINE ) { - if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) ) + if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QOBJECT" ) ) { __HB_RETPTRGC__( new QDeclarativeEngine( hbqt_par_QObject( 1 ) ) ); } diff --git a/harbour/contrib/hbqt/qtgui/qth/QDeclarativeError.qth b/harbour/contrib/hbqt/qtgui/qth/QDeclarativeError.qth index 6b66834c36..b56b347d47 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QDeclarativeError.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QDeclarativeError.qth @@ -71,7 +71,7 @@ Version = 0x040700 */ HB_FUNC( QT_QDECLARATIVEERROR ) { - if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) ) + if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QDECLARATIVEERROR" ) ) { __HB_RETPTRGC__( new QDeclarativeError( *hbqt_par_QDeclarativeError( 1 ) ) ); } diff --git a/harbour/contrib/hbqt/qtgui/qth/QDeclarativeItem.qth b/harbour/contrib/hbqt/qtgui/qth/QDeclarativeItem.qth index 50ecab97d9..1bf748d5ff 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QDeclarativeItem.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QDeclarativeItem.qth @@ -72,7 +72,7 @@ Version = 0x040700 */ HB_FUNC( QT_QDECLARATIVEITEM ) { - if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) ) + if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QDECLARATIVEITEM" ) ) { __HB_RETPTRGC__( new QDeclarativeItem( hbqt_par_QDeclarativeItem( 1 ) ) ); } diff --git a/harbour/contrib/hbqt/qtgui/qth/QDeclarativeListReference.qth b/harbour/contrib/hbqt/qtgui/qth/QDeclarativeListReference.qth index 9624c4feb6..9133ae398b 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QDeclarativeListReference.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QDeclarativeListReference.qth @@ -72,9 +72,13 @@ Version = 0x040700 */ HB_FUNC( QT_QDECLARATIVELISTREFERENCE ) { - if( hb_pcount() >= 2 && HB_ISOBJECT( 1 ) && HB_ISCHAR( 2 ) ) + if( hb_pcount() == 2 && hbqt_par_isDerivedFrom( 1, "QOBJECT" ) && HB_ISCHAR( 2 ) && hbqt_par_isDerivedFrom( 1, "QDECLARATIVEENGINE" ) ) { - __HB_RETPTRGC__( new QDeclarativeListReference( hbqt_par_QObject( 1 ), hb_parc( 2 ), HB_ISOBJECT( 3 ) ? hbqt_par_QDeclarativeEngine( 3 ) : 0 ) ); + __HB_RETPTRGC__( new QDeclarativeListReference( hbqt_par_QObject( 1 ), hb_parc( 2 ), hbqt_par_QDeclarativeEngine( 3 ) ) ); + } + if( hb_pcount() == 2 && hbqt_par_isDerivedFrom( 1, "QOBJECT" ) && HB_ISCHAR( 2 ) ) + { + __HB_RETPTRGC__( new QDeclarativeListReference( hbqt_par_QObject( 1 ), hb_parc( 2 ), 0 ) ); } else { diff --git a/harbour/contrib/hbqt/qtgui/qth/QDeclarativePropertyMap.qth b/harbour/contrib/hbqt/qtgui/qth/QDeclarativePropertyMap.qth index a4c2fdc39a..2f2792f0c8 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QDeclarativePropertyMap.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QDeclarativePropertyMap.qth @@ -72,7 +72,7 @@ Version = 0x040700 */ HB_FUNC( QT_QDECLARATIVEPROPERTYMAP ) { - if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) ) + if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QOBJECT" ) ) { __HB_RETPTRGC__( new QDeclarativePropertyMap( hbqt_par_QObject( 1 ) ) ); } diff --git a/harbour/contrib/hbqt/qtgui/qth/QDeclarativeScriptString.qth b/harbour/contrib/hbqt/qtgui/qth/QDeclarativeScriptString.qth index f20f7421b6..0ddc52f211 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QDeclarativeScriptString.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QDeclarativeScriptString.qth @@ -72,7 +72,7 @@ Version = 0x040700 */ HB_FUNC( QT_QDECLARATIVESCRIPTSTRING ) { - if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) ) + if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QDECLARATIVESCRIPTSTRING" ) ) { __HB_RETPTRGC__( new QDeclarativeScriptString( *hbqt_par_QDeclarativeScriptString( 1 ) ) ); } diff --git a/harbour/contrib/hbqt/qtgui/qth/QDialogButtonBox.qth b/harbour/contrib/hbqt/qtgui/qth/QDialogButtonBox.qth index 7ca59b4dad..13325440d7 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QDialogButtonBox.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QDialogButtonBox.qth @@ -73,17 +73,25 @@ New = */ HB_FUNC( QT_QDIALOGBUTTONBOX ) { - if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) ) + if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QWIDGET" ) ) { __HB_RETPTRGC__( new QDialogButtonBox( hbqt_par_QWidget( 1 ) ) ); } - else if( hb_pcount() >= 2 && HB_ISNUM( 1 ) && HB_ISNUM( 2 ) ) + else if( hb_pcount() == 3 && HB_ISNUM( 1 ) && HB_ISNUM( 2 ) && hbqt_par_isDerivedFrom( 3, "QWIDGET" ) ) { - __HB_RETPTRGC__( new QDialogButtonBox( ( QDialogButtonBox::StandardButtons ) hb_parni( 1 ), ( Qt::Orientation ) hb_parni( 2 ), HB_ISOBJECT( 3 ) ? hbqt_par_QWidget( 3 ) : 0 ) ); + __HB_RETPTRGC__( new QDialogButtonBox( ( QDialogButtonBox::StandardButtons ) hb_parni( 1 ), ( Qt::Orientation ) hb_parni( 2 ), hbqt_par_QWidget( 3 ) ) ); } - else if( hb_pcount() >= 1 && HB_ISNUM( 1 ) ) + else if( hb_pcount() == 2 && HB_ISNUM( 1 ) && HB_ISNUM( 2 ) ) { - __HB_RETPTRGC__( new QDialogButtonBox( ( Qt::Orientation ) hb_parni( 1 ), HB_ISOBJECT( 2 ) ? hbqt_par_QWidget( 2 ) : 0 ) ); + __HB_RETPTRGC__( new QDialogButtonBox( ( QDialogButtonBox::StandardButtons ) hb_parni( 1 ), ( Qt::Orientation ) hb_parni( 2 ), 0 ) ); + } + else if( hb_pcount() == 1 && HB_ISNUM( 1 ) && hbqt_par_isDerivedFrom( 2, "QWIDGET" ) ) + { + __HB_RETPTRGC__( new QDialogButtonBox( ( Qt::Orientation ) hb_parni( 1 ), hbqt_par_QWidget( 2 ) ) ); + } + else if( hb_pcount() == 1 && HB_ISNUM( 1 ) ) + { + __HB_RETPTRGC__( new QDialogButtonBox( ( Qt::Orientation ) hb_parni( 1 ), 0 ) ); } else { diff --git a/harbour/contrib/hbqt/qtgui/qth/QDockWidget.qth b/harbour/contrib/hbqt/qtgui/qth/QDockWidget.qth index e8de9e73ae..5847e0a16f 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QDockWidget.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QDockWidget.qth @@ -27,15 +27,21 @@ New = pParent */ HB_FUNC( QT_QDOCKWIDGET ) { - if( hb_pcount() >= 1 && HB_ISCHAR( 1 ) ) + if( hb_pcount() >= 2 && HB_ISCHAR( 1 ) && hbqt_par_isDerivedFrom( 2, "QWIDGET" ) ) { void * pText01 = NULL; - __HB_RETPTRGC__( new QDockWidget( hb_parstr_utf8( 1, &pText01, NULL ), ( HB_ISOBJECT( 2 ) ? hbqt_par_QWidget( 2 ) : 0 ), ( Qt::WindowFlags ) hb_parni( 2 ) ) ); + __HB_RETPTRGC__( new QDockWidget( hb_parstr_utf8( 1, &pText01, NULL ), hbqt_par_QWidget( 2 ), ( Qt::WindowFlags ) hb_parni( 3 ) ) ); + hb_strfree( pText01 ); + } + else if( hb_pcount() == 1 && HB_ISCHAR( 1 ) ) + { + void * pText01 = NULL; + __HB_RETPTRGC__( new QDockWidget( hb_parstr_utf8( 1, &pText01, NULL ), 0, 0 ) ); hb_strfree( pText01 ); } else { - __HB_RETPTRGC__( new QDockWidget( ( HB_ISOBJECT( 1 ) ? hbqt_par_QWidget( 1 ) : 0 ), ( Qt::WindowFlags ) hb_parni( 2 ) ) ); + __HB_RETPTRGC__( new QDockWidget() ); } } diff --git a/harbour/contrib/hbqt/qtgui/qth/QDoubleValidator.qth b/harbour/contrib/hbqt/qtgui/qth/QDoubleValidator.qth index a496ffccc1..b9b29a286c 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QDoubleValidator.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QDoubleValidator.qth @@ -29,14 +29,18 @@ Destructor = */ HB_FUNC( QT_QDOUBLEVALIDATOR ) { - if( hb_pcount() >= 3 && HB_ISNUM( 1 ) && HB_ISNUM( 2 ) && HB_ISNUM( 3 ) ) + if( hb_pcount() == 4 && HB_ISNUM( 1 ) && HB_ISNUM( 2 ) && HB_ISNUM( 3 ) && hbqt_par_isDerivedFrom( 4, "QOBJECT" ) ) { - __HB_RETPTRGC__( new QDoubleValidator( hb_parnd( 1 ), hb_parnd( 2 ), hb_parni( 3 ), HB_ISOBJECT( 4 ) ? hbqt_par_QObject( 4 ) : 0 ) ); + __HB_RETPTRGC__( new QDoubleValidator( hb_parnd( 1 ), hb_parnd( 2 ), hb_parni( 3 ), hbqt_par_QObject( 4 ) ) ); } - else if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) ) + else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QOBJECT" ) ) { __HB_RETPTRGC__( new QDoubleValidator( hbqt_par_QObject( 1 ) ) ); } + else + { + hb_errRT_BASE( EG_ARG, 9999, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); + } } diff --git a/harbour/contrib/hbqt/qtgui/qth/QDragEnterEvent.qth b/harbour/contrib/hbqt/qtgui/qth/QDragEnterEvent.qth index b2030d5406..de167daba6 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QDragEnterEvent.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QDragEnterEvent.qth @@ -28,14 +28,18 @@ Constructor = no */ HB_FUNC( QT_QDRAGENTEREVENT ) { - if( hb_pcount() == 5 && HB_ISOBJECT( 1 ) && HB_ISNUM( 2 ) && HB_ISOBJECT( 3 ) && HB_ISNUM( 4 ) && HB_ISNUM( 5 ) ) + if( hb_pcount() == 5 && hbqt_par_isDerivedFrom( 1, "QPOINT" ) && HB_ISNUM( 2 ) && hbqt_par_isDerivedFrom( 3, "QMIMEDATA" ) && HB_ISNUM( 4 ) && HB_ISNUM( 5 ) ) { __HB_RETPTRGC__( new QDragEnterEvent( *hbqt_par_QPoint( 1 ), ( Qt::DropActions ) hb_parni( 2 ), hbqt_par_QMimeData( 3 ), ( Qt::MouseButtons ) hb_parni( 4 ), ( Qt::KeyboardModifiers ) hb_parni( 5 ) ) ); } - else if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) ) + else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QDRAGENTEREVENT" ) ) { __HB_RETPTRGC__( new QDragEnterEvent( *hbqt_par_QDragEnterEvent( 1 ) ) ); } + else + { + hb_errRT_BASE( EG_ARG, 9999, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); + } } diff --git a/harbour/contrib/hbqt/qtgui/qth/QDragLeaveEvent.qth b/harbour/contrib/hbqt/qtgui/qth/QDragLeaveEvent.qth index 55d2abd805..4bf89944f9 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QDragLeaveEvent.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QDragLeaveEvent.qth @@ -28,7 +28,7 @@ Constructor = no */ HB_FUNC( QT_QDRAGLEAVEEVENT ) { - if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) ) + if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QDRAGLEAVEEVENT" ) ) { __HB_RETPTRGC__( new QDragLeaveEvent( *hbqt_par_QDragLeaveEvent( 1 ) ) ); } diff --git a/harbour/contrib/hbqt/qtgui/qth/QDragMoveEvent.qth b/harbour/contrib/hbqt/qtgui/qth/QDragMoveEvent.qth index 3c02209d0e..8b7113989f 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QDragMoveEvent.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QDragMoveEvent.qth @@ -29,14 +29,18 @@ Constructor = no */ HB_FUNC( QT_QDRAGMOVEEVENT ) { - if( hb_pcount() >= 5 && HB_ISOBJECT( 1 ) && HB_ISNUM( 2 ) && HB_ISOBJECT( 3 ) && HB_ISNUM( 4 ) && HB_ISNUM( 5 ) ) + if( hb_pcount() >= 5 && hbqt_par_isDerivedFrom( 1, "QPOINT" ) && HB_ISNUM( 2 ) && hbqt_par_isDerivedFrom( 3, "QMIMEDATA" ) && HB_ISNUM( 4 ) && HB_ISNUM( 5 ) ) { __HB_RETPTRGC__( new QDragMoveEvent( *hbqt_par_QPoint( 1 ), ( Qt::DropActions ) hb_parni( 2 ), hbqt_par_QMimeData( 3 ), ( Qt::MouseButtons ) hb_parni( 4 ), ( Qt::KeyboardModifiers ) hb_parni( 5 ), ( QEvent::Type ) ( HB_ISNUM( 6 ) ? hb_parni( 6 ) : QEvent::DragMove ) ) ); } - else if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) ) + else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QDRAGMOVEEVENT" ) ) { __HB_RETPTRGC__( new QDragMoveEvent( *hbqt_par_QDragMoveEvent( 1 ) ) ); } + else + { + hb_errRT_BASE( EG_ARG, 9999, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); + } } diff --git a/harbour/contrib/hbqt/qtgui/qth/QDropEvent.qth b/harbour/contrib/hbqt/qtgui/qth/QDropEvent.qth index 15a3819b03..c9364de955 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QDropEvent.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QDropEvent.qth @@ -29,14 +29,18 @@ Constructor = no */ HB_FUNC( QT_QDROPEVENT ) { - if( hb_pcount() >= 5 && HB_ISOBJECT( 1 ) && HB_ISNUM( 2 ) && HB_ISOBJECT( 3 ) && HB_ISNUM( 4 ) && HB_ISNUM( 5 ) ) + if( hb_pcount() >= 5 && hbqt_par_isDerivedFrom( 1, "QPOINT" ) && HB_ISNUM( 2 ) && hbqt_par_isDerivedFrom( 3, "QMIMEDATA" ) && HB_ISNUM( 4 ) && HB_ISNUM( 5 ) ) { __HB_RETPTRGC__( new QDropEvent( *hbqt_par_QPoint( 1 ), ( Qt::DropActions ) hb_parni( 2 ), hbqt_par_QMimeData( 3 ), ( Qt::MouseButtons ) hb_parni( 4 ), ( Qt::KeyboardModifiers ) hb_parni( 5 ), ( QEvent::Type ) ( HB_ISNUM( 6 ) ? hb_parni( 6 ) : QEvent::Drop ) ) ); } - else if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) ) + else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QDROPEVENT" ) ) { __HB_RETPTRGC__( new QDropEvent( *hbqt_par_QDropEvent( 1 ) ) ); } + else + { + hb_errRT_BASE( EG_ARG, 9999, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); + } } diff --git a/harbour/contrib/hbqt/qtgui/qth/QFileDialog.qth b/harbour/contrib/hbqt/qtgui/qth/QFileDialog.qth index c75bf62cc1..f036cc0902 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QFileDialog.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QFileDialog.qth @@ -27,11 +27,11 @@ New = pParent, nFlags */ HB_FUNC( QT_QFILEDIALOG ) { - if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) ) + if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QWIDGET" ) ) { __HB_RETPTRGC__( new QFileDialog( hbqt_par_QWidget( 1 ), ( Qt::WindowFlags ) 0 ) ); } - else if( hb_pcount() == 2 && HB_ISOBJECT( 1 ) && HB_ISNUM( 2 ) ) + else if( hb_pcount() == 2 && hbqt_par_isDerivedFrom( 1, "QWIDGET" ) && HB_ISNUM( 2 ) ) { __HB_RETPTRGC__( new QFileDialog( hbqt_par_QWidget( 1 ), ( Qt::WindowFlags ) hb_parni( 2 ) ) ); } diff --git a/harbour/contrib/hbqt/qtgui/qth/QFileOpenEvent.qth b/harbour/contrib/hbqt/qtgui/qth/QFileOpenEvent.qth index c9033fa459..545079167f 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QFileOpenEvent.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QFileOpenEvent.qth @@ -70,19 +70,20 @@ New = */ HB_FUNC( QT_QFILEOPENEVENT ) { - if( hb_pcount() == 1 && ( HB_ISCHAR( 1 ) || HB_ISOBJECT( 1 ) ) ) + if( hb_pcount() == 1 && HB_ISCHAR( 1 ) ) { - if( HB_ISCHAR( 1 ) ) - { - void * pText01 = NULL; - __HB_RETPTRGC__( new QFileOpenEvent( hb_parstr_utf8( 1, &pText01, NULL ) ) ); - hb_strfree( pText01 ); - } - else if( HB_ISOBJECT( 1 ) ) - { - __HB_RETPTRGC__( new QFileOpenEvent( *hbqt_par_QFileOpenEvent( 1 ) ) ); - } + void * pText01 = NULL; + __HB_RETPTRGC__( new QFileOpenEvent( hb_parstr_utf8( 1, &pText01, NULL ) ) ); + hb_strfree( pText01 ); } + else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QFILEOPENEVENT" ) ) + { + __HB_RETPTRGC__( new QFileOpenEvent( *hbqt_par_QFileOpenEvent( 1 ) ) ); + } + else + { + hb_errRT_BASE( EG_ARG, 9999, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); + } } @@ -102,5 +103,3 @@ QString file () const - - diff --git a/harbour/contrib/hbqt/qtgui/qth/QFocusEvent.qth b/harbour/contrib/hbqt/qtgui/qth/QFocusEvent.qth index bde728bf12..b2c0bdd8cd 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QFocusEvent.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QFocusEvent.qth @@ -32,10 +32,14 @@ HB_FUNC( QT_QFOCUSEVENT ) { __HB_RETPTRGC__( new QFocusEvent( ( QEvent::Type ) hb_parni( 1 ), ( Qt::FocusReason ) ( HB_ISNUM( 2 ) ? hb_parni( 2 ) : Qt::OtherFocusReason ) ) ); } - else if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) ) + else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QFOCUSEVENT" ) ) { __HB_RETPTRGC__( new QFocusEvent( *hbqt_par_QFocusEvent( 1 ) ) ); } + else + { + hb_errRT_BASE( EG_ARG, 9999, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); + } } diff --git a/harbour/contrib/hbqt/qtgui/qth/QFont.qth b/harbour/contrib/hbqt/qtgui/qth/QFont.qth index 4271fbcd23..85388bf8de 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QFont.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QFont.qth @@ -54,11 +54,11 @@ HB_FUNC( QT_QFONT ) __HB_RETPTRGC__( new QFont( hb_parstr_utf8( 1, &pText01, NULL ), hb_parni( 2 ), hb_parni( 3 ), hb_parl( 4 ) ) ); hb_strfree( pText01 ); } - else if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) ) + else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QFONT" ) ) { __HB_RETPTRGC__( new QFont( *hbqt_par_QFont( 1 ) ) ); } - else if( hb_pcount() == 2 && HB_ISOBJECT( 1 ) && HB_ISOBJECT( 2 ) ) + else if( hb_pcount() == 2 && hbqt_par_isDerivedFrom( 1, "QFONT" ) && hbqt_par_isDerivedFrom( 2, "QPAINTDEVICE" ) ) { __HB_RETPTRGC__( new QFont( *hbqt_par_QFont( 1 ), hbqt_par_QPaintDevice( 2 ) ) ); } diff --git a/harbour/contrib/hbqt/qtgui/qth/QFontDialog.qth b/harbour/contrib/hbqt/qtgui/qth/QFontDialog.qth index f2cad22f7e..a85b60b9f4 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QFontDialog.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QFontDialog.qth @@ -26,17 +26,21 @@ New = pParent */ HB_FUNC( QT_QFONTDIALOG ) { - if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) ) + if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QWIDGET" ) ) { __HB_RETPTRGC__( new QFontDialog( hbqt_par_QWidget( 1 ) ) ); } - else if( hb_pcount() == 2 && HB_ISOBJECT( 1 ) && HB_ISOBJECT( 2 ) ) + if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QFONT" ) ) + { + __HB_RETPTRGC__( new QFontDialog( *hbqt_par_QFont( 1 ) ) ); + } + else if( hb_pcount() == 2 && hbqt_par_isDerivedFrom( 1, "QFONT" ) && hbqt_par_isDerivedFrom( 1, "QWIDGET" ) ) { __HB_RETPTRGC__( new QFontDialog( *hbqt_par_QFont( 1 ), hbqt_par_QWidget( 2 ) ) ); } else { - __HB_RETPTRGC__( new QFontDialog( 0 ) ); + __HB_RETPTRGC__( new QFontDialog() ); } } diff --git a/harbour/contrib/hbqt/qtgui/qth/QFontInfo.qth b/harbour/contrib/hbqt/qtgui/qth/QFontInfo.qth index 069f30326b..079e3faf4a 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QFontInfo.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QFontInfo.qth @@ -27,14 +27,18 @@ New = pParent */ HB_FUNC( QT_QFONTINFO ) { - if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) ) + if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QFONTINFO" ) ) { __HB_RETPTRGC__( new QFontInfo( *hbqt_par_QFontInfo( 1 ) ) ); } - else if( hb_pcount() == 2 && HB_ISCHAR( 1 ) && HB_ISOBJECT( 2 ) ) + else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QFONT" ) ) { - __HB_RETPTRGC__( new QFontInfo( *hbqt_par_QFont( 2 ) ) ); + __HB_RETPTRGC__( new QFontInfo( *hbqt_par_QFont( 1 ) ) ); } + else + { + hb_errRT_BASE( EG_ARG, 9999, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); + } } diff --git a/harbour/contrib/hbqt/qtgui/qth/QGraphicsGridLayout.qth b/harbour/contrib/hbqt/qtgui/qth/QGraphicsGridLayout.qth index 10f640b71d..479e45faa7 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QGraphicsGridLayout.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QGraphicsGridLayout.qth @@ -29,7 +29,7 @@ Version = */ HB_FUNC( QT_QGRAPHICSGRIDLAYOUT ) { - if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) ) + if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QGRAPHICSLAYOUTITEM" ) ) { __HB_RETPTRGC__( new QGraphicsGridLayout( hbqt_par_QGraphicsLayoutItem( 1 ) ) ); } diff --git a/harbour/contrib/hbqt/qtgui/qth/QGraphicsItemAnimation.qth b/harbour/contrib/hbqt/qtgui/qth/QGraphicsItemAnimation.qth index 7dc9f28103..bf08a87e8f 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QGraphicsItemAnimation.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QGraphicsItemAnimation.qth @@ -30,7 +30,7 @@ New = */ HB_FUNC( QT_QGRAPHICSITEMANIMATION ) { - if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) ) + if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QOBJECT" ) ) { __HB_RETPTRGC__( new QGraphicsItemAnimation( hbqt_par_QObject( 1 ) ) ); } diff --git a/harbour/contrib/hbqt/qtgui/qth/QGraphicsItemGroup.qth b/harbour/contrib/hbqt/qtgui/qth/QGraphicsItemGroup.qth index a25b82d48f..0f2c84f5da 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QGraphicsItemGroup.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QGraphicsItemGroup.qth @@ -28,7 +28,7 @@ New = */ HB_FUNC( QT_QGRAPHICSITEMGROUP ) { - if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) ) + if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QGRAPHICSITEM" ) ) { __HB_RETPTRGC__( new QGraphicsItemGroup( hbqt_par_QGraphicsItem( 1 ) ) ); } diff --git a/harbour/contrib/hbqt/qtgui/qth/QGraphicsLinearLayout.qth b/harbour/contrib/hbqt/qtgui/qth/QGraphicsLinearLayout.qth index 95efbcddeb..eb7699e96d 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QGraphicsLinearLayout.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QGraphicsLinearLayout.qth @@ -29,13 +29,15 @@ New = */ HB_FUNC( QT_QGRAPHICSLINEARLAYOUT ) { - if( hb_pcount() >= 1 ) - { - if( HB_ISNUM( 1 ) ) + if( hb_pcount() == 1 && HB_ISNUM( 1 ) ) { - __HB_RETPTRGC__( new QGraphicsLinearLayout( ( Qt::Orientation ) hb_parni( 1 ), ( HB_ISOBJECT( 2 ) ? hbqt_par_QGraphicsLayoutItem( 2 ) : 0 ) ) ); + __HB_RETPTRGC__( new QGraphicsLinearLayout( ( Qt::Orientation ) hb_parni( 1 ) ) ); } - else if( HB_ISOBJECT( 1 ) ) + else if( hb_pcount() == 2 && HB_ISNUM( 1 ) && hbqt_par_isDerivedFrom( 2, "QGRAPHICSLAYOUTITEM" ) ) + { + __HB_RETPTRGC__( new QGraphicsLinearLayout( ( Qt::Orientation ) hb_parni( 1 ), hbqt_par_QGraphicsLayoutItem( 2 ) ) ); + } + else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QGRAPHICSLAYOUTITEM" ) ) { __HB_RETPTRGC__( new QGraphicsLinearLayout( hbqt_par_QGraphicsLayoutItem( 1 ) ) ); } @@ -43,11 +45,6 @@ HB_FUNC( QT_QGRAPHICSLINEARLAYOUT ) { __HB_RETPTRGC__( new QGraphicsLinearLayout() ); } - } - else - { - __HB_RETPTRGC__( new QGraphicsLinearLayout() ); - } } diff --git a/harbour/contrib/hbqt/qtgui/qth/QGraphicsProxyWidget.qth b/harbour/contrib/hbqt/qtgui/qth/QGraphicsProxyWidget.qth index da70cce268..6211adfa8c 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QGraphicsProxyWidget.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QGraphicsProxyWidget.qth @@ -28,9 +28,13 @@ New = */ HB_FUNC( QT_QGRAPHICSPROXYWIDGET ) { - if( hb_pcount() >= 1 && HB_ISOBJECT( 1 ) ) + if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QWIDGET" ) ) { - __HB_RETPTRGC__( new QGraphicsProxyWidget( hbqt_par_QGraphicsItem( 1 ), ( Qt::WindowFlags ) ( HB_ISNUM( 2 ) ? hb_parni( 2 ) : 0 ) ) ); + __HB_RETPTRGC__( new QGraphicsProxyWidget( hbqt_par_QGraphicsItem( 1 ) ) ); + } + if( hb_pcount() == 2 && hbqt_par_isDerivedFrom( 1, "QWIDGET" ) && HB_ISNUM( 2 ) ) + { + __HB_RETPTRGC__( new QGraphicsProxyWidget( hbqt_par_QGraphicsItem( 1 ), ( Qt::WindowFlags ) hb_parni( 2 ) ) ); } else { diff --git a/harbour/contrib/hbqt/qtgui/qth/QGraphicsSimpleTextItem.qth b/harbour/contrib/hbqt/qtgui/qth/QGraphicsSimpleTextItem.qth index ea46dc3e5f..c403c32001 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QGraphicsSimpleTextItem.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QGraphicsSimpleTextItem.qth @@ -30,22 +30,21 @@ New = */ HB_FUNC( QT_QGRAPHICSSIMPLETEXTITEM ) { - if( hb_pcount() >= 1 ) + if( hb_pcount() == 1 && HB_ISCHAR( 1 ) ) { - if( HB_ISCHAR( 1 ) ) - { - void * pText01 = NULL; - __HB_RETPTRGC__( new QGraphicsSimpleTextItem( hb_parstr_utf8( 1, &pText01, NULL ), ( HB_ISOBJECT( 2 ) ? hbqt_par_QGraphicsItem( 1 ) : 0 ) ) ); - hb_strfree( pText01 ); - } - else if( HB_ISOBJECT( 1 ) ) - { - __HB_RETPTRGC__( new QGraphicsSimpleTextItem( hbqt_par_QGraphicsItem( 1 ) ) ); - } - else - { - __HB_RETPTRGC__( new QGraphicsSimpleTextItem() ); - } + void * pText01 = NULL; + __HB_RETPTRGC__( new QGraphicsSimpleTextItem( hb_parstr_utf8( 1, &pText01, NULL ) ) ); + hb_strfree( pText01 ); + } + else if( hb_pcount() == 2 && HB_ISCHAR( 1 ) && hbqt_par_isDerivedFrom( 2, "QGRAPHICSITEM" ) ) + { + void * pText01 = NULL; + __HB_RETPTRGC__( new QGraphicsSimpleTextItem( hb_parstr_utf8( 1, &pText01, NULL ), hbqt_par_QGraphicsItem( 1 ) ) ); + hb_strfree( pText01 ); + } + else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QGRAPHICSITEM" ) ) + { + __HB_RETPTRGC__( new QGraphicsSimpleTextItem( hbqt_par_QGraphicsItem( 1 ) ) ); } else { diff --git a/harbour/contrib/hbqt/qtgui/qth/QGraphicsSvgItem.qth b/harbour/contrib/hbqt/qtgui/qth/QGraphicsSvgItem.qth index 99d909ce68..89838b2b1a 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QGraphicsSvgItem.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QGraphicsSvgItem.qth @@ -28,22 +28,21 @@ New = */ HB_FUNC( QT_QGRAPHICSSVGITEM ) { - if( hb_pcount() >= 1 ) + if( hb_pcount() == 1 && HB_ISCHAR( 1 ) ) { - if( HB_ISCHAR( 1 ) ) - { - void * pText01 = NULL; - __HB_RETPTRGC__( new QGraphicsSvgItem( hb_parstr_utf8( 1, &pText01, NULL ), ( HB_ISOBJECT( 2 ) ? hbqt_par_QGraphicsItem( 1 ) : 0 ) ) ); - hb_strfree( pText01 ); - } - else if( HB_ISOBJECT( 1 ) ) - { - __HB_RETPTRGC__( new QGraphicsSvgItem( hbqt_par_QGraphicsItem( 1 ) ) ); - } - else - { - __HB_RETPTRGC__( new QGraphicsSvgItem() ); - } + void * pText01 = NULL; + __HB_RETPTRGC__( new QGraphicsSvgItem( hb_parstr_utf8( 1, &pText01, NULL ) ) ); + hb_strfree( pText01 ); + } + else if( hb_pcount() == 2 && HB_ISCHAR( 1 ) && hbqt_par_isDerivedFrom( 2, "QGRAPHICSITEM" ) ) + { + void * pText01 = NULL; + __HB_RETPTRGC__( new QGraphicsSvgItem( hb_parstr_utf8( 1, &pText01, NULL ), hbqt_par_QGraphicsItem( 1 ) ) ); + hb_strfree( pText01 ); + } + else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QGRAPHICSITEM" ) ) + { + __HB_RETPTRGC__( new QGraphicsSvgItem( hbqt_par_QGraphicsItem( 1 ) ) ); } else { diff --git a/harbour/contrib/hbqt/qtgui/qth/QGraphicsTextItem.qth b/harbour/contrib/hbqt/qtgui/qth/QGraphicsTextItem.qth index d2a6a5c334..d779659973 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QGraphicsTextItem.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QGraphicsTextItem.qth @@ -32,22 +32,21 @@ New = */ HB_FUNC( QT_QGRAPHICSTEXTITEM ) { - if( hb_pcount() >= 1 ) + if( hb_pcount() == 1 && HB_ISCHAR( 1 ) ) { - if( HB_ISCHAR( 1 ) ) - { - void * pText01 = NULL; - __HB_RETPTRGC__( new QGraphicsTextItem( hb_parstr_utf8( 1, &pText01, NULL ), ( HB_ISOBJECT( 2 ) ? hbqt_par_QGraphicsItem( 1 ) : 0 ) ) ); - hb_strfree( pText01 ); - } - else if( HB_ISOBJECT( 1 ) ) - { - __HB_RETPTRGC__( new QGraphicsTextItem( hbqt_par_QGraphicsItem( 1 ) ) ); - } - else - { - __HB_RETPTRGC__( new QGraphicsTextItem() ); - } + void * pText01 = NULL; + __HB_RETPTRGC__( new QGraphicsTextItem( hb_parstr_utf8( 1, &pText01, NULL ) ) ); + hb_strfree( pText01 ); + } + else if( hb_pcount() == 2 && HB_ISCHAR( 1 ) && hbqt_par_isDerivedFrom( 2, "QGRAPHICSITEM" ) ) + { + void * pText01 = NULL; + __HB_RETPTRGC__( new QGraphicsTextItem( hb_parstr_utf8( 1, &pText01, NULL ), hbqt_par_QGraphicsItem( 1 ) ) ); + hb_strfree( pText01 ); + } + else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QGRAPHICSITEM" ) ) + { + __HB_RETPTRGC__( new QGraphicsTextItem( hbqt_par_QGraphicsItem( 1 ) ) ); } else { diff --git a/harbour/contrib/hbqt/qtgui/qth/QGraphicsWidget.qth b/harbour/contrib/hbqt/qtgui/qth/QGraphicsWidget.qth index 524463f224..7e37cf75cd 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QGraphicsWidget.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QGraphicsWidget.qth @@ -28,7 +28,7 @@ New = */ HB_FUNC( QT_QGRAPHICSWIDGET ) { - if( hb_pcount() >= 1 && HB_ISOBJECT( 1 ) ) + if( hb_pcount() >= 1 && hbqt_par_isDerivedFrom( 1, "QGRAPHICSITEM" ) ) { __HB_RETPTRGC__( new QGraphicsWidget( hbqt_par_QGraphicsItem( 1 ), ( Qt::WindowFlags ) ( HB_ISNUM( 2 ) ? hb_parni( 2 ) : 0 ) ) ); } diff --git a/harbour/contrib/hbqt/qtgui/qth/QHelpEvent.qth b/harbour/contrib/hbqt/qtgui/qth/QHelpEvent.qth index 86f9c94716..9d6b581513 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QHelpEvent.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QHelpEvent.qth @@ -28,14 +28,18 @@ Destructor = */ HB_FUNC( QT_QHELPEVENT ) { - if( hb_pcount() == 3 && HB_ISNUM( 1 ) && HB_ISOBJECT( 2 ) && HB_ISOBJECT( 3 ) ) + if( hb_pcount() == 3 && HB_ISNUM( 1 ) && hbqt_par_isDerivedFrom( 2, "QPOINT" ) && hbqt_par_isDerivedFrom( 3, "QPOINT" ) ) { __HB_RETPTRGC__( new QHelpEvent( ( QEvent::Type ) hb_parni( 1 ), *hbqt_par_QPoint( 2 ), *hbqt_par_QPoint( 3 ) ) ); } - else if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) ) + else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QHELPEVENT" ) ) { __HB_RETPTRGC__( new QHelpEvent( *hbqt_par_QHelpEvent( 1 ) ) ); } + else + { + hb_errRT_BASE( EG_ARG, 9999, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); + } } diff --git a/harbour/contrib/hbqt/qtgui/qth/QHideEvent.qth b/harbour/contrib/hbqt/qtgui/qth/QHideEvent.qth index e7b293d8c5..ea99c05f86 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QHideEvent.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QHideEvent.qth @@ -32,7 +32,7 @@ HB_FUNC( QT_QHIDEEVENT ) { __HB_RETPTRGC__( new QHideEvent() ); } - else if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) ) + else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QHIDEEVENT" ) ) { __HB_RETPTRGC__( new QHideEvent( *hbqt_par_QHideEvent( 1 ) ) ); } diff --git a/harbour/contrib/hbqt/qtgui/qth/QHoverEvent.qth b/harbour/contrib/hbqt/qtgui/qth/QHoverEvent.qth index a12622bf15..ff9f816123 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QHoverEvent.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QHoverEvent.qth @@ -70,11 +70,11 @@ New = */ HB_FUNC( QT_QHOVEREVENT ) { - if( hb_pcount() == 3 && HB_ISNUM( 1 ) && HB_ISOBJECT( 2 ) && HB_ISOBJECT( 3 ) ) + if( hb_pcount() == 3 && HB_ISNUM( 1 ) && hbqt_par_isDerivedFrom( 2, "QPOINT" ) && hbqt_par_isDerivedFrom( 3, "QPOINT" ) ) { __HB_RETPTRGC__( new QHoverEvent( ( QEvent::Type ) hb_parni( 1 ), *hbqt_par_QPoint( 2 ), *hbqt_par_QPoint( 3 ) ) ); } - else if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) ) + else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QHOVEREVENT" ) ) { __HB_RETPTRGC__( new QHoverEvent( *hbqt_par_QHoverEvent( 1 ) ) ); } diff --git a/harbour/contrib/hbqt/qtgui/qth/QImage.qth b/harbour/contrib/hbqt/qtgui/qth/QImage.qth index bd2796d0d3..cddae01af7 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QImage.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QImage.qth @@ -39,7 +39,7 @@ New = */ HB_FUNC( QT_QIMAGE ) { - if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) ) + if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QIMAGE" ) ) { __HB_RETPTRGC__( new QImage( *hbqt_par_QImage( 1 ) ) ); } @@ -55,7 +55,7 @@ HB_FUNC( QT_QIMAGE ) __HB_RETPTRGC__( new QImage( hb_parstr_utf8( 1, &pText01, NULL ), ( const char * ) hb_parcx( 2 ) ) ); hb_strfree( pText01 ); } - else if( hb_pcount() == 2 && HB_ISOBJECT( 1 ) && HB_ISNUM( 2 ) ) + else if( hb_pcount() == 2 && hbqt_par_isDerivedFrom( 1, "QSIZE" ) && HB_ISNUM( 2 ) ) { __HB_RETPTRGC__( new QImage( *hbqt_par_QSize( 1 ), ( QImage::Format ) hb_parni( 2 ) ) ); } diff --git a/harbour/contrib/hbqt/qtgui/qth/QInputEvent.qth b/harbour/contrib/hbqt/qtgui/qth/QInputEvent.qth index 4ee94fc063..4bf537da1f 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QInputEvent.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QInputEvent.qth @@ -32,10 +32,14 @@ HB_FUNC( QT_QINPUTEVENT ) { __HB_RETPTRGC__( new QInputEvent( ( QEvent::Type ) hb_parni( 1 ), ( Qt::KeyboardModifiers ) hb_parni( 2 ) ) ); } - else if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) ) + else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QINPUTEVENT" ) ) { __HB_RETPTRGC__( new QInputEvent( *hbqt_par_QInputEvent( 1 ) ) ); } + else + { + hb_errRT_BASE( EG_ARG, 9999, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); + } } diff --git a/harbour/contrib/hbqt/qtgui/qth/QInputMethodEvent.qth b/harbour/contrib/hbqt/qtgui/qth/QInputMethodEvent.qth index dd636dac4f..819dc3e411 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QInputMethodEvent.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QInputMethodEvent.qth @@ -29,7 +29,7 @@ Destructor = */ HB_FUNC( QT_QINPUTMETHODEVENT ) { - if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) ) + if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QINPUTMETHODEVENT" ) ) { __HB_RETPTRGC__( new QInputMethodEvent( *hbqt_par_QInputMethodEvent( 1 ) ) ); } diff --git a/harbour/contrib/hbqt/qtgui/qth/QIntValidator.qth b/harbour/contrib/hbqt/qtgui/qth/QIntValidator.qth index 7f1cad7c20..b8f7f03c86 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QIntValidator.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QIntValidator.qth @@ -29,14 +29,18 @@ Destructor = */ HB_FUNC( QT_QINTVALIDATOR ) { - if( hb_pcount() == 3 && HB_ISNUM( 1 ) && HB_ISNUM( 2 ) && HB_ISOBJECT( 3 ) ) + if( hb_pcount() == 3 && HB_ISNUM( 1 ) && HB_ISNUM( 2 ) && hbqt_par_isDerivedFrom( 3, "QOBJECT" ) ) { __HB_RETPTRGC__( new QIntValidator( hb_parni( 1 ), hb_parni( 2 ), hbqt_par_QObject( 3 ) ) ); } - else if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) ) + else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QOBJECT" ) ) { __HB_RETPTRGC__( new QIntValidator( hbqt_par_QObject( 1 ) ) ); } + else + { + hb_errRT_BASE( EG_ARG, 9999, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); + } } diff --git a/harbour/contrib/hbqt/qtgui/qth/QItemDelegate.qth b/harbour/contrib/hbqt/qtgui/qth/QItemDelegate.qth index be0f01960f..bc2d7ae485 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QItemDelegate.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QItemDelegate.qth @@ -34,7 +34,7 @@ New = */ HB_FUNC( QT_QITEMDELEGATE ) { - if( HB_ISOBJECT( 1 ) ) + if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QOBJECT" ) ) { __HB_RETPTRGC__( new QItemDelegate( hbqt_par_QObject( 1 ) ) ); } diff --git a/harbour/contrib/hbqt/qtgui/qth/QItemEditorFactory.qth b/harbour/contrib/hbqt/qtgui/qth/QItemEditorFactory.qth index a6be15d999..4282bf40a8 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QItemEditorFactory.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QItemEditorFactory.qth @@ -35,13 +35,13 @@ New = */ HB_FUNC( QT_QITEMEDITORFACTORY ) { - if( HB_ISOBJECT( 1 ) ) + if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QITEMEDITORFACTORY" ) ) { - __HB_RETPTRGC__( new QItemEditorFactory() ); + __HB_RETPTRGC__( new QItemEditorFactory( *hbqt_par_QItemEditorFactory( 1 ) ) ); } else { - __HB_RETPTRGC__( new QItemEditorFactory( *hbqt_par_QItemEditorFactory( 1 ) ) ); + __HB_RETPTRGC__( new QItemEditorFactory() ); } } diff --git a/harbour/contrib/hbqt/qtgui/qth/QItemSelectionModel.qth b/harbour/contrib/hbqt/qtgui/qth/QItemSelectionModel.qth index d291a792a4..d29e3a84f2 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QItemSelectionModel.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QItemSelectionModel.qth @@ -29,10 +29,18 @@ Destructor = */ HB_FUNC( QT_QITEMSELECTIONMODEL ) { - if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) ) + if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QABSTRACTITEMMODEL" ) ) { __HB_RETPTRGC__( new QItemSelectionModel( hbqt_par_QAbstractItemModel( 1 ) ) ); } + else if( hb_pcount() == 2 && hbqt_par_isDerivedFrom( 1, "QABSTRACTITEMMODEL" ) && hbqt_par_isDerivedFrom( 2, "QOBJECT" ) ) + { + __HB_RETPTRGC__( new QItemSelectionModel( hbqt_par_QAbstractItemModel( 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/qtgui/qth/QKeyEvent.qth b/harbour/contrib/hbqt/qtgui/qth/QKeyEvent.qth index ca6629891c..3fe3ed770f 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QKeyEvent.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QKeyEvent.qth @@ -35,14 +35,18 @@ HB_FUNC( QT_QKEYEVENT ) __HB_RETPTRGC__( new QKeyEvent( ( QEvent::Type ) hb_parni( 1 ), hb_parni( 2 ), ( Qt::KeyboardModifiers ) hb_parni( 3 ), hb_parstr_utf8( 4, &pText01, NULL ), HB_ISLOG( 5 ) ? hb_parl( 5 ) : false, HB_ISNUM( 6 ) ? hb_parni( 6 ) : 1 ) ); hb_strfree( pText01 ); } - if( hb_pcount() >= 3 && HB_ISNUM( 1 ) && HB_ISNUM( 2 ) && HB_ISNUM( 3 ) ) + else if( hb_pcount() >= 3 && HB_ISNUM( 1 ) && HB_ISNUM( 2 ) && HB_ISNUM( 3 ) ) { - __HB_RETPTRGC__( new QKeyEvent( ( QEvent::Type ) hb_parni( 1 ), hb_parni( 2 ), ( Qt::KeyboardModifiers ) hb_parni( 3 ), QString(), HB_ISLOG( 5 ) ? hb_parl( 5 ) : false, HB_ISNUM( 6 ) ? hb_parni( 6 ) : 1 ) ); + __HB_RETPTRGC__( new QKeyEvent( ( QEvent::Type ) hb_parni( 1 ), hb_parni( 2 ), ( Qt::KeyboardModifiers ) hb_parni( 3 ), QString(), hb_parl( 5 ), HB_ISNUM( 6 ) ? hb_parni( 6 ) : 1 ) ); } - else if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) ) + else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QKEYEVENT" ) ) { __HB_RETPTRGC__( new QKeyEvent( *hbqt_par_QKeyEvent( 1 ) ) ); } + else + { + hb_errRT_BASE( EG_ARG, 9999, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); + } } diff --git a/harbour/contrib/hbqt/qtgui/qth/QKeySequence.qth b/harbour/contrib/hbqt/qtgui/qth/QKeySequence.qth index 10e7e99a9e..1d571aabc5 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QKeySequence.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QKeySequence.qth @@ -32,18 +32,24 @@ New = */ HB_FUNC( QT_QKEYSEQUENCE ) { - if( HB_ISOBJECT( 1 ) ) + if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QKEYSEQUENCE" ) ) + { __HB_RETPTRGC__( new QKeySequence( *hbqt_par_QKeySequence( 1 ) ) ); - else if( HB_ISCHAR( 1 ) ) + } + else if( hb_pcount() == 1 && HB_ISCHAR( 1 ) ) { void * pText01 = NULL; __HB_RETPTRGC__( new QKeySequence( hb_parstr_utf8( 1, &pText01, NULL ) ) ); hb_strfree( pText01 ); } - else if( HB_ISNUM( 1 ) ) - __HB_RETPTRGC__( new QKeySequence( hb_parni( 1 ) ) ); + else if( hb_pcount() >= 1 && HB_ISNUM( 1 ) ) + { + __HB_RETPTRGC__( new QKeySequence( hb_parni( 1 ), hb_parni( 2 ), hb_parni( 3 ), hb_parni( 4 ) ) ); + } else + { __HB_RETPTRGC__( new QKeySequence() ); + } } diff --git a/harbour/contrib/hbqt/qtgui/qth/QLabel.qth b/harbour/contrib/hbqt/qtgui/qth/QLabel.qth index b765b2fadf..924f92d294 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QLabel.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QLabel.qth @@ -28,15 +28,25 @@ New = pParent, nFlags */ HB_FUNC( QT_QLABEL ) { - if( hb_pcount() >= 1 && HB_ISCHAR( 1 ) ) + if( hb_pcount() >= 2 && HB_ISCHAR( 1 ) && hbqt_par_isDerivedFrom( 2, "QWIDGET" ) ) { void * pText01 = NULL; - __HB_RETPTRGC__( new QLabel( hb_parstr_utf8( 1, &pText01, NULL ), ( HB_ISOBJECT( 2 ) ? hbqt_par_QWidget( 2 ) : 0 ), HB_ISNUM( 3 ) ? ( Qt::WindowFlags ) hb_parni( 3 ) : ( Qt::WindowFlags ) 0 ) ); + __HB_RETPTRGC__( new QLabel( hb_parstr_utf8( 1, &pText01, NULL ), hbqt_par_QWidget( 2 ), ( Qt::WindowFlags ) hb_parni( 3 ) ) ); hb_strfree( pText01 ); } + else if( hb_pcount() == 1 && HB_ISCHAR( 1 ) ) + { + void * pText01 = NULL; + __HB_RETPTRGC__( new QLabel( hb_parstr_utf8( 1, &pText01, NULL ) ) ); + hb_strfree( pText01 ); + } + else if( hb_pcount() >= 1 && hbqt_par_isDerivedFrom( 1, "QWIDGET" ) ) + { + __HB_RETPTRGC__( new QLabel( hbqt_par_QWidget( 1 ), ( Qt::WindowFlags ) hb_parni( 2 ) ) ); + } else { - __HB_RETPTRGC__( new QLabel( ( HB_ISOBJECT( 1 ) ? hbqt_par_QWidget( 1 ) : 0 ), HB_ISNUM( 2 ) ? ( Qt::WindowFlags ) hb_parni( 2 ) : ( Qt::WindowFlags ) 0 ) ); + __HB_RETPTRGC__( new QLabel() ); } } diff --git a/harbour/contrib/hbqt/qtgui/qth/QLinearGradient.qth b/harbour/contrib/hbqt/qtgui/qth/QLinearGradient.qth index 006bb065d8..364b3e564b 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QLinearGradient.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QLinearGradient.qth @@ -29,11 +29,11 @@ New = */ HB_FUNC( QT_QLINEARGRADIENT ) { - if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) ) + if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QLINEARGRADIENT" ) ) { __HB_RETPTRGC__( new QLinearGradient( *hbqt_par_QLinearGradient( 1 ) ) ); } - else if( hb_pcount() == 2 && HB_ISOBJECT( 1 ) && HB_ISOBJECT( 2 ) ) + else if( hb_pcount() == 2 && hbqt_par_isDerivedFrom( 1, "QPOINTF" ) && hbqt_par_isDerivedFrom( 2, "QPOINTF" ) ) { __HB_RETPTRGC__( new QLinearGradient( *hbqt_par_QPointF( 1 ), *hbqt_par_QPointF( 2 ) ) ); } diff --git a/harbour/contrib/hbqt/qtgui/qth/QListWidget.qth b/harbour/contrib/hbqt/qtgui/qth/QListWidget.qth index db2dd73597..bf223f3aea 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QListWidget.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QListWidget.qth @@ -26,7 +26,14 @@ New = pParent */ HB_FUNC( QT_QLISTWIDGET ) { - __HB_RETPTRGC__( new QListWidget( HB_ISOBJECT( 1 ) ? hbqt_par_QWidget( 1 ) : 0 ) ); + if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QWIDGET" ) ) + { + __HB_RETPTRGC__( new QListWidget( hbqt_par_QWidget( 1 ) ) ); + } + else + { + __HB_RETPTRGC__( new QListWidget() ); + } } diff --git a/harbour/contrib/hbqt/qtgui/qth/QMainWindow.qth b/harbour/contrib/hbqt/qtgui/qth/QMainWindow.qth index 47f26dc851..009ceed435 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QMainWindow.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QMainWindow.qth @@ -27,9 +27,9 @@ New = pParent, nFlags */ HB_FUNC( QT_QMAINWINDOW ) { - if( hb_pcount() <= 2 && HB_ISOBJECT( 1 ) ) + if( hb_pcount() <= 2 && hbqt_par_isDerivedFrom( 1, "QWIDGET" ) ) { - __HB_RETPTRGC__( new QMainWindow( hbqt_par_QWidget( 1 ), ( Qt::WindowFlags ) ( HB_ISNUM( 2 ) ? hb_parni( 2 ) : 0 ) ) ); + __HB_RETPTRGC__( new QMainWindow( hbqt_par_QWidget( 1 ), ( Qt::WindowFlags ) hb_parni( 2 ) ) ); } else { diff --git a/harbour/contrib/hbqt/qtgui/qth/QMdiArea.qth b/harbour/contrib/hbqt/qtgui/qth/QMdiArea.qth index c4d55d8f2f..61976109b9 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QMdiArea.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QMdiArea.qth @@ -32,7 +32,7 @@ New = */ HB_FUNC( QT_QMDIAREA ) { - if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) ) + if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QWIDGET" ) ) { __HB_RETPTRGC__( new QMdiArea( hbqt_par_QWidget( 1 ) ) ); } diff --git a/harbour/contrib/hbqt/qtgui/qth/QMdiSubWindow.qth b/harbour/contrib/hbqt/qtgui/qth/QMdiSubWindow.qth index 9f4e99adf8..e689c8d052 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QMdiSubWindow.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QMdiSubWindow.qth @@ -32,7 +32,7 @@ New = */ HB_FUNC( QT_QMDISUBWINDOW ) { - if( hb_pcount() >= 1 && HB_ISOBJECT( 1 ) ) + if( hb_pcount() >= 1 && hbqt_par_isDerivedFrom( 1, "QWIDGET" ) ) { __HB_RETPTRGC__( new QMdiSubWindow( hbqt_par_QWidget( 1 ), ( Qt::WindowFlags ) hb_parni( 2 ) ) ); } diff --git a/harbour/contrib/hbqt/qtgui/qth/QMenu.qth b/harbour/contrib/hbqt/qtgui/qth/QMenu.qth index e3358f93aa..b484f0552a 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QMenu.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QMenu.qth @@ -14,7 +14,7 @@ Inherit = QWidget New = pParent -PaintEvent = YES +PaintEvent = @@ -28,22 +28,26 @@ PaintEvent = YES */ HB_FUNC( QT_QMENU ) { - if( hb_pcount() == 0 ) - { - __HB_RETPTRGC__( new QMenu() ); - } - else if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) && hbqt_par_isDerivedFrom( 1, "QWIDGET" ) ) + if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QWIDGET" ) ) { __HB_RETPTRGC__( new QMenu( hbqt_par_QWidget( 1 ) ) ); } -/* - else if( hb_pcount() >= 1 && HB_ISCHAR( 1 ) ) + else if( hb_pcount() == 2 && HB_ISCHAR( 1 ) && hbqt_par_isDerivedFrom( 2, "QWIDGET" ) ) { void * pText01 = NULL; - __HB_RETPTRGC__( new QMenu( hb_parstr_utf8( 1, &pText01, NULL ), HB_ISOBJECT( 2 ) ? hbqt_par_QWidget( 2 ) : 0 ) ); + __HB_RETPTRGC__( new QMenu( hb_parstr_utf8( 1, &pText01, NULL ), hbqt_par_QWidget( 2 ) ) ); hb_strfree( pText01 ); } -*/ + else if( hb_pcount() == 1 && HB_ISCHAR( 1 ) ) + { + void * pText01 = NULL; + __HB_RETPTRGC__( new QMenu( hb_parstr_utf8( 1, &pText01, NULL ) ) ); + hb_strfree( pText01 ); + } + else + { + __HB_RETPTRGC__( new QMenu() ); + } } diff --git a/harbour/contrib/hbqt/qtgui/qth/QMenuBar.qth b/harbour/contrib/hbqt/qtgui/qth/QMenuBar.qth index 61aa2f3a3f..40b62dd62a 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QMenuBar.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QMenuBar.qth @@ -26,7 +26,14 @@ New = pParent */ HB_FUNC( QT_QMENUBAR ) { - __HB_RETPTRGC__( new QMenuBar( HB_ISOBJECT( 1 ) ? hbqt_par_QWidget( 1 ) : 0 ) ); + if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QWIDGET" ) ) + { + __HB_RETPTRGC__( new QMenuBar( hbqt_par_QWidget( 1 ) ) ); + } + else + { + __HB_RETPTRGC__( new QMenuBar() ); + } } diff --git a/harbour/contrib/hbqt/qtgui/qth/QMessageBox.qth b/harbour/contrib/hbqt/qtgui/qth/QMessageBox.qth index 11a55c92c7..9a1d765b47 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QMessageBox.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QMessageBox.qth @@ -27,7 +27,37 @@ New = pParent */ HB_FUNC( QT_QMESSAGEBOX ) { - __HB_RETPTRGC__( new QMessageBox() ); + if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QWIDGET" ) ) + { + __HB_RETPTRGC__( new QMessageBox( hbqt_par_QWidget( 1 ) ) ); + } + else if( hb_pcount() >= 3 && HB_ISNUM( 1 ) && HB_ISCHAR( 2 ) && HB_ISCHAR( 3 ) ) + { + void * pText01 = NULL; + void * pText02 = NULL; + if( hb_pcount() == 3 ) + { + __HB_RETPTRGC__( new QMessageBox( ( QMessageBox::Icon ) hb_parni( 1 ), hb_parstr_utf8( 2, &pText01, NULL ), hb_parstr_utf8( 3, &pText02, NULL ), QMessageBox::NoButton ) ); + } + else if( hb_pcount() == 4 && HB_ISNUM( 4 ) ) + { + __HB_RETPTRGC__( new QMessageBox( ( QMessageBox::Icon ) hb_parni( 1 ), hb_parstr_utf8( 2, &pText01, NULL ), hb_parstr_utf8( 3, &pText02, NULL ), ( QMessageBox::StandardButtons ) hb_parni( 4 ) ) ); + } + else if( hb_pcount() == 5 && HB_ISNUM( 4 ) && hbqt_par_isDerivedFrom( 5, "QWIDGET" ) ) + { + __HB_RETPTRGC__( new QMessageBox( ( QMessageBox::Icon ) hb_parni( 1 ), hb_parstr_utf8( 2, &pText01, NULL ), hb_parstr_utf8( 3, &pText02, NULL ), ( QMessageBox::StandardButtons ) hb_parni( 4 ), hbqt_par_QWidget( 5 ) ) ); + } + else if( hb_pcount() == 6 && HB_ISNUM( 4 ) && hbqt_par_isDerivedFrom( 5, "QWIDGET" ) && HB_ISNUM( 6 ) ) + { + __HB_RETPTRGC__( new QMessageBox( ( QMessageBox::Icon ) hb_parni( 1 ), hb_parstr_utf8( 2, &pText01, NULL ), hb_parstr_utf8( 3, &pText02, NULL ), ( QMessageBox::StandardButtons ) hb_parni( 4 ), hbqt_par_QWidget( 5 ), ( Qt::WindowFlags ) hb_parni( 6 ) ) ); + } + hb_strfree( pText01 ); + hb_strfree( pText02 ); + } + else + { + __HB_RETPTRGC__( new QMessageBox( 0 ) ); + } } diff --git a/harbour/contrib/hbqt/qtgui/qth/QMouseEvent.qth b/harbour/contrib/hbqt/qtgui/qth/QMouseEvent.qth index 25354dafd9..a91cc15cd2 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QMouseEvent.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QMouseEvent.qth @@ -29,18 +29,22 @@ New = */ HB_FUNC( QT_QMOUSEEVENT ) { - if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) ) + if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QMOUSEEVENT" ) ) { __HB_RETPTRGC__( new QMouseEvent( *hbqt_par_QMouseEvent( 1 ) ) ); } - else if( hb_pcount() == 5 ) + else if( hb_pcount() == 5 && HB_ISNUM( 1 ) && hbqt_par_isDerivedFrom( 2, "QPOINT" ) && HB_ISNUM( 3 ) && HB_ISNUM( 4 ) && HB_ISNUM( 5 ) ) { __HB_RETPTRGC__( new QMouseEvent( ( QEvent::Type ) hb_parni( 1 ), *hbqt_par_QPoint( 2 ), ( Qt::MouseButton ) hb_parni( 3 ), ( Qt::MouseButtons ) hb_parni( 4 ), ( Qt::KeyboardModifiers ) hb_parni( 5 ) ) ); } - else if( hb_pcount() == 6 ) + else if( hb_pcount() == 6 && HB_ISNUM( 1 ) && hbqt_par_isDerivedFrom( 2, "QPOINT" ) && hbqt_par_isDerivedFrom( 3, "QPOINT" ) && HB_ISNUM( 4 ) && HB_ISNUM( 5 ) && HB_ISNUM( 6 ) ) { __HB_RETPTRGC__( new QMouseEvent( ( QEvent::Type ) hb_parni( 1 ), *hbqt_par_QPoint( 2 ), *hbqt_par_QPoint( 3 ), ( Qt::MouseButton ) hb_parni( 4 ), ( Qt::MouseButtons ) hb_parni( 5 ), ( Qt::KeyboardModifiers ) hb_parni( 6 ) ) ); } + else + { + hb_errRT_BASE( EG_ARG, 9999, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); + } } diff --git a/harbour/contrib/hbqt/qtgui/qth/QMoveEvent.qth b/harbour/contrib/hbqt/qtgui/qth/QMoveEvent.qth index 61baf17cd5..aadfd1f9b5 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QMoveEvent.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QMoveEvent.qth @@ -29,14 +29,18 @@ Constructor = */ HB_FUNC( QT_QMOVEEVENT ) { - if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) ) + if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QMOVEEVENT" ) ) { __HB_RETPTRGC__( new QMoveEvent( *hbqt_par_QMoveEvent( 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 QMoveEvent( *hbqt_par_QPoint( 1 ), *hbqt_par_QPoint( 2 ) ) ); } + else + { + hb_errRT_BASE( EG_ARG, 9999, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); + } } diff --git a/harbour/contrib/hbqt/qtgui/qth/QPaintEvent.qth b/harbour/contrib/hbqt/qtgui/qth/QPaintEvent.qth index 0a47ebe4ad..f31fdd9651 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QPaintEvent.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QPaintEvent.qth @@ -28,29 +28,22 @@ New = */ HB_FUNC( QT_QPAINTEVENT ) { - if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) ) + if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QREGION" ) ) { - if( hbqt_par_isDerivedFrom( 1, "QREGION" ) ) - { - __HB_RETPTRGC__( new QPaintEvent( *hbqt_par_QRegion( 1 ) ) ); - } - else if( hbqt_par_isDerivedFrom( 1, "QRECT" ) ) - { - __HB_RETPTRGC__( new QPaintEvent( *hbqt_par_QRect( 1 ) ) ); - } - else if( hbqt_par_isDerivedFrom( 1, "QPAINTEVENT" ) ) - { - __HB_RETPTRGC__( new QPaintEvent( *hbqt_par_QPaintEvent( 1 ) ) ); - } - else - { - hb_errRT_BASE( EG_ARG, 9999, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); - } + __HB_RETPTRGC__( new QPaintEvent( *hbqt_par_QRegion( 1 ) ) ); + } + else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QRECT" ) ) + { + __HB_RETPTRGC__( new QPaintEvent( *hbqt_par_QRect( 1 ) ) ); + } + else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QPAINTEVENT" ) ) + { + __HB_RETPTRGC__( new QPaintEvent( *hbqt_par_QPaintEvent( 1 ) ) ); } else { hb_errRT_BASE( EG_ARG, 9999, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); - } + } } diff --git a/harbour/contrib/hbqt/qtgui/qth/QPainter.qth b/harbour/contrib/hbqt/qtgui/qth/QPainter.qth index e26b682257..07c3c56945 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QPainter.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QPainter.qth @@ -26,7 +26,7 @@ New = pDevice */ HB_FUNC( QT_QPAINTER ) { - if( hb_pcount() >= 1 && HB_ISOBJECT( 1 ) ) + if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QPAINTDEVICE" ) ) { __HB_RETPTRGC__( new QPainter( hbqt_par_QPaintDevice( 1 ) ) ); } diff --git a/harbour/contrib/hbqt/qtgui/qth/QPalette.qth b/harbour/contrib/hbqt/qtgui/qth/QPalette.qth index 3448891681..1d4c2f53a4 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QPalette.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QPalette.qth @@ -38,11 +38,15 @@ HB_FUNC( QT_QPALETTE ) { __HB_RETPTRGC__( new QPalette( ( Qt::GlobalColor ) hb_parni( 1 ) ) ); } - else if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) ) + else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QPALETTE" ) ) { __HB_RETPTRGC__( new QPalette( *hbqt_par_QPalette( 1 ) ) ); } - else if( hb_pcount() == 2 && HB_ISOBJECT( 1 ) && HB_ISOBJECT( 2 ) ) + else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QCOLOR" ) ) + { + __HB_RETPTRGC__( new QPalette( *hbqt_par_QColor( 1 ) ) ); + } + else if( hb_pcount() == 2 && hbqt_par_isDerivedFrom( 1, "QCOLOR" ) && hbqt_par_isDerivedFrom( 2, "QCOLOR" ) ) { __HB_RETPTRGC__( new QPalette( *hbqt_par_QColor( 1 ), *hbqt_par_QColor( 2 ) ) ); } diff --git a/harbour/contrib/hbqt/qtgui/qth/QPicture.qth b/harbour/contrib/hbqt/qtgui/qth/QPicture.qth index 977ff4b4f6..df12ec83d0 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QPicture.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QPicture.qth @@ -39,7 +39,7 @@ HB_FUNC( QT_QPICTURE ) { __HB_RETPTRGC__( new QPicture( hb_parni( 1 ) ) ); } - else if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) ) + else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QPICTURE" ) ) { __HB_RETPTRGC__( new QPicture( *hbqt_par_QPicture( 1 ) ) ); } diff --git a/harbour/contrib/hbqt/qtgui/qth/QPlainTextDocumentLayout.qth b/harbour/contrib/hbqt/qtgui/qth/QPlainTextDocumentLayout.qth index db0e5d2291..d90baa3fed 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QPlainTextDocumentLayout.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QPlainTextDocumentLayout.qth @@ -28,10 +28,14 @@ New = */ HB_FUNC( QT_QPLAINTEXTDOCUMENTLAYOUT ) { - if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) ) + if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QTEXTDOCUMENT" ) ) { __HB_RETPTRGC__( new QPlainTextDocumentLayout( hbqt_par_QTextDocument( 1 ) ) ); } + else + { + hb_errRT_BASE( EG_ARG, 9999, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); + } } diff --git a/harbour/contrib/hbqt/qtgui/qth/QPlainTextEdit.qth b/harbour/contrib/hbqt/qtgui/qth/QPlainTextEdit.qth index 727888fc51..2b5fdea924 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QPlainTextEdit.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QPlainTextEdit.qth @@ -38,16 +38,16 @@ HB_FUNC( QT_QPLAINTEXTEDIT ) __HB_RETPTRGC__( new QPlainTextEdit( hb_parstr_utf8( 1, &pText01, NULL ), 0 ) ); hb_strfree( pText01 ); } - else if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) ) - { - __HB_RETPTRGC__( new QPlainTextEdit( hbqt_par_QWidget( 1 ) ) ); - } - else if( hb_pcount() == 2 && HB_ISCHAR( 1 ) && HB_ISOBJECT( 2 ) ) + else if( hb_pcount() == 2 && HB_ISCHAR( 1 ) && hbqt_par_isDerivedFrom( 2, "QWIDGET" ) ) { void * pText01 = NULL; - __HB_RETPTRGC__( new QPlainTextEdit( hb_parstr_utf8( 1, &pText01, NULL ), hbqt_par_QWidget( 2 ) ) ); + __HB_RETPTRGC__( new QPlainTextEdit( hb_parstr_utf8( 1, &pText01, NULL ), hbqt_par_QWidget( 2 ) ) ); hb_strfree( pText01 ); } + else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QWIDGET" ) ) + { + __HB_RETPTRGC__( new QPlainTextEdit( hbqt_par_QWidget( 1 ) ) ); + } else { __HB_RETPTRGC__( new QPlainTextEdit() ); diff --git a/harbour/contrib/hbqt/qtgui/qth/QPrinter.qth b/harbour/contrib/hbqt/qtgui/qth/QPrinter.qth index 0540b06c7d..d0910aa186 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QPrinter.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QPrinter.qth @@ -29,7 +29,7 @@ New = */ HB_FUNC( QT_QPRINTER ) { - if( hb_pcount() >= 1 && HB_ISOBJECT( 1 ) ) + if( hb_pcount() >= 1 && hbqt_par_isDerivedFrom( 1, "QPRINTERINFO" ) ) { __HB_RETPTRGC__( new QPrinter( *hbqt_par_QPrinterInfo( 1 ), ( QPrinter::PrinterMode ) ( HB_ISNUM( 2 ) ? hb_parni( 2 ) : QPrinter::ScreenResolution ) ) ); } diff --git a/harbour/contrib/hbqt/qtgui/qth/QPushButton.qth b/harbour/contrib/hbqt/qtgui/qth/QPushButton.qth index 7fc2b795d3..e4855e5529 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QPushButton.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QPushButton.qth @@ -48,7 +48,14 @@ HB_FUNC( QT_QPUSHBUTTON ) __HB_RETPTRGC__( new QPushButton( HB_ISOBJECT( 1 ) ? hbqt_par_QWidget( 1 ) : 0 ) ); } */ - __HB_RETPTRGC__( new QPushButton( HB_ISOBJECT( 1 ) ? hbqt_par_QWidget( 1 ) : 0 ) ); + if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QWIDGET" ) ) + { + __HB_RETPTRGC__( new QPushButton( hbqt_par_QWidget( 1 ) ) ); + } + else + { + __HB_RETPTRGC__( new QPushButton() ); + } } diff --git a/harbour/contrib/hbqt/qtgui/qth/QRadialGradient.qth b/harbour/contrib/hbqt/qtgui/qth/QRadialGradient.qth index 99bcce2811..84a3333588 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QRadialGradient.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QRadialGradient.qth @@ -32,15 +32,15 @@ New = */ HB_FUNC( QT_QRADIALGRADIENT ) { - if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) ) + if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QRADIALGRADIENT" ) ) { __HB_RETPTRGC__( new QRadialGradient( *hbqt_par_QRadialGradient( 1 ) ) ); } - else if( hb_pcount() == 2 && HB_ISOBJECT( 1 ) && HB_ISNUM( 2 ) ) + else if( hb_pcount() == 2 && hbqt_par_isDerivedFrom( 1, "QPOINTF" ) && HB_ISNUM( 2 ) ) { __HB_RETPTRGC__( new QRadialGradient( *hbqt_par_QPointF( 1 ), hb_parnd( 2 ) ) ); } - else if( hb_pcount() == 3 && HB_ISOBJECT( 1 ) && HB_ISNUM( 2 ) && HB_ISOBJECT( 3 ) ) + else if( hb_pcount() == 3 && hbqt_par_isDerivedFrom( 1, "QPOINTF" ) && HB_ISNUM( 2 ) && hbqt_par_isDerivedFrom( 3, "QPOINTF" ) ) { __HB_RETPTRGC__( new QRadialGradient( *hbqt_par_QPointF( 1 ), hb_parnd( 2 ), *hbqt_par_QPointF( 3 ) ) ); } diff --git a/harbour/contrib/hbqt/qtgui/qth/QRadioButton.qth b/harbour/contrib/hbqt/qtgui/qth/QRadioButton.qth index 5d9730b2ac..9af5dc371c 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QRadioButton.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QRadioButton.qth @@ -26,13 +26,19 @@ New = pParent */ HB_FUNC( QT_QRADIOBUTTON ) { - if( hb_pcount() >= 1 && HB_ISCHAR( 1 ) ) + if( hb_pcount() == 2 && HB_ISCHAR( 1 ) && hbqt_par_isDerivedFrom( 2, "QWIDGET" ) ) { void * pText01 = NULL; - __HB_RETPTRGC__( new QRadioButton( hb_parstr_utf8( 1, &pText01, NULL ), HB_ISOBJECT( 2 ) ? hbqt_par_QWidget( 2 ) : 0 ) ); + __HB_RETPTRGC__( new QRadioButton( hb_parstr_utf8( 1, &pText01, NULL ), hbqt_par_QWidget( 2 ) ) ); hb_strfree( pText01 ); } - else if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) ) + else if( hb_pcount() == 1 && HB_ISCHAR( 1 ) ) + { + void * pText01 = NULL; + __HB_RETPTRGC__( new QRadioButton( hb_parstr_utf8( 1, &pText01, NULL ) ) ); + hb_strfree( pText01 ); + } + else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QWIDGET" ) ) __HB_RETPTRGC__( new QRadioButton( hbqt_par_QWidget( 1 ) ) ); else __HB_RETPTRGC__( new QRadioButton() ); diff --git a/harbour/contrib/hbqt/qtgui/qth/QRegExpValidator.qth b/harbour/contrib/hbqt/qtgui/qth/QRegExpValidator.qth index dbfaf6c3b3..92b3eeee7b 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QRegExpValidator.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QRegExpValidator.qth @@ -29,14 +29,18 @@ Destructor = */ HB_FUNC( QT_QREGEXPVALIDATOR ) { - if( hb_pcount() == 2 && HB_ISOBJECT( 1 ) && HB_ISOBJECT( 2 ) ) + if( hb_pcount() == 2 && hbqt_par_isDerivedFrom( 1, "QREGEXP" ) && hbqt_par_isDerivedFrom( 2, "QOBJECT" ) ) { __HB_RETPTRGC__( new QRegExpValidator( *hbqt_par_QRegExp( 1 ), hbqt_par_QObject( 2 ) ) ); } - else if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) ) + else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QOBJECT" ) ) { __HB_RETPTRGC__( new QRegExpValidator( hbqt_par_QObject( 1 ) ) ); } + else + { + hb_errRT_BASE( EG_ARG, 9999, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); + } } diff --git a/harbour/contrib/hbqt/qtgui/qth/QResizeEvent.qth b/harbour/contrib/hbqt/qtgui/qth/QResizeEvent.qth index 5bb98c3816..d2adb9ddec 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QResizeEvent.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QResizeEvent.qth @@ -28,14 +28,18 @@ Constructor = */ HB_FUNC( QT_QRESIZEEVENT ) { - if( hb_pcount() == 2 && HB_ISOBJECT( 1 ) && HB_ISOBJECT( 2 ) ) + if( hb_pcount() == 2 && hbqt_par_isDerivedFrom( 1, "QSIZE" ) && hbqt_par_isDerivedFrom( 2, "QSIZE" ) ) { __HB_RETPTRGC__( new QResizeEvent( *hbqt_par_QSize( 1 ), *hbqt_par_QSize( 2 ) ) ); } - else if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) ) + else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QRESIZEEVENT" ) ) { __HB_RETPTRGC__( new QResizeEvent( *hbqt_par_QResizeEvent( 1 ) ) ); } + else + { + hb_errRT_BASE( EG_ARG, 9999, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); + } } diff --git a/harbour/contrib/hbqt/qtgui/qth/QShortcutEvent.qth b/harbour/contrib/hbqt/qtgui/qth/QShortcutEvent.qth index 98b107e8fc..7a2854e357 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QShortcutEvent.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QShortcutEvent.qth @@ -71,14 +71,18 @@ New = */ HB_FUNC( QT_QSHORTCUTEVENT ) { - if( hb_pcount() >= 2 && HB_ISOBJECT( 1 ) && HB_ISNUM( 2 ) ) + if( hb_pcount() >= 2 && hbqt_par_isDerivedFrom( 1, "QKEYSEQUENCE" ) && HB_ISNUM( 2 ) ) { __HB_RETPTRGC__( new QShortcutEvent( *hbqt_par_QKeySequence( 1 ), hb_parni( 2 ), ( HB_ISLOG( 3 ) ? hb_parl( 3 ) : false ) ) ); } - else if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) ) + else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QSHORTCUTEVENT" ) ) { __HB_RETPTRGC__( new QShortcutEvent( *hbqt_par_QShortcutEvent( 1 ) ) ); } + else + { + hb_errRT_BASE( EG_ARG, 9999, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); + } } diff --git a/harbour/contrib/hbqt/qtgui/qth/QShowEvent.qth b/harbour/contrib/hbqt/qtgui/qth/QShowEvent.qth index 02fc2652d7..ebd717486a 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QShowEvent.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QShowEvent.qth @@ -32,7 +32,7 @@ HB_FUNC( QT_QSHOWEVENT ) { __HB_RETPTRGC__( new QShowEvent() ); } - else if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) ) + else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QSHOWEVENT" ) ) { __HB_RETPTRGC__( new QShowEvent( *hbqt_par_QShowEvent( 1 ) ) ); } diff --git a/harbour/contrib/hbqt/qtgui/qth/QSizePolicy.qth b/harbour/contrib/hbqt/qtgui/qth/QSizePolicy.qth index 09f610f4ba..287ababf3e 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QSizePolicy.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QSizePolicy.qth @@ -29,11 +29,15 @@ New = */ HB_FUNC( QT_QSIZEPOLICY ) { - if( hb_pcount() >= 2 && HB_ISNUM( 1 ) && HB_ISNUM( 2 ) ) + if( hb_pcount() == 3 && HB_ISNUM( 1 ) && HB_ISNUM( 2 ) && HB_ISNUM( 3 ) ) + { + __HB_RETPTRGC__( new QSizePolicy( ( QSizePolicy::Policy ) hb_parni( 1 ), ( QSizePolicy::Policy ) hb_parni( 2 ), ( QSizePolicy::ControlType ) hb_parni( 3 ) ) ); + } + else if( hb_pcount() == 2 && HB_ISNUM( 1 ) && HB_ISNUM( 2 ) ) { __HB_RETPTRGC__( new QSizePolicy( ( QSizePolicy::Policy ) hb_parni( 1 ), ( QSizePolicy::Policy ) hb_parni( 2 ) ) ); } - else if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) ) + else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QSIZEPOLICY" ) ) { __HB_RETPTRGC__( new QSizePolicy( *hbqt_par_QSizePolicy( 1 ) ) ); } diff --git a/harbour/contrib/hbqt/qtgui/qth/QSortFilterProxyModel.qth b/harbour/contrib/hbqt/qtgui/qth/QSortFilterProxyModel.qth index fed8eb3da5..13f4af869e 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QSortFilterProxyModel.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QSortFilterProxyModel.qth @@ -79,7 +79,7 @@ Constructor = */ HB_FUNC( QT_QSORTFILTERPROXYMODEL ) { - if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) ) + if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QOBJECT" ) ) { __HB_RETPTRGC__( new QSortFilterProxyModel( hbqt_par_QObject( 1 ) ) ); } diff --git a/harbour/contrib/hbqt/qtgui/qth/QSpacerItem.qth b/harbour/contrib/hbqt/qtgui/qth/QSpacerItem.qth index 1796fdb8e1..b16f0726bf 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QSpacerItem.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QSpacerItem.qth @@ -34,10 +34,14 @@ HB_FUNC( QT_QSPACERITEM ) HB_ISNUM( 3 ) ? ( QSizePolicy::Policy ) hb_parni( 3 ) : QSizePolicy::Minimum, HB_ISNUM( 4 ) ? ( QSizePolicy::Policy ) hb_parni( 4 ) : QSizePolicy::Minimum ); } - else if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) ) + else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QSPACERITEM" ) ) { __HB_RETPTRGC__( new QSpacerItem( *hbqt_par_QSpacerItem( 1 ) ) ); } + else + { + hb_errRT_BASE( EG_ARG, 9999, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); + } } diff --git a/harbour/contrib/hbqt/qtgui/qth/QTableWidgetItem.qth b/harbour/contrib/hbqt/qtgui/qth/QTableWidgetItem.qth index 31bac83467..d947906d85 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QTableWidgetItem.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QTableWidgetItem.qth @@ -35,17 +35,23 @@ HB_FUNC( QT_QTABLEWIDGETITEM ) __HB_RETPTRGC__( new QTableWidgetItem( hb_parstr_utf8( 1, &pText01, NULL ), hb_parni( 2 ) ) ); hb_strfree( pText01 ); } + else if( hb_pcount() == 1 && HB_ISCHAR( 1 ) ) + { + void * pText01 = NULL; + __HB_RETPTRGC__( new QTableWidgetItem( hb_parstr_utf8( 1, &pText01, NULL ) ) ); + hb_strfree( pText01 ); + } else if( hb_pcount() == 1 && HB_ISNUM( 1 ) ) { __HB_RETPTRGC__( new QTableWidgetItem( hb_parni( 1 ) ) ); } - else if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) ) + else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QTABLEWIDGETITEM" ) ) { __HB_RETPTRGC__( new QTableWidgetItem( *hbqt_par_QTableWidgetItem( 1 ) ) ); } else { - __HB_RETPTRGC__( new QTableWidgetItem( 0 ) ); + __HB_RETPTRGC__( new QTableWidgetItem() ); } } diff --git a/harbour/contrib/hbqt/qtgui/qth/QTextBlock.qth b/harbour/contrib/hbqt/qtgui/qth/QTextBlock.qth index 645bfee7f1..228b3bd39f 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QTextBlock.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QTextBlock.qth @@ -28,7 +28,7 @@ New = */ HB_FUNC( QT_QTEXTBLOCK ) { - if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) ) + if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QTEXTBLOCK" ) ) { __HB_RETPTRGC__( new QTextBlock( *hbqt_par_QTextBlock( 1 ) ) ); } diff --git a/harbour/contrib/hbqt/qtgui/qth/QTextBlockFormat.qth b/harbour/contrib/hbqt/qtgui/qth/QTextBlockFormat.qth index 61e2d7223e..c8f58e0604 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QTextBlockFormat.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QTextBlockFormat.qth @@ -28,7 +28,7 @@ New = */ HB_FUNC( QT_QTEXTBLOCKFORMAT ) { - if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) ) + if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QTEXTBLOCKFORMAT" ) ) { __HB_RETPTRGC__( new QTextBlockFormat( *hbqt_par_QTextBlockFormat( 1 ) ) ); } diff --git a/harbour/contrib/hbqt/qtgui/qth/QToolBar.qth b/harbour/contrib/hbqt/qtgui/qth/QToolBar.qth index 2b899ff937..04f675301c 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QToolBar.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QToolBar.qth @@ -27,14 +27,26 @@ New = pParent */ HB_FUNC( QT_QTOOLBAR ) { - if( hb_pcount() >= 1 && HB_ISCHAR( 1 ) ) + if( hb_pcount() == 2 && HB_ISCHAR( 1 ) && hbqt_par_isDerivedFrom( 2, "QWIDGET" ) ) { void * pText01 = NULL; - __HB_RETPTRGC__( new QToolBar( hb_parstr_utf8( 1, &pText01, NULL ), HB_ISOBJECT( 2 ) ? hbqt_par_QWidget( 2 ) : 0 ) ); + __HB_RETPTRGC__( new QToolBar( hb_parstr_utf8( 1, &pText01, NULL ), hbqt_par_QWidget( 2 ) ) ); hb_strfree( pText01 ); - } + } + else if( hb_pcount() == 1 && HB_ISCHAR( 1 ) ) + { + void * pText01 = NULL; + __HB_RETPTRGC__( new QToolBar( hb_parstr_utf8( 1, &pText01, NULL ) ) ); + hb_strfree( pText01 ); + } + else if( hb_pcount() >= 1 && hbqt_par_isDerivedFrom( 1, "QWIDGET" ) ) + { + __HB_RETPTRGC__( new QToolBar( hbqt_par_QWidget( 1 ) ) ); + } else - __HB_RETPTRGC__( new QToolBar( HB_ISOBJECT( 1 ) ? hbqt_par_QWidget( 1 ) : 0 ) ); + { + __HB_RETPTRGC__( new QToolBar() ); + } } diff --git a/harbour/contrib/hbqt/qtgui/qth/QWheelEvent.qth b/harbour/contrib/hbqt/qtgui/qth/QWheelEvent.qth index 4918b9ea14..7053079034 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QWheelEvent.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QWheelEvent.qth @@ -29,18 +29,22 @@ Constructor = */ HB_FUNC( QT_QWHEELEVENT ) { - if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) ) + if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QWHEELEVENT" ) ) { __HB_RETPTRGC__( new QWheelEvent( *hbqt_par_QWheelEvent( 1 ) ) ); } - else if( hb_pcount() >= 4 ) + else if( hb_pcount() >= 4 && hbqt_par_isDerivedFrom( 1, "QPOINT" ) && ISNUM( 2 ) && ISNUM( 3 ) && HB_ISNUM( 4 ) ) { __HB_RETPTRGC__( new QWheelEvent( *hbqt_par_QPoint( 1 ), hb_parni( 2 ), ( Qt::MouseButtons ) hb_parni( 3 ), ( Qt::KeyboardModifiers ) hb_parni( 4 ), ( Qt::Orientation ) ( HB_ISNUM( 5 ) ? hb_parni( 5 ) : Qt::Vertical ) ) ); } - else if( hb_pcount() >= 5 ) + else if( hb_pcount() >= 5 && hbqt_par_isDerivedFrom( 1, "QPOINT" ) && hbqt_par_isDerivedFrom( 2, "QPOINT" ) && ISNUM( 3 ) && ISNUM( 4 ) && HB_ISNUM( 5 ) ) { __HB_RETPTRGC__( new QWheelEvent( *hbqt_par_QPoint( 1 ), *hbqt_par_QPoint( 2 ), hb_parni( 3 ), ( Qt::MouseButtons ) hb_parni( 4 ), ( Qt::KeyboardModifiers ) hb_parni( 5 ), ( Qt::Orientation ) ( HB_ISNUM( 6 ) ? hb_parni( 6 ) : Qt::Vertical ) ) ); } + else + { + hb_errRT_BASE( EG_ARG, 9999, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); + } } diff --git a/harbour/contrib/hbqt/qtgui/qth/QWidget.qth b/harbour/contrib/hbqt/qtgui/qth/QWidget.qth index e14e6bc2f6..2abb671504 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QWidget.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QWidget.qth @@ -31,9 +31,9 @@ PaintEvent = YES */ HB_FUNC( QT_QWIDGET ) { - if( hb_pcount() >= 1 && HB_ISOBJECT( 1 ) ) + if( hb_pcount() >= 1 && hbqt_par_isDerivedFrom( 1, "QWIDGET" ) ) { - __HB_RETPTRGC__( new QWidget( hbqt_par_QWidget( 1 ), ( Qt::WindowFlags ) ( HB_ISNUM( 2 ) ? hb_parni( 2 ) : 0 ) ) ); + __HB_RETPTRGC__( new QWidget( hbqt_par_QWidget( 1 ), ( Qt::WindowFlags ) hb_parni( 2 ) ) ); } else { diff --git a/harbour/contrib/hbqt/qtgui/qth/QWindowStateChangeEvent.qth b/harbour/contrib/hbqt/qtgui/qth/QWindowStateChangeEvent.qth index a3d049f5cf..de3dbe38cc 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QWindowStateChangeEvent.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QWindowStateChangeEvent.qth @@ -36,10 +36,14 @@ HB_FUNC( QT_QWINDOWSTATECHANGEEVENT ) { __HB_RETPTRGC__( new QWindowStateChangeEvent( ( Qt::WindowStates ) hb_parni( 1 ) ) ); } - else if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) ) + else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QWINDOWSTATECHANGEEVENT" ) ) { __HB_RETPTRGC__( new QWindowStateChangeEvent( *hbqt_par_QWindowStateChangeEvent( 1 ) ) ); } + else + { + hb_errRT_BASE( EG_ARG, 9999, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); + } }