diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 165ba07f02..3feb49a846 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,200 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-09-27 12:58 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com) + * contrib/hbqt/generator/hbqtgen.prg + ! Modified TO implement destructors IN a different way. + + * contrib/hbqt/qth/QAbstractItemModel.qth + + Added more CLASS members. + + * contrib/hbqt/hbqt.ch + * contrib/hbqt/hbqt.h + * contrib/hbqt/hbqt_slots.cpp + * contrib/hbqt/hbqt_slots.h + * contrib/hbqt/moc_slots.cpp + + Added more members plus re-worked event management to support multi-threads + and multi-windows in a different perspective. It is an effort to locate where + Harbour's Qt implementation is buggy with respect to ever increasing memory usage + plus Qt's Paint Engine which appears to be dependant on thread's idle time. + [ This is the way I preceive this fact ] + + * contrib/hbqt/QAbstractButton.cpp + * contrib/hbqt/QAbstractItemModel.cpp + * contrib/hbqt/QAbstractItemView.cpp + * contrib/hbqt/QAbstractListModel.cpp + * contrib/hbqt/QAbstractScrollArea.cpp + * contrib/hbqt/QAbstractSlider.cpp + * contrib/hbqt/QAbstractSpinBox.cpp + * contrib/hbqt/QAbstractTableModel.cpp + * contrib/hbqt/QAction.cpp + * contrib/hbqt/QApplication.cpp + * contrib/hbqt/QBitmap.cpp + * contrib/hbqt/QBoxLayout.cpp + * contrib/hbqt/QBrush.cpp + * contrib/hbqt/QButtonGroup.cpp + * contrib/hbqt/QCalendarWidget.cpp + * contrib/hbqt/QColor.cpp + * contrib/hbqt/QColorDialog.cpp + * contrib/hbqt/QComboBox.cpp + * contrib/hbqt/QCoreApplication.cpp + * contrib/hbqt/QCursor.cpp + * contrib/hbqt/QDateTime.cpp + * contrib/hbqt/QDesktopWidget.cpp + * contrib/hbqt/QDial.cpp + * contrib/hbqt/QDialog.cpp + * contrib/hbqt/QDir.cpp + * contrib/hbqt/QDirModel.cpp + * contrib/hbqt/QDockWidget.cpp + * contrib/hbqt/QDragMoveEvent.cpp + * contrib/hbqt/QErrorMessage.cpp + * contrib/hbqt/QEvent.cpp + * contrib/hbqt/QEventLoop.cpp + * contrib/hbqt/QFileDialog.cpp + * contrib/hbqt/QFileSystemModel.cpp + * contrib/hbqt/QFocusFrame.cpp + * contrib/hbqt/QFont.cpp + * contrib/hbqt/QFontComboBox.cpp + * contrib/hbqt/QFontInfo.cpp + * contrib/hbqt/QFontMetrics.cpp + * contrib/hbqt/QFontMetricsF.cpp + * contrib/hbqt/QFormLayout.cpp + * contrib/hbqt/QFrame.cpp + * contrib/hbqt/QFtp.cpp + * contrib/hbqt/QGridLayout.cpp + * contrib/hbqt/QGroupBox.cpp + * contrib/hbqt/QHBoxLayout.cpp + * contrib/hbqt/QHeaderView.cpp + * contrib/hbqt/QHttp.cpp + * contrib/hbqt/QIcon.cpp + * contrib/hbqt/QImage.cpp + * contrib/hbqt/QImageReader.cpp + * contrib/hbqt/QImageWriter.cpp + * contrib/hbqt/QInputDialog.cpp + * contrib/hbqt/QIODevice.cpp + * contrib/hbqt/QKeyEvent.cpp + * contrib/hbqt/QKeySequence.cpp + * contrib/hbqt/QLabel.cpp + * contrib/hbqt/QLayoutItem.cpp + * contrib/hbqt/QLCDNumber.cpp + * contrib/hbqt/QLineEdit.cpp + * contrib/hbqt/QList.cpp + * contrib/hbqt/QListView.cpp + * contrib/hbqt/QListWidget.cpp + * contrib/hbqt/QListWidgetItem.cpp + * contrib/hbqt/QMainWindow.cpp + * contrib/hbqt/QMenu.cpp + * contrib/hbqt/QMenuBar.cpp + * contrib/hbqt/QMessageBox.cpp + * contrib/hbqt/QModelIndex.cpp + * contrib/hbqt/QMouseEvent.cpp + * contrib/hbqt/QMoveEvent.cpp + * contrib/hbqt/QObject.cpp + * contrib/hbqt/QPaintDevice.cpp + * contrib/hbqt/QPainter.cpp + * contrib/hbqt/QPalette.cpp + * contrib/hbqt/QPen.cpp + * contrib/hbqt/QPicture.cpp + * contrib/hbqt/QPixmap.cpp + * contrib/hbqt/QPoint.cpp + * contrib/hbqt/QPrintDialog.cpp + * contrib/hbqt/QPrintEngine.cpp + * contrib/hbqt/QPrinter.cpp + * contrib/hbqt/QPrintPreviewDialog.cpp + * contrib/hbqt/QProcess.cpp + * contrib/hbqt/QProgressDialog.cpp + * contrib/hbqt/QPushButton.cpp + * contrib/hbqt/QRect.cpp + * contrib/hbqt/QRectF.cpp + * contrib/hbqt/QRegion.cpp + * contrib/hbqt/QResource.cpp + * contrib/hbqt/QScrollArea.cpp + * contrib/hbqt/QScrollBar.cpp + * contrib/hbqt/QSignalMapper.cpp + * contrib/hbqt/QSize.cpp + * contrib/hbqt/QSizeF.cpp + * contrib/hbqt/QSizeGrip.cpp + * contrib/hbqt/QSlider.cpp + * contrib/hbqt/QSound.cpp + * contrib/hbqt/QSplashScreen.cpp + * contrib/hbqt/QSplitter.cpp + * contrib/hbqt/QStandardItem.cpp + * contrib/hbqt/QStandardItemModel.cpp + * contrib/hbqt/QStatusBar.cpp + * contrib/hbqt/QStyle.cpp + * contrib/hbqt/QStyledItemDelegate.cpp + * contrib/hbqt/QStyleOption.cpp + * contrib/hbqt/QSystemTrayIcon.cpp + * contrib/hbqt/QTabBar.cpp + * contrib/hbqt/QTableView.cpp + * contrib/hbqt/QTableWidget.cpp + * contrib/hbqt/QTableWidgetItem.cpp + * contrib/hbqt/QTabWidget.cpp + * contrib/hbqt/QTextBoundaryFinder.cpp + * contrib/hbqt/QTextCursor.cpp + * contrib/hbqt/QTextDecoder.cpp + * contrib/hbqt/QTextDocument.cpp + * contrib/hbqt/QTextDocumentFragment.cpp + * contrib/hbqt/QTextDocumentWriter.cpp + * contrib/hbqt/QTextEdit.cpp + * contrib/hbqt/QTextEncoder.cpp + * contrib/hbqt/QTextFormat.cpp + * contrib/hbqt/QTextFrame.cpp + * contrib/hbqt/QTextLayout.cpp + * contrib/hbqt/QTextStream.cpp + * contrib/hbqt/QTimer.cpp + * contrib/hbqt/QToolBar.cpp + * contrib/hbqt/QToolBox.cpp + * contrib/hbqt/QToolButton.cpp + * contrib/hbqt/QTreeView.cpp + * contrib/hbqt/QTreeWidget.cpp + * contrib/hbqt/QTreeWidgetItem.cpp + * contrib/hbqt/QUrl.cpp + * contrib/hbqt/QVariant.cpp + * contrib/hbqt/QVBoxLayout.cpp + * contrib/hbqt/QWebHistoryInterface.cpp + * contrib/hbqt/QWebHistoryItem.cpp + * contrib/hbqt/QWebHitTestResult.cpp + * contrib/hbqt/QWebPage.cpp + * contrib/hbqt/QWebPluginFactory.cpp + * contrib/hbqt/QWebSecurityOrigin.cpp + * contrib/hbqt/QWebView.cpp + * contrib/hbqt/QWidget.cpp + * contrib/hbqt/QWidgetAction.cpp + * contrib/hbqt/QWindowsStyle.cpp + * contrib/hbqt/QWindowsXPStyle.cpp + * contrib/hbqt/QWizard.cpp + * contrib/hbqt/TQAbstractItemModel.prg + ! Result of change in implemention of destructors in hbqtgen.prg. + + [ In this commit I had concentrated on two pit-falls which may + certainly prevent Qt's efficacy in Habour applications: + + 1. Ever-growing memory usage. + 2. GPF in multi-threaded multi-windows + + Though I have tried my level best to pin-point where memory usage + keeps up growing, I could not find anything worth control. I changed the + way destructors were implemented before, but that also seems to be + insufficent. But as we have better control over the events, some + of you will be able to locate what exactly is the problem. + + GPF in multi-threaded multi-window scenario is caused by PAINT event + which produces GPF is CPU is not released momentarily for that thread. + So I inserted hb_idleSleep( 0.2 ) in the code where PAINT event is about + to be returning, and the GPF went away. But this insertion has a greater + damaging effect that it slows down the application considerably as + with each single keystroke, appln becomes idle for that much period. + I have guarded this under QT_EXECUTE_IN_THREADS constant for now. + If you want to play with this feature than compile HBQT with it + and then open menu option. Do not + bother about how slow appln executes but simply open as mamny + dialogs as you want and navigate different components. + NOTE: you may require to increase nMilliSeconds in hb_idleSleep( 0.2 ) + from 0.2 to 0.5 as this value is heavily CPU dependant. + + Hope someone will be able to locate exact fixes to above two issues. ] + 2009-09-24 19:15 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * INSTALL + Sections numbered for easier reference when pointing to it diff --git a/harbour/contrib/hbqt/QAbstractButton.cpp b/harbour/contrib/hbqt/QAbstractButton.cpp index 69b0732da1..29e6ff4ac0 100644 --- a/harbour/contrib/hbqt/QAbstractButton.cpp +++ b/harbour/contrib/hbqt/QAbstractButton.cpp @@ -84,7 +84,7 @@ HB_FUNC( QT_QABSTRACTBUTTON ) */ HB_FUNC( QT_QABSTRACTBUTTON_DESTROY ) { - hbqt_par_QAbstractButton( 1 )->~QAbstractButton(); + delete hbqt_par_QAbstractButton( 1 ); } /* diff --git a/harbour/contrib/hbqt/QAbstractItemModel.cpp b/harbour/contrib/hbqt/QAbstractItemModel.cpp index 6642139d08..7623cc9827 100644 --- a/harbour/contrib/hbqt/QAbstractItemModel.cpp +++ b/harbour/contrib/hbqt/QAbstractItemModel.cpp @@ -111,13 +111,18 @@ HB_FUNC( QT_HBDBFMODEL_INDEX ) hb_retptr( new QModelIndex( hbqt_par_HbDbfModel( 1 )->index( hb_parni( 2 ), hb_parni( 3 ), QModelIndex() ) ) ); } +HB_FUNC( QT_HBDBFMODEL_HBSETROWCOLUMNS ) +{ + hbqt_par_HbDbfModel( 1 )->hbSetRowColumns( hb_parni( 2 ), hb_parni( 3 ) ); +} + /* * DESTRUCTOR */ HB_FUNC( QT_QABSTRACTITEMMODEL_DESTROY ) { - hbqt_par_QAbstractItemModel( 1 )->~QAbstractItemModel(); + delete hbqt_par_QAbstractItemModel( 1 ); } /* diff --git a/harbour/contrib/hbqt/QAbstractItemView.cpp b/harbour/contrib/hbqt/QAbstractItemView.cpp index 868c576386..083310eef9 100644 --- a/harbour/contrib/hbqt/QAbstractItemView.cpp +++ b/harbour/contrib/hbqt/QAbstractItemView.cpp @@ -94,7 +94,7 @@ HB_FUNC( QT_QABSTRACTITEMVIEW ) */ HB_FUNC( QT_QABSTRACTITEMVIEW_DESTROY ) { - hbqt_par_QAbstractItemView( 1 )->~QAbstractItemView(); + delete hbqt_par_QAbstractItemView( 1 ); } /* diff --git a/harbour/contrib/hbqt/QAbstractListModel.cpp b/harbour/contrib/hbqt/QAbstractListModel.cpp index e1a7bbbae1..31f4b04d17 100644 --- a/harbour/contrib/hbqt/QAbstractListModel.cpp +++ b/harbour/contrib/hbqt/QAbstractListModel.cpp @@ -84,7 +84,7 @@ HB_FUNC( QT_QABSTRACTLISTMODEL ) */ HB_FUNC( QT_QABSTRACTLISTMODEL_DESTROY ) { - hbqt_par_QAbstractListModel( 1 )->~QAbstractListModel(); + delete hbqt_par_QAbstractListModel( 1 ); } /* diff --git a/harbour/contrib/hbqt/QAbstractScrollArea.cpp b/harbour/contrib/hbqt/QAbstractScrollArea.cpp index 5793e1aafc..488eab1b0d 100644 --- a/harbour/contrib/hbqt/QAbstractScrollArea.cpp +++ b/harbour/contrib/hbqt/QAbstractScrollArea.cpp @@ -84,7 +84,7 @@ HB_FUNC( QT_QABSTRACTSCROLLAREA ) */ HB_FUNC( QT_QABSTRACTSCROLLAREA_DESTROY ) { - hbqt_par_QAbstractScrollArea( 1 )->~QAbstractScrollArea(); + delete hbqt_par_QAbstractScrollArea( 1 ); } /* diff --git a/harbour/contrib/hbqt/QAbstractSlider.cpp b/harbour/contrib/hbqt/QAbstractSlider.cpp index 9a81830239..6307bf6267 100644 --- a/harbour/contrib/hbqt/QAbstractSlider.cpp +++ b/harbour/contrib/hbqt/QAbstractSlider.cpp @@ -88,7 +88,7 @@ HB_FUNC( QT_QABSTRACTSLIDER ) */ HB_FUNC( QT_QABSTRACTSLIDER_DESTROY ) { - hbqt_par_QAbstractSlider( 1 )->~QAbstractSlider(); + delete hbqt_par_QAbstractSlider( 1 ); } /* diff --git a/harbour/contrib/hbqt/QAbstractSpinBox.cpp b/harbour/contrib/hbqt/QAbstractSpinBox.cpp index 715adf06f2..e6174fd15f 100644 --- a/harbour/contrib/hbqt/QAbstractSpinBox.cpp +++ b/harbour/contrib/hbqt/QAbstractSpinBox.cpp @@ -91,7 +91,7 @@ HB_FUNC( QT_QABSTRACTSPINBOX ) */ HB_FUNC( QT_QABSTRACTSPINBOX_DESTROY ) { - hbqt_par_QAbstractSpinBox( 1 )->~QAbstractSpinBox(); + delete hbqt_par_QAbstractSpinBox( 1 ); } /* diff --git a/harbour/contrib/hbqt/QAbstractTableModel.cpp b/harbour/contrib/hbqt/QAbstractTableModel.cpp index ccfd4ec9e2..4474527fea 100644 --- a/harbour/contrib/hbqt/QAbstractTableModel.cpp +++ b/harbour/contrib/hbqt/QAbstractTableModel.cpp @@ -84,7 +84,7 @@ HB_FUNC( QT_QABSTRACTTABLEMODEL ) */ HB_FUNC( QT_QABSTRACTTABLEMODEL_DESTROY ) { - hbqt_par_QAbstractTableModel( 1 )->~QAbstractTableModel(); + delete hbqt_par_QAbstractTableModel( 1 ); } /* diff --git a/harbour/contrib/hbqt/QAction.cpp b/harbour/contrib/hbqt/QAction.cpp index 075b10695c..8ee86f9d2b 100644 --- a/harbour/contrib/hbqt/QAction.cpp +++ b/harbour/contrib/hbqt/QAction.cpp @@ -108,7 +108,7 @@ HB_FUNC( QT_QACTION ) */ HB_FUNC( QT_QACTION_DESTROY ) { - hbqt_par_QAction( 1 )->~QAction(); + delete hbqt_par_QAction( 1 ); } /* diff --git a/harbour/contrib/hbqt/QApplication.cpp b/harbour/contrib/hbqt/QApplication.cpp index 81b3deacbe..fe6eda51c4 100644 --- a/harbour/contrib/hbqt/QApplication.cpp +++ b/harbour/contrib/hbqt/QApplication.cpp @@ -203,7 +203,7 @@ HB_FUNC( QT_QAPPLICATION_QUIT ) */ HB_FUNC( QT_QAPPLICATION_DESTROY ) { - hbqt_par_QApplication( 1 )->~QApplication(); + delete hbqt_par_QApplication( 1 ); } /* diff --git a/harbour/contrib/hbqt/QBitmap.cpp b/harbour/contrib/hbqt/QBitmap.cpp index 32dc76aa27..8931121694 100644 --- a/harbour/contrib/hbqt/QBitmap.cpp +++ b/harbour/contrib/hbqt/QBitmap.cpp @@ -122,7 +122,7 @@ HB_FUNC( QT_QBITMAP ) */ HB_FUNC( QT_QBITMAP_DESTROY ) { - hbqt_par_QBitmap( 1 )->~QBitmap(); + delete hbqt_par_QBitmap( 1 ); } /* diff --git a/harbour/contrib/hbqt/QBoxLayout.cpp b/harbour/contrib/hbqt/QBoxLayout.cpp index 4aa891c01a..b7786fe037 100644 --- a/harbour/contrib/hbqt/QBoxLayout.cpp +++ b/harbour/contrib/hbqt/QBoxLayout.cpp @@ -89,7 +89,7 @@ HB_FUNC( QT_QBOXLAYOUT ) */ HB_FUNC( QT_QBOXLAYOUT_DESTROY ) { - hbqt_par_QBoxLayout( 1 )->~QBoxLayout(); + delete hbqt_par_QBoxLayout( 1 ); } /* diff --git a/harbour/contrib/hbqt/QBrush.cpp b/harbour/contrib/hbqt/QBrush.cpp index cda45d8532..358cd56fe3 100644 --- a/harbour/contrib/hbqt/QBrush.cpp +++ b/harbour/contrib/hbqt/QBrush.cpp @@ -146,7 +146,7 @@ HB_FUNC( QT_QBRUSH ) */ HB_FUNC( QT_QBRUSH_DESTROY ) { - hbqt_par_QBrush( 1 )->~QBrush(); + delete hbqt_par_QBrush( 1 ); } /* diff --git a/harbour/contrib/hbqt/QButtonGroup.cpp b/harbour/contrib/hbqt/QButtonGroup.cpp index 79d2f3bf8b..c3fa0642a7 100644 --- a/harbour/contrib/hbqt/QButtonGroup.cpp +++ b/harbour/contrib/hbqt/QButtonGroup.cpp @@ -100,7 +100,7 @@ HB_FUNC( QT_QBUTTONGROUP ) */ HB_FUNC( QT_QBUTTONGROUP_DESTROY ) { - hbqt_par_QButtonGroup( 1 )->~QButtonGroup(); + delete hbqt_par_QButtonGroup( 1 ); } /* diff --git a/harbour/contrib/hbqt/QCalendarWidget.cpp b/harbour/contrib/hbqt/QCalendarWidget.cpp index c6f0c1afd8..ded48a1748 100644 --- a/harbour/contrib/hbqt/QCalendarWidget.cpp +++ b/harbour/contrib/hbqt/QCalendarWidget.cpp @@ -99,7 +99,7 @@ HB_FUNC( QT_QCALENDARWIDGET ) */ HB_FUNC( QT_QCALENDARWIDGET_DESTROY ) { - hbqt_par_QCalendarWidget( 1 )->~QCalendarWidget(); + delete hbqt_par_QCalendarWidget( 1 ); } /* diff --git a/harbour/contrib/hbqt/QColor.cpp b/harbour/contrib/hbqt/QColor.cpp index 07a305ab07..92dcbb9f27 100644 --- a/harbour/contrib/hbqt/QColor.cpp +++ b/harbour/contrib/hbqt/QColor.cpp @@ -127,7 +127,7 @@ HB_FUNC( QT_QCOLOR ) */ HB_FUNC( QT_QCOLOR_DESTROY ) { - hbqt_par_QColor( 1 )->~QColor(); + delete hbqt_par_QColor( 1 ); } /* diff --git a/harbour/contrib/hbqt/QColorDialog.cpp b/harbour/contrib/hbqt/QColorDialog.cpp index 36a751e505..cafcda33e8 100644 --- a/harbour/contrib/hbqt/QColorDialog.cpp +++ b/harbour/contrib/hbqt/QColorDialog.cpp @@ -97,7 +97,7 @@ HB_FUNC( QT_QCOLORDIALOG ) */ HB_FUNC( QT_QCOLORDIALOG_DESTROY ) { - hbqt_par_QColorDialog( 1 )->~QColorDialog(); + delete hbqt_par_QColorDialog( 1 ); } /* diff --git a/harbour/contrib/hbqt/QComboBox.cpp b/harbour/contrib/hbqt/QComboBox.cpp index 16117518d9..027903c3c8 100644 --- a/harbour/contrib/hbqt/QComboBox.cpp +++ b/harbour/contrib/hbqt/QComboBox.cpp @@ -89,7 +89,7 @@ HB_FUNC( QT_QCOMBOBOX ) */ HB_FUNC( QT_QCOMBOBOX_DESTROY ) { - hbqt_par_QComboBox( 1 )->~QComboBox(); + delete hbqt_par_QComboBox( 1 ); } /* diff --git a/harbour/contrib/hbqt/QCoreApplication.cpp b/harbour/contrib/hbqt/QCoreApplication.cpp index 182da21e13..9138276c5a 100644 --- a/harbour/contrib/hbqt/QCoreApplication.cpp +++ b/harbour/contrib/hbqt/QCoreApplication.cpp @@ -103,7 +103,7 @@ HB_FUNC( QT_QCOREAPPLICATION ) */ HB_FUNC( QT_QCOREAPPLICATION_DESTROY ) { - hbqt_par_QCoreApplication( 1 )->~QCoreApplication(); + delete hbqt_par_QCoreApplication( 1 ); } /* diff --git a/harbour/contrib/hbqt/QCursor.cpp b/harbour/contrib/hbqt/QCursor.cpp index 5093f4eec6..069de8074c 100644 --- a/harbour/contrib/hbqt/QCursor.cpp +++ b/harbour/contrib/hbqt/QCursor.cpp @@ -122,7 +122,7 @@ HB_FUNC( QT_QCURSOR ) */ HB_FUNC( QT_QCURSOR_DESTROY ) { - hbqt_par_QCursor( 1 )->~QCursor(); + delete hbqt_par_QCursor( 1 ); } /* diff --git a/harbour/contrib/hbqt/QDateTime.cpp b/harbour/contrib/hbqt/QDateTime.cpp index 28a726a18a..db40b8c915 100644 --- a/harbour/contrib/hbqt/QDateTime.cpp +++ b/harbour/contrib/hbqt/QDateTime.cpp @@ -87,7 +87,7 @@ HB_FUNC( QT_QDATETIME ) */ HB_FUNC( QT_QDATETIME_DESTROY ) { - hbqt_par_QDateTime( 1 )->~QDateTime(); + delete hbqt_par_QDateTime( 1 ); } /* diff --git a/harbour/contrib/hbqt/QDesktopWidget.cpp b/harbour/contrib/hbqt/QDesktopWidget.cpp index 3f6c6fe537..d36d572773 100644 --- a/harbour/contrib/hbqt/QDesktopWidget.cpp +++ b/harbour/contrib/hbqt/QDesktopWidget.cpp @@ -84,7 +84,7 @@ HB_FUNC( QT_QDESKTOPWIDGET ) */ HB_FUNC( QT_QDESKTOPWIDGET_DESTROY ) { - hbqt_par_QDesktopWidget( 1 )->~QDesktopWidget(); + delete hbqt_par_QDesktopWidget( 1 ); } /* diff --git a/harbour/contrib/hbqt/QDial.cpp b/harbour/contrib/hbqt/QDial.cpp index 505da53ccb..c0c3076a32 100644 --- a/harbour/contrib/hbqt/QDial.cpp +++ b/harbour/contrib/hbqt/QDial.cpp @@ -84,7 +84,7 @@ HB_FUNC( QT_QDIAL ) */ HB_FUNC( QT_QDIAL_DESTROY ) { - hbqt_par_QDial( 1 )->~QDial(); + delete hbqt_par_QDial( 1 ); } /* diff --git a/harbour/contrib/hbqt/QDialog.cpp b/harbour/contrib/hbqt/QDialog.cpp index 2b7ddff161..53a6b0ea2d 100644 --- a/harbour/contrib/hbqt/QDialog.cpp +++ b/harbour/contrib/hbqt/QDialog.cpp @@ -88,7 +88,7 @@ HB_FUNC( QT_QDIALOG ) */ HB_FUNC( QT_QDIALOG_DESTROY ) { - hbqt_par_QDialog( 1 )->~QDialog(); + delete hbqt_par_QDialog( 1 ); } /* diff --git a/harbour/contrib/hbqt/QDir.cpp b/harbour/contrib/hbqt/QDir.cpp index 8c54f3d24e..414f7c0c1b 100644 --- a/harbour/contrib/hbqt/QDir.cpp +++ b/harbour/contrib/hbqt/QDir.cpp @@ -93,7 +93,7 @@ HB_FUNC( QT_QDIR ) */ HB_FUNC( QT_QDIR_DESTROY ) { - hbqt_par_QDir( 1 )->~QDir(); + delete hbqt_par_QDir( 1 ); } /* diff --git a/harbour/contrib/hbqt/QDirModel.cpp b/harbour/contrib/hbqt/QDirModel.cpp index b981998bde..d3e89988c2 100644 --- a/harbour/contrib/hbqt/QDirModel.cpp +++ b/harbour/contrib/hbqt/QDirModel.cpp @@ -89,7 +89,7 @@ HB_FUNC( QT_QDIRMODEL ) */ HB_FUNC( QT_QDIRMODEL_DESTROY ) { - hbqt_par_QDirModel( 1 )->~QDirModel(); + delete hbqt_par_QDirModel( 1 ); } /* diff --git a/harbour/contrib/hbqt/QDockWidget.cpp b/harbour/contrib/hbqt/QDockWidget.cpp index 94e73b644d..5fd4de159b 100644 --- a/harbour/contrib/hbqt/QDockWidget.cpp +++ b/harbour/contrib/hbqt/QDockWidget.cpp @@ -90,7 +90,7 @@ HB_FUNC( QT_QDOCKWIDGET ) */ HB_FUNC( QT_QDOCKWIDGET_DESTROY ) { - hbqt_par_QDockWidget( 1 )->~QDockWidget(); + delete hbqt_par_QDockWidget( 1 ); } /* diff --git a/harbour/contrib/hbqt/QDragMoveEvent.cpp b/harbour/contrib/hbqt/QDragMoveEvent.cpp index 3a564b1d05..7c677e66a2 100644 --- a/harbour/contrib/hbqt/QDragMoveEvent.cpp +++ b/harbour/contrib/hbqt/QDragMoveEvent.cpp @@ -84,7 +84,7 @@ HB_FUNC( QT_QDRAGMOVEEVENT ) */ HB_FUNC( QT_QDRAGMOVEEVENT_DESTROY ) { - hbqt_par_QDragMoveEvent( 1 )->~QDragMoveEvent(); + delete hbqt_par_QDragMoveEvent( 1 ); } /* diff --git a/harbour/contrib/hbqt/QErrorMessage.cpp b/harbour/contrib/hbqt/QErrorMessage.cpp index 9addc7bf1e..64a9a9eb80 100644 --- a/harbour/contrib/hbqt/QErrorMessage.cpp +++ b/harbour/contrib/hbqt/QErrorMessage.cpp @@ -93,7 +93,7 @@ HB_FUNC( QT_QERRORMESSAGE ) */ HB_FUNC( QT_QERRORMESSAGE_DESTROY ) { - hbqt_par_QErrorMessage( 1 )->~QErrorMessage(); + delete hbqt_par_QErrorMessage( 1 ); } /* diff --git a/harbour/contrib/hbqt/QEvent.cpp b/harbour/contrib/hbqt/QEvent.cpp index ff569359e2..35b9b59fb5 100644 --- a/harbour/contrib/hbqt/QEvent.cpp +++ b/harbour/contrib/hbqt/QEvent.cpp @@ -88,7 +88,7 @@ HB_FUNC( QT_QEVENT ) */ HB_FUNC( QT_QEVENT_DESTROY ) { - hbqt_par_QEvent( 1 )->~QEvent(); + delete hbqt_par_QEvent( 1 ); } /* diff --git a/harbour/contrib/hbqt/QEventLoop.cpp b/harbour/contrib/hbqt/QEventLoop.cpp index 7b8febf3b9..086d596dc8 100644 --- a/harbour/contrib/hbqt/QEventLoop.cpp +++ b/harbour/contrib/hbqt/QEventLoop.cpp @@ -89,7 +89,7 @@ HB_FUNC( QT_QEVENTLOOP ) */ HB_FUNC( QT_QEVENTLOOP_DESTROY ) { - hbqt_par_QEventLoop( 1 )->~QEventLoop(); + delete hbqt_par_QEventLoop( 1 ); } /* diff --git a/harbour/contrib/hbqt/QFileDialog.cpp b/harbour/contrib/hbqt/QFileDialog.cpp index fab6aac99e..76fbafe5b7 100644 --- a/harbour/contrib/hbqt/QFileDialog.cpp +++ b/harbour/contrib/hbqt/QFileDialog.cpp @@ -111,7 +111,7 @@ HB_FUNC( QT_QFILEDIALOG ) */ HB_FUNC( QT_QFILEDIALOG_DESTROY ) { - hbqt_par_QFileDialog( 1 )->~QFileDialog(); + delete hbqt_par_QFileDialog( 1 ); } /* diff --git a/harbour/contrib/hbqt/QFileSystemModel.cpp b/harbour/contrib/hbqt/QFileSystemModel.cpp index 8cec360bae..b063fd35fd 100644 --- a/harbour/contrib/hbqt/QFileSystemModel.cpp +++ b/harbour/contrib/hbqt/QFileSystemModel.cpp @@ -88,7 +88,7 @@ HB_FUNC( QT_QFILESYSTEMMODEL ) */ HB_FUNC( QT_QFILESYSTEMMODEL_DESTROY ) { - hbqt_par_QFileSystemModel( 1 )->~QFileSystemModel(); + delete hbqt_par_QFileSystemModel( 1 ); } /* diff --git a/harbour/contrib/hbqt/QFocusFrame.cpp b/harbour/contrib/hbqt/QFocusFrame.cpp index f987e43bb2..641d0385d9 100644 --- a/harbour/contrib/hbqt/QFocusFrame.cpp +++ b/harbour/contrib/hbqt/QFocusFrame.cpp @@ -84,7 +84,7 @@ HB_FUNC( QT_QFOCUSFRAME ) */ HB_FUNC( QT_QFOCUSFRAME_DESTROY ) { - hbqt_par_QFocusFrame( 1 )->~QFocusFrame(); + delete hbqt_par_QFocusFrame( 1 ); } /* diff --git a/harbour/contrib/hbqt/QFont.cpp b/harbour/contrib/hbqt/QFont.cpp index 3205ded1cf..3fe18a44e4 100644 --- a/harbour/contrib/hbqt/QFont.cpp +++ b/harbour/contrib/hbqt/QFont.cpp @@ -124,7 +124,7 @@ HB_FUNC( QT_QFONT ) */ HB_FUNC( QT_QFONT_DESTROY ) { - hbqt_par_QFont( 1 )->~QFont(); + delete hbqt_par_QFont( 1 ); } /* diff --git a/harbour/contrib/hbqt/QFontComboBox.cpp b/harbour/contrib/hbqt/QFontComboBox.cpp index 2143d21aaa..95eec9bca8 100644 --- a/harbour/contrib/hbqt/QFontComboBox.cpp +++ b/harbour/contrib/hbqt/QFontComboBox.cpp @@ -89,7 +89,7 @@ HB_FUNC( QT_QFONTCOMBOBOX ) */ HB_FUNC( QT_QFONTCOMBOBOX_DESTROY ) { - hbqt_par_QFontComboBox( 1 )->~QFontComboBox(); + delete hbqt_par_QFontComboBox( 1 ); } /* diff --git a/harbour/contrib/hbqt/QFontInfo.cpp b/harbour/contrib/hbqt/QFontInfo.cpp index a02b9e1683..f50439ba11 100644 --- a/harbour/contrib/hbqt/QFontInfo.cpp +++ b/harbour/contrib/hbqt/QFontInfo.cpp @@ -85,7 +85,7 @@ HB_FUNC( QT_QFONTINFO ) */ HB_FUNC( QT_QFONTINFO_DESTROY ) { - hbqt_par_QFontInfo( 1 )->~QFontInfo(); + delete hbqt_par_QFontInfo( 1 ); } /* diff --git a/harbour/contrib/hbqt/QFontMetrics.cpp b/harbour/contrib/hbqt/QFontMetrics.cpp index 8febed0185..af803ff36b 100644 --- a/harbour/contrib/hbqt/QFontMetrics.cpp +++ b/harbour/contrib/hbqt/QFontMetrics.cpp @@ -100,7 +100,7 @@ HB_FUNC( QT_QFONTMETRICS ) */ HB_FUNC( QT_QFONTMETRICS_DESTROY ) { - hbqt_par_QFontMetrics( 1 )->~QFontMetrics(); + delete hbqt_par_QFontMetrics( 1 ); } /* diff --git a/harbour/contrib/hbqt/QFontMetricsF.cpp b/harbour/contrib/hbqt/QFontMetricsF.cpp index 662b8d7aef..bcc0931146 100644 --- a/harbour/contrib/hbqt/QFontMetricsF.cpp +++ b/harbour/contrib/hbqt/QFontMetricsF.cpp @@ -105,7 +105,7 @@ HB_FUNC( QT_QFONTMETRICSF ) */ HB_FUNC( QT_QFONTMETRICSF_DESTROY ) { - hbqt_par_QFontMetricsF( 1 )->~QFontMetricsF(); + delete hbqt_par_QFontMetricsF( 1 ); } /* diff --git a/harbour/contrib/hbqt/QFormLayout.cpp b/harbour/contrib/hbqt/QFormLayout.cpp index 9f8c168386..9b28f7469c 100644 --- a/harbour/contrib/hbqt/QFormLayout.cpp +++ b/harbour/contrib/hbqt/QFormLayout.cpp @@ -90,7 +90,7 @@ HB_FUNC( QT_QFORMLAYOUT ) */ HB_FUNC( QT_QFORMLAYOUT_DESTROY ) { - hbqt_par_QFormLayout( 1 )->~QFormLayout(); + delete hbqt_par_QFormLayout( 1 ); } /* diff --git a/harbour/contrib/hbqt/QFrame.cpp b/harbour/contrib/hbqt/QFrame.cpp index 21ca0db705..900ad51cbc 100644 --- a/harbour/contrib/hbqt/QFrame.cpp +++ b/harbour/contrib/hbqt/QFrame.cpp @@ -90,7 +90,7 @@ HB_FUNC( QT_QFRAME ) */ HB_FUNC( QT_QFRAME_DESTROY ) { - hbqt_par_QFrame( 1 )->~QFrame(); + delete hbqt_par_QFrame( 1 ); } /* diff --git a/harbour/contrib/hbqt/QFtp.cpp b/harbour/contrib/hbqt/QFtp.cpp index cbace5455c..9a28f42c7d 100644 --- a/harbour/contrib/hbqt/QFtp.cpp +++ b/harbour/contrib/hbqt/QFtp.cpp @@ -107,7 +107,7 @@ HB_FUNC( QT_QFTP_READ ) */ HB_FUNC( QT_QFTP_DESTROY ) { - hbqt_par_QFtp( 1 )->~QFtp(); + delete hbqt_par_QFtp( 1 ); } /* diff --git a/harbour/contrib/hbqt/QGridLayout.cpp b/harbour/contrib/hbqt/QGridLayout.cpp index 4553d555f7..c8252a3bea 100644 --- a/harbour/contrib/hbqt/QGridLayout.cpp +++ b/harbour/contrib/hbqt/QGridLayout.cpp @@ -85,7 +85,7 @@ HB_FUNC( QT_QGRIDLAYOUT ) */ HB_FUNC( QT_QGRIDLAYOUT_DESTROY ) { - hbqt_par_QGridLayout( 1 )->~QGridLayout(); + delete hbqt_par_QGridLayout( 1 ); } /* diff --git a/harbour/contrib/hbqt/QGroupBox.cpp b/harbour/contrib/hbqt/QGroupBox.cpp index 48da26288c..3177fdab10 100644 --- a/harbour/contrib/hbqt/QGroupBox.cpp +++ b/harbour/contrib/hbqt/QGroupBox.cpp @@ -85,7 +85,7 @@ HB_FUNC( QT_QGROUPBOX ) */ HB_FUNC( QT_QGROUPBOX_DESTROY ) { - hbqt_par_QGroupBox( 1 )->~QGroupBox(); + delete hbqt_par_QGroupBox( 1 ); } /* diff --git a/harbour/contrib/hbqt/QHBoxLayout.cpp b/harbour/contrib/hbqt/QHBoxLayout.cpp index 1dcf4a8fb6..5589379ec0 100644 --- a/harbour/contrib/hbqt/QHBoxLayout.cpp +++ b/harbour/contrib/hbqt/QHBoxLayout.cpp @@ -85,7 +85,7 @@ HB_FUNC( QT_QHBOXLAYOUT ) */ HB_FUNC( QT_QHBOXLAYOUT_DESTROY ) { - hbqt_par_QHBoxLayout( 1 )->~QHBoxLayout(); + delete hbqt_par_QHBoxLayout( 1 ); } diff --git a/harbour/contrib/hbqt/QHeaderView.cpp b/harbour/contrib/hbqt/QHeaderView.cpp index c7b282363b..98aa3e6392 100644 --- a/harbour/contrib/hbqt/QHeaderView.cpp +++ b/harbour/contrib/hbqt/QHeaderView.cpp @@ -88,7 +88,7 @@ HB_FUNC( QT_QHEADERVIEW ) */ HB_FUNC( QT_QHEADERVIEW_DESTROY ) { - hbqt_par_QHeaderView( 1 )->~QHeaderView(); + delete hbqt_par_QHeaderView( 1 ); } /* diff --git a/harbour/contrib/hbqt/QHttp.cpp b/harbour/contrib/hbqt/QHttp.cpp index fd1d053240..2770f0c42c 100644 --- a/harbour/contrib/hbqt/QHttp.cpp +++ b/harbour/contrib/hbqt/QHttp.cpp @@ -107,7 +107,7 @@ HB_FUNC( QT_QHTTP_READ ) */ HB_FUNC( QT_QHTTP_DESTROY ) { - hbqt_par_QHttp( 1 )->~QHttp(); + delete hbqt_par_QHttp( 1 ); } /* diff --git a/harbour/contrib/hbqt/QIODevice.cpp b/harbour/contrib/hbqt/QIODevice.cpp index e0d46cfaff..28e354a28f 100644 --- a/harbour/contrib/hbqt/QIODevice.cpp +++ b/harbour/contrib/hbqt/QIODevice.cpp @@ -99,7 +99,7 @@ HB_FUNC( QT_QIODEVICE ) */ HB_FUNC( QT_QIODEVICE_DESTROY ) { - hbqt_par_QIODevice( 1 )->~QIODevice(); + delete hbqt_par_QIODevice( 1 ); } /* diff --git a/harbour/contrib/hbqt/QIcon.cpp b/harbour/contrib/hbqt/QIcon.cpp index f891ba74b3..7f37d23f64 100644 --- a/harbour/contrib/hbqt/QIcon.cpp +++ b/harbour/contrib/hbqt/QIcon.cpp @@ -114,7 +114,7 @@ HB_FUNC( QT_QICON ) */ HB_FUNC( QT_QICON_DESTROY ) { - hbqt_par_QIcon( 1 )->~QIcon(); + delete hbqt_par_QIcon( 1 ); } /* diff --git a/harbour/contrib/hbqt/QImage.cpp b/harbour/contrib/hbqt/QImage.cpp index ce39616ac3..eaf461b804 100644 --- a/harbour/contrib/hbqt/QImage.cpp +++ b/harbour/contrib/hbqt/QImage.cpp @@ -146,7 +146,7 @@ HB_FUNC( QT_QIMAGE ) */ HB_FUNC( QT_QIMAGE_DESTROY ) { - hbqt_par_QImage( 1 )->~QImage(); + delete hbqt_par_QImage( 1 ); } /* diff --git a/harbour/contrib/hbqt/QImageReader.cpp b/harbour/contrib/hbqt/QImageReader.cpp index 1584d86aff..a45f2eb8aa 100644 --- a/harbour/contrib/hbqt/QImageReader.cpp +++ b/harbour/contrib/hbqt/QImageReader.cpp @@ -100,7 +100,7 @@ HB_FUNC( QT_QIMAGEREADER ) */ HB_FUNC( QT_QIMAGEREADER_DESTROY ) { - hbqt_par_QImageReader( 1 )->~QImageReader(); + delete hbqt_par_QImageReader( 1 ); } /* diff --git a/harbour/contrib/hbqt/QImageWriter.cpp b/harbour/contrib/hbqt/QImageWriter.cpp index 3342d0c59c..685d7b8ddf 100644 --- a/harbour/contrib/hbqt/QImageWriter.cpp +++ b/harbour/contrib/hbqt/QImageWriter.cpp @@ -99,7 +99,7 @@ HB_FUNC( QT_QIMAGEWRITER ) */ HB_FUNC( QT_QIMAGEWRITER_DESTROY ) { - hbqt_par_QImageWriter( 1 )->~QImageWriter(); + delete hbqt_par_QImageWriter( 1 ); } /* diff --git a/harbour/contrib/hbqt/QInputDialog.cpp b/harbour/contrib/hbqt/QInputDialog.cpp index db098d2480..73e0415f9d 100644 --- a/harbour/contrib/hbqt/QInputDialog.cpp +++ b/harbour/contrib/hbqt/QInputDialog.cpp @@ -90,7 +90,7 @@ HB_FUNC( QT_QINPUTDIALOG ) */ HB_FUNC( QT_QINPUTDIALOG_DESTROY ) { - hbqt_par_QInputDialog( 1 )->~QInputDialog(); + delete hbqt_par_QInputDialog( 1 ); } /* diff --git a/harbour/contrib/hbqt/QKeyEvent.cpp b/harbour/contrib/hbqt/QKeyEvent.cpp index 2a50ec8983..91ad411e88 100644 --- a/harbour/contrib/hbqt/QKeyEvent.cpp +++ b/harbour/contrib/hbqt/QKeyEvent.cpp @@ -84,7 +84,7 @@ HB_FUNC( QT_QKEYEVENT ) */ HB_FUNC( QT_QKEYEVENT_DESTROY ) { - hbqt_par_QKeyEvent( 1 )->~QKeyEvent(); + delete hbqt_par_QKeyEvent( 1 ); } /* diff --git a/harbour/contrib/hbqt/QKeySequence.cpp b/harbour/contrib/hbqt/QKeySequence.cpp index 6a0aa9012b..f80c38bd02 100644 --- a/harbour/contrib/hbqt/QKeySequence.cpp +++ b/harbour/contrib/hbqt/QKeySequence.cpp @@ -110,7 +110,7 @@ HB_FUNC( QT_QKEYSEQUENCE ) */ HB_FUNC( QT_QKEYSEQUENCE_DESTROY ) { - hbqt_par_QKeySequence( 1 )->~QKeySequence(); + delete hbqt_par_QKeySequence( 1 ); } /* diff --git a/harbour/contrib/hbqt/QLCDNumber.cpp b/harbour/contrib/hbqt/QLCDNumber.cpp index 2a81f521ad..d518a154eb 100644 --- a/harbour/contrib/hbqt/QLCDNumber.cpp +++ b/harbour/contrib/hbqt/QLCDNumber.cpp @@ -90,7 +90,7 @@ HB_FUNC( QT_QLCDNUMBER ) */ HB_FUNC( QT_QLCDNUMBER_DESTROY ) { - hbqt_par_QLCDNumber( 1 )->~QLCDNumber(); + delete hbqt_par_QLCDNumber( 1 ); } /* diff --git a/harbour/contrib/hbqt/QLabel.cpp b/harbour/contrib/hbqt/QLabel.cpp index 1b4c37c19b..24b2c22581 100644 --- a/harbour/contrib/hbqt/QLabel.cpp +++ b/harbour/contrib/hbqt/QLabel.cpp @@ -85,7 +85,7 @@ HB_FUNC( QT_QLABEL ) */ HB_FUNC( QT_QLABEL_DESTROY ) { - hbqt_par_QLabel( 1 )->~QLabel(); + delete hbqt_par_QLabel( 1 ); } /* diff --git a/harbour/contrib/hbqt/QLayoutItem.cpp b/harbour/contrib/hbqt/QLayoutItem.cpp index e3d4ebed8f..7ebaca6c7f 100644 --- a/harbour/contrib/hbqt/QLayoutItem.cpp +++ b/harbour/contrib/hbqt/QLayoutItem.cpp @@ -84,7 +84,7 @@ HB_FUNC( QT_QLAYOUTITEM ) */ HB_FUNC( QT_QLAYOUTITEM_DESTROY ) { - hbqt_par_QLayoutItem( 1 )->~QLayoutItem(); + delete hbqt_par_QLayoutItem( 1 ); } /* diff --git a/harbour/contrib/hbqt/QLineEdit.cpp b/harbour/contrib/hbqt/QLineEdit.cpp index 261d27fc90..85b2ac93e2 100644 --- a/harbour/contrib/hbqt/QLineEdit.cpp +++ b/harbour/contrib/hbqt/QLineEdit.cpp @@ -89,7 +89,7 @@ HB_FUNC( QT_QLINEEDIT ) */ HB_FUNC( QT_QLINEEDIT_DESTROY ) { - hbqt_par_QLineEdit( 1 )->~QLineEdit(); + delete hbqt_par_QLineEdit( 1 ); } /* diff --git a/harbour/contrib/hbqt/QList.cpp b/harbour/contrib/hbqt/QList.cpp index ca4a0bb188..ea4c74232b 100644 --- a/harbour/contrib/hbqt/QList.cpp +++ b/harbour/contrib/hbqt/QList.cpp @@ -112,7 +112,7 @@ HB_FUNC( QT_QLIST ) */ HB_FUNC( QT_QLIST_DESTROY ) { - hbqt_par_QList( 1 )->~QList(); + delete hbqt_par_QList( 1 ); } /* diff --git a/harbour/contrib/hbqt/QListView.cpp b/harbour/contrib/hbqt/QListView.cpp index 9c37dabcd0..5d86c92251 100644 --- a/harbour/contrib/hbqt/QListView.cpp +++ b/harbour/contrib/hbqt/QListView.cpp @@ -92,7 +92,7 @@ HB_FUNC( QT_QLISTVIEW ) */ HB_FUNC( QT_QLISTVIEW_DESTROY ) { - hbqt_par_QListView( 1 )->~QListView(); + delete hbqt_par_QListView( 1 ); } /* diff --git a/harbour/contrib/hbqt/QListWidget.cpp b/harbour/contrib/hbqt/QListWidget.cpp index 917e8b0d70..6a307fb4c1 100644 --- a/harbour/contrib/hbqt/QListWidget.cpp +++ b/harbour/contrib/hbqt/QListWidget.cpp @@ -94,7 +94,7 @@ HB_FUNC( QT_QLISTWIDGET ) */ HB_FUNC( QT_QLISTWIDGET_DESTROY ) { - hbqt_par_QListWidget( 1 )->~QListWidget(); + delete hbqt_par_QListWidget( 1 ); } /* diff --git a/harbour/contrib/hbqt/QListWidgetItem.cpp b/harbour/contrib/hbqt/QListWidgetItem.cpp index e5d81aa493..5e17c337b8 100644 --- a/harbour/contrib/hbqt/QListWidgetItem.cpp +++ b/harbour/contrib/hbqt/QListWidgetItem.cpp @@ -91,7 +91,7 @@ HB_FUNC( QT_QLISTWIDGETITEM ) */ HB_FUNC( QT_QLISTWIDGETITEM_DESTROY ) { - hbqt_par_QListWidgetItem( 1 )->~QListWidgetItem(); + delete hbqt_par_QListWidgetItem( 1 ); } /* diff --git a/harbour/contrib/hbqt/QMainWindow.cpp b/harbour/contrib/hbqt/QMainWindow.cpp index 8733e63281..a98c068673 100644 --- a/harbour/contrib/hbqt/QMainWindow.cpp +++ b/harbour/contrib/hbqt/QMainWindow.cpp @@ -98,7 +98,7 @@ HB_FUNC( QT_QMAINWINDOW ) */ HB_FUNC( QT_QMAINWINDOW_DESTROY ) { - hbqt_par_QMainWindow( 1 )->~QMainWindow(); + delete hbqt_par_QMainWindow( 1 ); } /* diff --git a/harbour/contrib/hbqt/QMenu.cpp b/harbour/contrib/hbqt/QMenu.cpp index 8a112440d4..19ff024582 100644 --- a/harbour/contrib/hbqt/QMenu.cpp +++ b/harbour/contrib/hbqt/QMenu.cpp @@ -102,7 +102,7 @@ HB_FUNC( QT_QMENU ) */ HB_FUNC( QT_QMENU_DESTROY ) { - hbqt_par_QMenu( 1 )->~QMenu(); + delete hbqt_par_QMenu( 1 ); } /* diff --git a/harbour/contrib/hbqt/QMenuBar.cpp b/harbour/contrib/hbqt/QMenuBar.cpp index 8bf5aa97c2..52a80ef172 100644 --- a/harbour/contrib/hbqt/QMenuBar.cpp +++ b/harbour/contrib/hbqt/QMenuBar.cpp @@ -98,7 +98,7 @@ HB_FUNC( QT_QMENUBAR ) */ HB_FUNC( QT_QMENUBAR_DESTROY ) { - hbqt_par_QMenuBar( 1 )->~QMenuBar(); + delete hbqt_par_QMenuBar( 1 ); } /* diff --git a/harbour/contrib/hbqt/QMessageBox.cpp b/harbour/contrib/hbqt/QMessageBox.cpp index af140e6806..0263d0cf54 100644 --- a/harbour/contrib/hbqt/QMessageBox.cpp +++ b/harbour/contrib/hbqt/QMessageBox.cpp @@ -101,7 +101,7 @@ HB_FUNC( QT_QMESSAGEBOX ) */ HB_FUNC( QT_QMESSAGEBOX_DESTROY ) { - hbqt_par_QMessageBox( 1 )->~QMessageBox(); + delete hbqt_par_QMessageBox( 1 ); } /* diff --git a/harbour/contrib/hbqt/QModelIndex.cpp b/harbour/contrib/hbqt/QModelIndex.cpp index 0d2a5b74f0..cfd80bae10 100644 --- a/harbour/contrib/hbqt/QModelIndex.cpp +++ b/harbour/contrib/hbqt/QModelIndex.cpp @@ -85,7 +85,7 @@ HB_FUNC( QT_QMODELINDEX ) */ HB_FUNC( QT_QMODELINDEX_DESTROY ) { - hbqt_par_QModelIndex( 1 )->~QModelIndex(); + delete hbqt_par_QModelIndex( 1 ); } /* diff --git a/harbour/contrib/hbqt/QMouseEvent.cpp b/harbour/contrib/hbqt/QMouseEvent.cpp index d1c3ee8bcf..902e2c222c 100644 --- a/harbour/contrib/hbqt/QMouseEvent.cpp +++ b/harbour/contrib/hbqt/QMouseEvent.cpp @@ -85,7 +85,7 @@ HB_FUNC( QT_QMOUSEEVENT ) */ HB_FUNC( QT_QMOUSEEVENT_DESTROY ) { - hbqt_par_QMouseEvent( 1 )->~QMouseEvent(); + delete hbqt_par_QMouseEvent( 1 ); } /* diff --git a/harbour/contrib/hbqt/QMoveEvent.cpp b/harbour/contrib/hbqt/QMoveEvent.cpp index 805ae3438e..1f0a483604 100644 --- a/harbour/contrib/hbqt/QMoveEvent.cpp +++ b/harbour/contrib/hbqt/QMoveEvent.cpp @@ -84,7 +84,7 @@ HB_FUNC( QT_QMOVEEVENT ) */ HB_FUNC( QT_QMOVEEVENT_DESTROY ) { - hbqt_par_QMoveEvent( 1 )->~QMoveEvent(); + delete hbqt_par_QMoveEvent( 1 ); } /* diff --git a/harbour/contrib/hbqt/QObject.cpp b/harbour/contrib/hbqt/QObject.cpp index 94541ac44b..8a9ba84605 100644 --- a/harbour/contrib/hbqt/QObject.cpp +++ b/harbour/contrib/hbqt/QObject.cpp @@ -101,7 +101,7 @@ HB_FUNC( QT_QOBJECT ) */ HB_FUNC( QT_QOBJECT_DESTROY ) { - hbqt_par_QObject( 1 )->~QObject(); + delete hbqt_par_QObject( 1 ); } /* diff --git a/harbour/contrib/hbqt/QPaintDevice.cpp b/harbour/contrib/hbqt/QPaintDevice.cpp index 7a448b900f..e7bd0995d8 100644 --- a/harbour/contrib/hbqt/QPaintDevice.cpp +++ b/harbour/contrib/hbqt/QPaintDevice.cpp @@ -86,7 +86,7 @@ HB_FUNC( QT_QPAINTDEVICE ) */ HB_FUNC( QT_QPAINTDEVICE_DESTROY ) { - hbqt_par_QPaintDevice( 1 )->~QPaintDevice(); + delete hbqt_par_QPaintDevice( 1 ); } /* diff --git a/harbour/contrib/hbqt/QPainter.cpp b/harbour/contrib/hbqt/QPainter.cpp index f6c551d5c7..4b9aceaa50 100644 --- a/harbour/contrib/hbqt/QPainter.cpp +++ b/harbour/contrib/hbqt/QPainter.cpp @@ -111,7 +111,7 @@ HB_FUNC( QT_QPAINTER ) */ HB_FUNC( QT_QPAINTER_DESTROY ) { - hbqt_par_QPainter( 1 )->~QPainter(); + delete hbqt_par_QPainter( 1 ); } /* diff --git a/harbour/contrib/hbqt/QPalette.cpp b/harbour/contrib/hbqt/QPalette.cpp index 0767c72d51..6113510fcf 100644 --- a/harbour/contrib/hbqt/QPalette.cpp +++ b/harbour/contrib/hbqt/QPalette.cpp @@ -109,7 +109,7 @@ HB_FUNC( QT_QPALETTE ) */ HB_FUNC( QT_QPALETTE_DESTROY ) { - hbqt_par_QPalette( 1 )->~QPalette(); + delete hbqt_par_QPalette( 1 ); } /* diff --git a/harbour/contrib/hbqt/QPen.cpp b/harbour/contrib/hbqt/QPen.cpp index 438d91da5f..a3c36547ef 100644 --- a/harbour/contrib/hbqt/QPen.cpp +++ b/harbour/contrib/hbqt/QPen.cpp @@ -130,7 +130,7 @@ HB_FUNC( QT_QPEN ) */ HB_FUNC( QT_QPEN_DESTROY ) { - hbqt_par_QPen( 1 )->~QPen(); + delete hbqt_par_QPen( 1 ); } /* diff --git a/harbour/contrib/hbqt/QPicture.cpp b/harbour/contrib/hbqt/QPicture.cpp index d77a110bdc..f334d673aa 100644 --- a/harbour/contrib/hbqt/QPicture.cpp +++ b/harbour/contrib/hbqt/QPicture.cpp @@ -96,7 +96,7 @@ HB_FUNC( QT_QPICTURE ) */ HB_FUNC( QT_QPICTURE_DESTROY ) { - hbqt_par_QPicture( 1 )->~QPicture(); + delete hbqt_par_QPicture( 1 ); } /* diff --git a/harbour/contrib/hbqt/QPixmap.cpp b/harbour/contrib/hbqt/QPixmap.cpp index bccee76369..04cf6c9541 100644 --- a/harbour/contrib/hbqt/QPixmap.cpp +++ b/harbour/contrib/hbqt/QPixmap.cpp @@ -109,7 +109,7 @@ HB_FUNC( QT_QPIXMAP ) */ HB_FUNC( QT_QPIXMAP_DESTROY ) { - hbqt_par_QPixmap( 1 )->~QPixmap(); + delete hbqt_par_QPixmap( 1 ); } /* diff --git a/harbour/contrib/hbqt/QPoint.cpp b/harbour/contrib/hbqt/QPoint.cpp index e7056a56fd..23b21a2ada 100644 --- a/harbour/contrib/hbqt/QPoint.cpp +++ b/harbour/contrib/hbqt/QPoint.cpp @@ -96,7 +96,7 @@ HB_FUNC( QT_QPOINT ) */ HB_FUNC( QT_QPOINT_DESTROY ) { - hbqt_par_QPoint( 1 )->~QPoint(); + delete hbqt_par_QPoint( 1 ); } /* diff --git a/harbour/contrib/hbqt/QPrintDialog.cpp b/harbour/contrib/hbqt/QPrintDialog.cpp index 221e719ede..5b5d125f74 100644 --- a/harbour/contrib/hbqt/QPrintDialog.cpp +++ b/harbour/contrib/hbqt/QPrintDialog.cpp @@ -90,7 +90,7 @@ HB_FUNC( QT_QPRINTDIALOG ) */ HB_FUNC( QT_QPRINTDIALOG_DESTROY ) { - hbqt_par_QPrintDialog( 1 )->~QPrintDialog(); + delete hbqt_par_QPrintDialog( 1 ); } /* diff --git a/harbour/contrib/hbqt/QPrintEngine.cpp b/harbour/contrib/hbqt/QPrintEngine.cpp index 1fa8a686a9..792f6e682f 100644 --- a/harbour/contrib/hbqt/QPrintEngine.cpp +++ b/harbour/contrib/hbqt/QPrintEngine.cpp @@ -87,7 +87,7 @@ HB_FUNC( QT_QPRINTENGINE ) */ HB_FUNC( QT_QPRINTENGINE_DESTROY ) { - hbqt_par_QPrintEngine( 1 )->~QPrintEngine(); + delete hbqt_par_QPrintEngine( 1 ); } /* diff --git a/harbour/contrib/hbqt/QPrintPreviewDialog.cpp b/harbour/contrib/hbqt/QPrintPreviewDialog.cpp index 9b3d2a1622..c0b78e3930 100644 --- a/harbour/contrib/hbqt/QPrintPreviewDialog.cpp +++ b/harbour/contrib/hbqt/QPrintPreviewDialog.cpp @@ -90,7 +90,7 @@ HB_FUNC( QT_QPRINTPREVIEWDIALOG ) */ HB_FUNC( QT_QPRINTPREVIEWDIALOG_DESTROY ) { - hbqt_par_QPrintPreviewDialog( 1 )->~QPrintPreviewDialog(); + delete hbqt_par_QPrintPreviewDialog( 1 ); } /* diff --git a/harbour/contrib/hbqt/QPrinter.cpp b/harbour/contrib/hbqt/QPrinter.cpp index 0718714913..282d707a4f 100644 --- a/harbour/contrib/hbqt/QPrinter.cpp +++ b/harbour/contrib/hbqt/QPrinter.cpp @@ -116,7 +116,7 @@ HB_FUNC( QT_QPRINTER ) */ HB_FUNC( QT_QPRINTER_DESTROY ) { - hbqt_par_QPrinter( 1 )->~QPrinter(); + delete hbqt_par_QPrinter( 1 ); } /* diff --git a/harbour/contrib/hbqt/QProcess.cpp b/harbour/contrib/hbqt/QProcess.cpp index c2e9a8510e..f61c8d5a8a 100644 --- a/harbour/contrib/hbqt/QProcess.cpp +++ b/harbour/contrib/hbqt/QProcess.cpp @@ -102,7 +102,7 @@ HB_FUNC( QT_QPROCESS ) */ HB_FUNC( QT_QPROCESS_DESTROY ) { - hbqt_par_QProcess( 1 )->~QProcess(); + delete hbqt_par_QProcess( 1 ); } /* diff --git a/harbour/contrib/hbqt/QProgressDialog.cpp b/harbour/contrib/hbqt/QProgressDialog.cpp index 23f6441bfb..a728f1e31a 100644 --- a/harbour/contrib/hbqt/QProgressDialog.cpp +++ b/harbour/contrib/hbqt/QProgressDialog.cpp @@ -85,7 +85,7 @@ HB_FUNC( QT_QPROGRESSDIALOG ) */ HB_FUNC( QT_QPROGRESSDIALOG_DESTROY ) { - hbqt_par_QProgressDialog( 1 )->~QProgressDialog(); + delete hbqt_par_QProgressDialog( 1 ); } /* diff --git a/harbour/contrib/hbqt/QPushButton.cpp b/harbour/contrib/hbqt/QPushButton.cpp index ac6de4814a..d56b2a0af0 100644 --- a/harbour/contrib/hbqt/QPushButton.cpp +++ b/harbour/contrib/hbqt/QPushButton.cpp @@ -86,7 +86,7 @@ HB_FUNC( QT_QPUSHBUTTON ) */ HB_FUNC( QT_QPUSHBUTTON_DESTROY ) { - hbqt_par_QPushButton( 1 )->~QPushButton(); + delete hbqt_par_QPushButton( 1 ); } /* diff --git a/harbour/contrib/hbqt/QRect.cpp b/harbour/contrib/hbqt/QRect.cpp index 0316633d73..d1f130e230 100644 --- a/harbour/contrib/hbqt/QRect.cpp +++ b/harbour/contrib/hbqt/QRect.cpp @@ -102,7 +102,7 @@ HB_FUNC( QT_QRECT ) */ HB_FUNC( QT_QRECT_DESTROY ) { - hbqt_par_QRect( 1 )->~QRect(); + delete hbqt_par_QRect( 1 ); } /* diff --git a/harbour/contrib/hbqt/QRectF.cpp b/harbour/contrib/hbqt/QRectF.cpp index 3a59a6d891..4c343c93c1 100644 --- a/harbour/contrib/hbqt/QRectF.cpp +++ b/harbour/contrib/hbqt/QRectF.cpp @@ -103,7 +103,7 @@ HB_FUNC( QT_QRECTF ) */ HB_FUNC( QT_QRECTF_DESTROY ) { - hbqt_par_QRectF( 1 )->~QRectF(); + delete hbqt_par_QRectF( 1 ); } /* diff --git a/harbour/contrib/hbqt/QRegion.cpp b/harbour/contrib/hbqt/QRegion.cpp index 86e59c4e15..66018c13ee 100644 --- a/harbour/contrib/hbqt/QRegion.cpp +++ b/harbour/contrib/hbqt/QRegion.cpp @@ -143,7 +143,7 @@ HB_FUNC( QT_QREGION ) */ HB_FUNC( QT_QREGION_DESTROY ) { - hbqt_par_QRegion( 1 )->~QRegion(); + delete hbqt_par_QRegion( 1 ); } /* diff --git a/harbour/contrib/hbqt/QResource.cpp b/harbour/contrib/hbqt/QResource.cpp index 36dbd37b9b..3750893d3b 100644 --- a/harbour/contrib/hbqt/QResource.cpp +++ b/harbour/contrib/hbqt/QResource.cpp @@ -84,7 +84,7 @@ HB_FUNC( QT_QRESOURCE ) */ HB_FUNC( QT_QRESOURCE_DESTROY ) { - hbqt_par_QResource( 1 )->~QResource(); + delete hbqt_par_QResource( 1 ); } /* diff --git a/harbour/contrib/hbqt/QScrollArea.cpp b/harbour/contrib/hbqt/QScrollArea.cpp index 0e3a9262d4..c598ce7e15 100644 --- a/harbour/contrib/hbqt/QScrollArea.cpp +++ b/harbour/contrib/hbqt/QScrollArea.cpp @@ -84,7 +84,7 @@ HB_FUNC( QT_QSCROLLAREA ) */ HB_FUNC( QT_QSCROLLAREA_DESTROY ) { - hbqt_par_QScrollArea( 1 )->~QScrollArea(); + delete hbqt_par_QScrollArea( 1 ); } /* diff --git a/harbour/contrib/hbqt/QScrollBar.cpp b/harbour/contrib/hbqt/QScrollBar.cpp index 0dcb342dc7..3f04513ef7 100644 --- a/harbour/contrib/hbqt/QScrollBar.cpp +++ b/harbour/contrib/hbqt/QScrollBar.cpp @@ -85,7 +85,7 @@ HB_FUNC( QT_QSCROLLBAR ) */ HB_FUNC( QT_QSCROLLBAR_DESTROY ) { - hbqt_par_QScrollBar( 1 )->~QScrollBar(); + delete hbqt_par_QScrollBar( 1 ); } diff --git a/harbour/contrib/hbqt/QSignalMapper.cpp b/harbour/contrib/hbqt/QSignalMapper.cpp index 0aefeb4430..3c8a2ea1d2 100644 --- a/harbour/contrib/hbqt/QSignalMapper.cpp +++ b/harbour/contrib/hbqt/QSignalMapper.cpp @@ -84,7 +84,7 @@ HB_FUNC( QT_QSIGNALMAPPER ) */ HB_FUNC( QT_QSIGNALMAPPER_DESTROY ) { - hbqt_par_QSignalMapper( 1 )->~QSignalMapper(); + delete hbqt_par_QSignalMapper( 1 ); } /* diff --git a/harbour/contrib/hbqt/QSize.cpp b/harbour/contrib/hbqt/QSize.cpp index 2536bf21aa..16ead12a05 100644 --- a/harbour/contrib/hbqt/QSize.cpp +++ b/harbour/contrib/hbqt/QSize.cpp @@ -96,7 +96,7 @@ HB_FUNC( QT_QSIZE ) */ HB_FUNC( QT_QSIZE_DESTROY ) { - hbqt_par_QSize( 1 )->~QSize(); + delete hbqt_par_QSize( 1 ); } /* diff --git a/harbour/contrib/hbqt/QSizeF.cpp b/harbour/contrib/hbqt/QSizeF.cpp index 0d87d34063..8f5c7bbc6a 100644 --- a/harbour/contrib/hbqt/QSizeF.cpp +++ b/harbour/contrib/hbqt/QSizeF.cpp @@ -93,7 +93,7 @@ HB_FUNC( QT_QSIZEF ) */ HB_FUNC( QT_QSIZEF_DESTROY ) { - hbqt_par_QSizeF( 1 )->~QSizeF(); + delete hbqt_par_QSizeF( 1 ); } /* diff --git a/harbour/contrib/hbqt/QSizeGrip.cpp b/harbour/contrib/hbqt/QSizeGrip.cpp index debd75080c..39ddf30011 100644 --- a/harbour/contrib/hbqt/QSizeGrip.cpp +++ b/harbour/contrib/hbqt/QSizeGrip.cpp @@ -84,7 +84,7 @@ HB_FUNC( QT_QSIZEGRIP ) */ HB_FUNC( QT_QSIZEGRIP_DESTROY ) { - hbqt_par_QSizeGrip( 1 )->~QSizeGrip(); + delete hbqt_par_QSizeGrip( 1 ); } diff --git a/harbour/contrib/hbqt/QSlider.cpp b/harbour/contrib/hbqt/QSlider.cpp index fcea1b4e64..2c45398d86 100644 --- a/harbour/contrib/hbqt/QSlider.cpp +++ b/harbour/contrib/hbqt/QSlider.cpp @@ -92,7 +92,7 @@ HB_FUNC( QT_QSLIDER ) */ HB_FUNC( QT_QSLIDER_DESTROY ) { - hbqt_par_QSlider( 1 )->~QSlider(); + delete hbqt_par_QSlider( 1 ); } /* diff --git a/harbour/contrib/hbqt/QSound.cpp b/harbour/contrib/hbqt/QSound.cpp index f35f8ba02e..dae493ce72 100644 --- a/harbour/contrib/hbqt/QSound.cpp +++ b/harbour/contrib/hbqt/QSound.cpp @@ -84,7 +84,7 @@ HB_FUNC( QT_QSOUND ) */ HB_FUNC( QT_QSOUND_DESTROY ) { - hbqt_par_QSound( 1 )->~QSound(); + delete hbqt_par_QSound( 1 ); } /* diff --git a/harbour/contrib/hbqt/QSplashScreen.cpp b/harbour/contrib/hbqt/QSplashScreen.cpp index 38fd9cf99b..3d22b20ddc 100644 --- a/harbour/contrib/hbqt/QSplashScreen.cpp +++ b/harbour/contrib/hbqt/QSplashScreen.cpp @@ -85,7 +85,7 @@ HB_FUNC( QT_QSPLASHSCREEN ) */ HB_FUNC( QT_QSPLASHSCREEN_DESTROY ) { - hbqt_par_QSplashScreen( 1 )->~QSplashScreen(); + delete hbqt_par_QSplashScreen( 1 ); } /* diff --git a/harbour/contrib/hbqt/QSplitter.cpp b/harbour/contrib/hbqt/QSplitter.cpp index c6744164eb..ed6f51d114 100644 --- a/harbour/contrib/hbqt/QSplitter.cpp +++ b/harbour/contrib/hbqt/QSplitter.cpp @@ -98,7 +98,7 @@ HB_FUNC( QT_QSPLITTER ) */ HB_FUNC( QT_QSPLITTER_DESTROY ) { - hbqt_par_QSplitter( 1 )->~QSplitter(); + delete hbqt_par_QSplitter( 1 ); } /* diff --git a/harbour/contrib/hbqt/QStandardItem.cpp b/harbour/contrib/hbqt/QStandardItem.cpp index ca54b29a74..509235a5fa 100644 --- a/harbour/contrib/hbqt/QStandardItem.cpp +++ b/harbour/contrib/hbqt/QStandardItem.cpp @@ -107,7 +107,7 @@ HB_FUNC( QT_QSTANDARDITEM ) */ HB_FUNC( QT_QSTANDARDITEM_DESTROY ) { - hbqt_par_QStandardItem( 1 )->~QStandardItem(); + delete hbqt_par_QStandardItem( 1 ); } /* diff --git a/harbour/contrib/hbqt/QStandardItemModel.cpp b/harbour/contrib/hbqt/QStandardItemModel.cpp index cdf378b3ae..070c6b80e9 100644 --- a/harbour/contrib/hbqt/QStandardItemModel.cpp +++ b/harbour/contrib/hbqt/QStandardItemModel.cpp @@ -100,7 +100,7 @@ HB_FUNC( QT_QSTANDARDITEMMODEL ) */ HB_FUNC( QT_QSTANDARDITEMMODEL_DESTROY ) { - hbqt_par_QStandardItemModel( 1 )->~QStandardItemModel(); + delete hbqt_par_QStandardItemModel( 1 ); } /* diff --git a/harbour/contrib/hbqt/QStatusBar.cpp b/harbour/contrib/hbqt/QStatusBar.cpp index c8e2bed364..51356435c5 100644 --- a/harbour/contrib/hbqt/QStatusBar.cpp +++ b/harbour/contrib/hbqt/QStatusBar.cpp @@ -84,7 +84,7 @@ HB_FUNC( QT_QSTATUSBAR ) */ HB_FUNC( QT_QSTATUSBAR_DESTROY ) { - hbqt_par_QStatusBar( 1 )->~QStatusBar(); + delete hbqt_par_QStatusBar( 1 ); } /* diff --git a/harbour/contrib/hbqt/QStyle.cpp b/harbour/contrib/hbqt/QStyle.cpp index 84837016e9..f3070ffe75 100644 --- a/harbour/contrib/hbqt/QStyle.cpp +++ b/harbour/contrib/hbqt/QStyle.cpp @@ -99,7 +99,7 @@ HB_FUNC( QT_QSTYLE ) */ HB_FUNC( QT_QSTYLE_DESTROY ) { - hbqt_par_QStyle( 1 )->~QStyle(); + delete hbqt_par_QStyle( 1 ); } /* diff --git a/harbour/contrib/hbqt/QStyleOption.cpp b/harbour/contrib/hbqt/QStyleOption.cpp index 946baeded7..738b96007c 100644 --- a/harbour/contrib/hbqt/QStyleOption.cpp +++ b/harbour/contrib/hbqt/QStyleOption.cpp @@ -91,7 +91,7 @@ HB_FUNC( QT_QSTYLEOPTION ) */ HB_FUNC( QT_QSTYLEOPTION_DESTROY ) { - hbqt_par_QStyleOption( 1 )->~QStyleOption(); + delete hbqt_par_QStyleOption( 1 ); } /* diff --git a/harbour/contrib/hbqt/QStyledItemDelegate.cpp b/harbour/contrib/hbqt/QStyledItemDelegate.cpp index 3403ada6e3..4abc86ce38 100644 --- a/harbour/contrib/hbqt/QStyledItemDelegate.cpp +++ b/harbour/contrib/hbqt/QStyledItemDelegate.cpp @@ -84,7 +84,7 @@ HB_FUNC( QT_QSTYLEDITEMDELEGATE ) */ HB_FUNC( QT_QSTYLEDITEMDELEGATE_DESTROY ) { - hbqt_par_QStyledItemDelegate( 1 )->~QStyledItemDelegate(); + delete hbqt_par_QStyledItemDelegate( 1 ); } /* diff --git a/harbour/contrib/hbqt/QSystemTrayIcon.cpp b/harbour/contrib/hbqt/QSystemTrayIcon.cpp index 39b4a589f2..98e673c1b0 100644 --- a/harbour/contrib/hbqt/QSystemTrayIcon.cpp +++ b/harbour/contrib/hbqt/QSystemTrayIcon.cpp @@ -90,7 +90,7 @@ HB_FUNC( QT_QSYSTEMTRAYICON ) */ HB_FUNC( QT_QSYSTEMTRAYICON_DESTROY ) { - hbqt_par_QSystemTrayIcon( 1 )->~QSystemTrayIcon(); + delete hbqt_par_QSystemTrayIcon( 1 ); } /* diff --git a/harbour/contrib/hbqt/QTabBar.cpp b/harbour/contrib/hbqt/QTabBar.cpp index fd5dd3837f..fb3ef02ac0 100644 --- a/harbour/contrib/hbqt/QTabBar.cpp +++ b/harbour/contrib/hbqt/QTabBar.cpp @@ -91,7 +91,7 @@ HB_FUNC( QT_QTABBAR ) */ HB_FUNC( QT_QTABBAR_DESTROY ) { - hbqt_par_QTabBar( 1 )->~QTabBar(); + delete hbqt_par_QTabBar( 1 ); } /* diff --git a/harbour/contrib/hbqt/QTabWidget.cpp b/harbour/contrib/hbqt/QTabWidget.cpp index de8a6eeddb..66d98047f4 100644 --- a/harbour/contrib/hbqt/QTabWidget.cpp +++ b/harbour/contrib/hbqt/QTabWidget.cpp @@ -89,7 +89,7 @@ HB_FUNC( QT_QTABWIDGET ) */ HB_FUNC( QT_QTABWIDGET_DESTROY ) { - hbqt_par_QTabWidget( 1 )->~QTabWidget(); + delete hbqt_par_QTabWidget( 1 ); } /* diff --git a/harbour/contrib/hbqt/QTableView.cpp b/harbour/contrib/hbqt/QTableView.cpp index 81775f0544..cb97178f89 100644 --- a/harbour/contrib/hbqt/QTableView.cpp +++ b/harbour/contrib/hbqt/QTableView.cpp @@ -95,7 +95,7 @@ HB_FUNC( QT_HBTABLEVIEW_NAVIGATE ) */ HB_FUNC( QT_QTABLEVIEW_DESTROY ) { - hbqt_par_QTableView( 1 )->~QTableView(); + delete hbqt_par_QTableView( 1 ); } /* diff --git a/harbour/contrib/hbqt/QTableWidget.cpp b/harbour/contrib/hbqt/QTableWidget.cpp index df069c80d2..7eb3e580f5 100644 --- a/harbour/contrib/hbqt/QTableWidget.cpp +++ b/harbour/contrib/hbqt/QTableWidget.cpp @@ -99,7 +99,7 @@ HB_FUNC( QT_QTABLEWIDGET ) */ HB_FUNC( QT_QTABLEWIDGET_DESTROY ) { - hbqt_par_QTableWidget( 1 )->~QTableWidget(); + delete hbqt_par_QTableWidget( 1 ); } /* diff --git a/harbour/contrib/hbqt/QTableWidgetItem.cpp b/harbour/contrib/hbqt/QTableWidgetItem.cpp index 41c4780d44..02f03e2f7c 100644 --- a/harbour/contrib/hbqt/QTableWidgetItem.cpp +++ b/harbour/contrib/hbqt/QTableWidgetItem.cpp @@ -103,7 +103,7 @@ HB_FUNC( QT_QTABLEWIDGETITEM ) */ HB_FUNC( QT_QTABLEWIDGETITEM_DESTROY ) { - hbqt_par_QTableWidgetItem( 1 )->~QTableWidgetItem(); + delete hbqt_par_QTableWidgetItem( 1 ); } /* diff --git a/harbour/contrib/hbqt/QTextBoundaryFinder.cpp b/harbour/contrib/hbqt/QTextBoundaryFinder.cpp index 066a7aea32..78a2a12d1b 100644 --- a/harbour/contrib/hbqt/QTextBoundaryFinder.cpp +++ b/harbour/contrib/hbqt/QTextBoundaryFinder.cpp @@ -93,7 +93,7 @@ HB_FUNC( QT_QTEXTBOUNDARYFINDER ) */ HB_FUNC( QT_QTEXTBOUNDARYFINDER_DESTROY ) { - hbqt_par_QTextBoundaryFinder( 1 )->~QTextBoundaryFinder(); + delete hbqt_par_QTextBoundaryFinder( 1 ); } /* diff --git a/harbour/contrib/hbqt/QTextCursor.cpp b/harbour/contrib/hbqt/QTextCursor.cpp index 97d7ce3378..23c975fdec 100644 --- a/harbour/contrib/hbqt/QTextCursor.cpp +++ b/harbour/contrib/hbqt/QTextCursor.cpp @@ -123,7 +123,7 @@ HB_FUNC( QT_QTEXTCURSOR ) */ HB_FUNC( QT_QTEXTCURSOR_DESTROY ) { - hbqt_par_QTextCursor( 1 )->~QTextCursor(); + delete hbqt_par_QTextCursor( 1 ); } /* diff --git a/harbour/contrib/hbqt/QTextDecoder.cpp b/harbour/contrib/hbqt/QTextDecoder.cpp index 172f6f4634..b60c649896 100644 --- a/harbour/contrib/hbqt/QTextDecoder.cpp +++ b/harbour/contrib/hbqt/QTextDecoder.cpp @@ -84,7 +84,7 @@ HB_FUNC( QT_QTEXTDECODER ) */ HB_FUNC( QT_QTEXTDECODER_DESTROY ) { - hbqt_par_QTextDecoder( 1 )->~QTextDecoder(); + delete hbqt_par_QTextDecoder( 1 ); } /* diff --git a/harbour/contrib/hbqt/QTextDocument.cpp b/harbour/contrib/hbqt/QTextDocument.cpp index 62748b0476..7fd3b0afc8 100644 --- a/harbour/contrib/hbqt/QTextDocument.cpp +++ b/harbour/contrib/hbqt/QTextDocument.cpp @@ -107,7 +107,7 @@ HB_FUNC( QT_QTEXTDOCUMENT ) */ HB_FUNC( QT_QTEXTDOCUMENT_DESTROY ) { - hbqt_par_QTextDocument( 1 )->~QTextDocument(); + delete hbqt_par_QTextDocument( 1 ); } /* diff --git a/harbour/contrib/hbqt/QTextDocumentFragment.cpp b/harbour/contrib/hbqt/QTextDocumentFragment.cpp index 665c07d73b..c6b6b14c41 100644 --- a/harbour/contrib/hbqt/QTextDocumentFragment.cpp +++ b/harbour/contrib/hbqt/QTextDocumentFragment.cpp @@ -87,7 +87,7 @@ HB_FUNC( QT_QTEXTDOCUMENTFRAGMENT ) */ HB_FUNC( QT_QTEXTDOCUMENTFRAGMENT_DESTROY ) { - hbqt_par_QTextDocumentFragment( 1 )->~QTextDocumentFragment(); + delete hbqt_par_QTextDocumentFragment( 1 ); } /* diff --git a/harbour/contrib/hbqt/QTextDocumentWriter.cpp b/harbour/contrib/hbqt/QTextDocumentWriter.cpp index d86fdc6b2b..8aea70e3e4 100644 --- a/harbour/contrib/hbqt/QTextDocumentWriter.cpp +++ b/harbour/contrib/hbqt/QTextDocumentWriter.cpp @@ -86,7 +86,7 @@ HB_FUNC( QT_QTEXTDOCUMENTWRITER ) */ HB_FUNC( QT_QTEXTDOCUMENTWRITER_DESTROY ) { - hbqt_par_QTextDocumentWriter( 1 )->~QTextDocumentWriter(); + delete hbqt_par_QTextDocumentWriter( 1 ); } /* diff --git a/harbour/contrib/hbqt/QTextEdit.cpp b/harbour/contrib/hbqt/QTextEdit.cpp index 1c59ff4349..cffe5f4654 100644 --- a/harbour/contrib/hbqt/QTextEdit.cpp +++ b/harbour/contrib/hbqt/QTextEdit.cpp @@ -105,7 +105,7 @@ HB_FUNC( QT_QTEXTEDIT ) */ HB_FUNC( QT_QTEXTEDIT_DESTROY ) { - hbqt_par_QTextEdit( 1 )->~QTextEdit(); + delete hbqt_par_QTextEdit( 1 ); } /* diff --git a/harbour/contrib/hbqt/QTextEncoder.cpp b/harbour/contrib/hbqt/QTextEncoder.cpp index dd6c9c1052..54f546f77b 100644 --- a/harbour/contrib/hbqt/QTextEncoder.cpp +++ b/harbour/contrib/hbqt/QTextEncoder.cpp @@ -84,7 +84,7 @@ HB_FUNC( QT_QTEXTENCODER ) */ HB_FUNC( QT_QTEXTENCODER_DESTROY ) { - hbqt_par_QTextEncoder( 1 )->~QTextEncoder(); + delete hbqt_par_QTextEncoder( 1 ); } /* diff --git a/harbour/contrib/hbqt/QTextFormat.cpp b/harbour/contrib/hbqt/QTextFormat.cpp index f0a0087460..ef721315d2 100644 --- a/harbour/contrib/hbqt/QTextFormat.cpp +++ b/harbour/contrib/hbqt/QTextFormat.cpp @@ -105,7 +105,7 @@ HB_FUNC( QT_QTEXTFORMAT ) */ HB_FUNC( QT_QTEXTFORMAT_DESTROY ) { - hbqt_par_QTextFormat( 1 )->~QTextFormat(); + delete hbqt_par_QTextFormat( 1 ); } /* diff --git a/harbour/contrib/hbqt/QTextFrame.cpp b/harbour/contrib/hbqt/QTextFrame.cpp index 008dcf8da6..1f7181686f 100644 --- a/harbour/contrib/hbqt/QTextFrame.cpp +++ b/harbour/contrib/hbqt/QTextFrame.cpp @@ -99,7 +99,7 @@ HB_FUNC( QT_QTEXTFRAME ) */ HB_FUNC( QT_QTEXTFRAME_DESTROY ) { - hbqt_par_QTextFrame( 1 )->~QTextFrame(); + delete hbqt_par_QTextFrame( 1 ); } /* diff --git a/harbour/contrib/hbqt/QTextLayout.cpp b/harbour/contrib/hbqt/QTextLayout.cpp index de2037b407..35d1146a25 100644 --- a/harbour/contrib/hbqt/QTextLayout.cpp +++ b/harbour/contrib/hbqt/QTextLayout.cpp @@ -101,7 +101,7 @@ HB_FUNC( QT_QTEXTLAYOUT ) */ HB_FUNC( QT_QTEXTLAYOUT_DESTROY ) { - hbqt_par_QTextLayout( 1 )->~QTextLayout(); + delete hbqt_par_QTextLayout( 1 ); } /* diff --git a/harbour/contrib/hbqt/QTextStream.cpp b/harbour/contrib/hbqt/QTextStream.cpp index 986d430aef..aeb6495d5b 100644 --- a/harbour/contrib/hbqt/QTextStream.cpp +++ b/harbour/contrib/hbqt/QTextStream.cpp @@ -105,7 +105,7 @@ HB_FUNC( QT_QTEXTSTREAM_PADCHAR ) */ HB_FUNC( QT_QTEXTSTREAM_DESTROY ) { - hbqt_par_QTextStream( 1 )->~QTextStream(); + delete hbqt_par_QTextStream( 1 ); } /* diff --git a/harbour/contrib/hbqt/QTimer.cpp b/harbour/contrib/hbqt/QTimer.cpp index bfda1d3ca8..b50eac41c0 100644 --- a/harbour/contrib/hbqt/QTimer.cpp +++ b/harbour/contrib/hbqt/QTimer.cpp @@ -84,7 +84,7 @@ HB_FUNC( QT_QTIMER ) */ HB_FUNC( QT_QTIMER_DESTROY ) { - hbqt_par_QTimer( 1 )->~QTimer(); + delete hbqt_par_QTimer( 1 ); } /* diff --git a/harbour/contrib/hbqt/QToolBar.cpp b/harbour/contrib/hbqt/QToolBar.cpp index 8ca317e451..5b53ebe1e5 100644 --- a/harbour/contrib/hbqt/QToolBar.cpp +++ b/harbour/contrib/hbqt/QToolBar.cpp @@ -88,7 +88,7 @@ HB_FUNC( QT_QTOOLBAR ) */ HB_FUNC( QT_QTOOLBAR_DESTROY ) { - hbqt_par_QToolBar( 1 )->~QToolBar(); + delete hbqt_par_QToolBar( 1 ); } /* diff --git a/harbour/contrib/hbqt/QToolBox.cpp b/harbour/contrib/hbqt/QToolBox.cpp index e835db0e7e..3221f688f5 100644 --- a/harbour/contrib/hbqt/QToolBox.cpp +++ b/harbour/contrib/hbqt/QToolBox.cpp @@ -84,7 +84,7 @@ HB_FUNC( QT_QTOOLBOX ) */ HB_FUNC( QT_QTOOLBOX_DESTROY ) { - hbqt_par_QToolBox( 1 )->~QToolBox(); + delete hbqt_par_QToolBox( 1 ); } /* diff --git a/harbour/contrib/hbqt/QToolButton.cpp b/harbour/contrib/hbqt/QToolButton.cpp index f578265269..dcedefb2e1 100644 --- a/harbour/contrib/hbqt/QToolButton.cpp +++ b/harbour/contrib/hbqt/QToolButton.cpp @@ -88,7 +88,7 @@ HB_FUNC( QT_QTOOLBUTTON ) */ HB_FUNC( QT_QTOOLBUTTON_DESTROY ) { - hbqt_par_QToolButton( 1 )->~QToolButton(); + delete hbqt_par_QToolButton( 1 ); } /* diff --git a/harbour/contrib/hbqt/QTreeView.cpp b/harbour/contrib/hbqt/QTreeView.cpp index f696725fb9..a07900adb7 100644 --- a/harbour/contrib/hbqt/QTreeView.cpp +++ b/harbour/contrib/hbqt/QTreeView.cpp @@ -96,7 +96,7 @@ HB_FUNC( QT_QTREEVIEW ) */ HB_FUNC( QT_QTREEVIEW_DESTROY ) { - hbqt_par_QTreeView( 1 )->~QTreeView(); + delete hbqt_par_QTreeView( 1 ); } /* diff --git a/harbour/contrib/hbqt/QTreeWidget.cpp b/harbour/contrib/hbqt/QTreeWidget.cpp index 6ed5690cb6..aaa53a02a9 100644 --- a/harbour/contrib/hbqt/QTreeWidget.cpp +++ b/harbour/contrib/hbqt/QTreeWidget.cpp @@ -96,7 +96,7 @@ HB_FUNC( QT_QTREEWIDGET ) */ HB_FUNC( QT_QTREEWIDGET_DESTROY ) { - hbqt_par_QTreeWidget( 1 )->~QTreeWidget(); + delete hbqt_par_QTreeWidget( 1 ); } /* diff --git a/harbour/contrib/hbqt/QTreeWidgetItem.cpp b/harbour/contrib/hbqt/QTreeWidgetItem.cpp index 2b5974997e..2104caa3b9 100644 --- a/harbour/contrib/hbqt/QTreeWidgetItem.cpp +++ b/harbour/contrib/hbqt/QTreeWidgetItem.cpp @@ -115,7 +115,7 @@ HB_FUNC( QT_QTREEWIDGETITEM ) */ HB_FUNC( QT_QTREEWIDGETITEM_DESTROY ) { - hbqt_par_QTreeWidgetItem( 1 )->~QTreeWidgetItem(); + delete hbqt_par_QTreeWidgetItem( 1 ); } /* diff --git a/harbour/contrib/hbqt/QUrl.cpp b/harbour/contrib/hbqt/QUrl.cpp index 16f710c964..8fb6af0616 100644 --- a/harbour/contrib/hbqt/QUrl.cpp +++ b/harbour/contrib/hbqt/QUrl.cpp @@ -118,7 +118,7 @@ HB_FUNC( QT_QURL_SETQUERYDELIMITERS ) */ HB_FUNC( QT_QURL_DESTROY ) { - hbqt_par_QUrl( 1 )->~QUrl(); + delete hbqt_par_QUrl( 1 ); } /* diff --git a/harbour/contrib/hbqt/QVBoxLayout.cpp b/harbour/contrib/hbqt/QVBoxLayout.cpp index 7ce1a8f99a..25cf9e4552 100644 --- a/harbour/contrib/hbqt/QVBoxLayout.cpp +++ b/harbour/contrib/hbqt/QVBoxLayout.cpp @@ -85,7 +85,7 @@ HB_FUNC( QT_QVBOXLAYOUT ) */ HB_FUNC( QT_QVBOXLAYOUT_DESTROY ) { - hbqt_par_QVBoxLayout( 1 )->~QVBoxLayout(); + delete hbqt_par_QVBoxLayout( 1 ); } diff --git a/harbour/contrib/hbqt/QVariant.cpp b/harbour/contrib/hbqt/QVariant.cpp index 567e2bbaad..37d64e7d95 100644 --- a/harbour/contrib/hbqt/QVariant.cpp +++ b/harbour/contrib/hbqt/QVariant.cpp @@ -147,7 +147,7 @@ HB_FUNC( QT_QVARIANT ) */ HB_FUNC( QT_QVARIANT_DESTROY ) { - hbqt_par_QVariant( 1 )->~QVariant(); + delete hbqt_par_QVariant( 1 ); } /* diff --git a/harbour/contrib/hbqt/QWebHistoryInterface.cpp b/harbour/contrib/hbqt/QWebHistoryInterface.cpp index df59ffc75f..bf964402d0 100644 --- a/harbour/contrib/hbqt/QWebHistoryInterface.cpp +++ b/harbour/contrib/hbqt/QWebHistoryInterface.cpp @@ -84,7 +84,7 @@ HB_FUNC( QT_QWEBHISTORYINTERFACE ) */ HB_FUNC( QT_QWEBHISTORYINTERFACE_DESTROY ) { - hbqt_par_QWebHistoryInterface( 1 )->~QWebHistoryInterface(); + delete hbqt_par_QWebHistoryInterface( 1 ); } /* diff --git a/harbour/contrib/hbqt/QWebHistoryItem.cpp b/harbour/contrib/hbqt/QWebHistoryItem.cpp index b86ea39568..d86aeee0f4 100644 --- a/harbour/contrib/hbqt/QWebHistoryItem.cpp +++ b/harbour/contrib/hbqt/QWebHistoryItem.cpp @@ -86,7 +86,7 @@ HB_FUNC( QT_QWEBHISTORYITEM ) */ HB_FUNC( QT_QWEBHISTORYITEM_DESTROY ) { - hbqt_par_QWebHistoryItem( 1 )->~QWebHistoryItem(); + delete hbqt_par_QWebHistoryItem( 1 ); } /* diff --git a/harbour/contrib/hbqt/QWebHitTestResult.cpp b/harbour/contrib/hbqt/QWebHitTestResult.cpp index eb06367c72..c3960e3117 100644 --- a/harbour/contrib/hbqt/QWebHitTestResult.cpp +++ b/harbour/contrib/hbqt/QWebHitTestResult.cpp @@ -85,7 +85,7 @@ HB_FUNC( QT_QWEBHITTESTRESULT ) */ HB_FUNC( QT_QWEBHITTESTRESULT_DESTROY ) { - hbqt_par_QWebHitTestResult( 1 )->~QWebHitTestResult(); + delete hbqt_par_QWebHitTestResult( 1 ); } /* diff --git a/harbour/contrib/hbqt/QWebPage.cpp b/harbour/contrib/hbqt/QWebPage.cpp index 83d07b1764..250eb33606 100644 --- a/harbour/contrib/hbqt/QWebPage.cpp +++ b/harbour/contrib/hbqt/QWebPage.cpp @@ -95,7 +95,7 @@ HB_FUNC( QT_QWEBPAGE ) */ HB_FUNC( QT_QWEBPAGE_DESTROY ) { - hbqt_par_QWebPage( 1 )->~QWebPage(); + delete hbqt_par_QWebPage( 1 ); } /* diff --git a/harbour/contrib/hbqt/QWebPluginFactory.cpp b/harbour/contrib/hbqt/QWebPluginFactory.cpp index 01e70fcc7c..2041871da7 100644 --- a/harbour/contrib/hbqt/QWebPluginFactory.cpp +++ b/harbour/contrib/hbqt/QWebPluginFactory.cpp @@ -102,7 +102,7 @@ HB_FUNC( QT_QWEBPLUGINFACTORY ) */ HB_FUNC( QT_QWEBPLUGINFACTORY_DESTROY ) { - hbqt_par_QWebPluginFactory( 1 )->~QWebPluginFactory(); + delete hbqt_par_QWebPluginFactory( 1 ); } /* diff --git a/harbour/contrib/hbqt/QWebSecurityOrigin.cpp b/harbour/contrib/hbqt/QWebSecurityOrigin.cpp index b0796bc935..5af82a940b 100644 --- a/harbour/contrib/hbqt/QWebSecurityOrigin.cpp +++ b/harbour/contrib/hbqt/QWebSecurityOrigin.cpp @@ -94,7 +94,7 @@ HB_FUNC( QT_QWEBSECURITYORIGIN ) */ HB_FUNC( QT_QWEBSECURITYORIGIN_DESTROY ) { - hbqt_par_QWebSecurityOrigin( 1 )->~QWebSecurityOrigin(); + delete hbqt_par_QWebSecurityOrigin( 1 ); } /* diff --git a/harbour/contrib/hbqt/QWebView.cpp b/harbour/contrib/hbqt/QWebView.cpp index 760dfe37a0..81df99d026 100644 --- a/harbour/contrib/hbqt/QWebView.cpp +++ b/harbour/contrib/hbqt/QWebView.cpp @@ -85,7 +85,7 @@ HB_FUNC( QT_QWEBVIEW ) */ HB_FUNC( QT_QWEBVIEW_DESTROY ) { - hbqt_par_QWebView( 1 )->~QWebView(); + delete hbqt_par_QWebView( 1 ); } /* diff --git a/harbour/contrib/hbqt/QWidget.cpp b/harbour/contrib/hbqt/QWidget.cpp index 23c9a57ba5..e731f5b18f 100644 --- a/harbour/contrib/hbqt/QWidget.cpp +++ b/harbour/contrib/hbqt/QWidget.cpp @@ -119,7 +119,7 @@ HB_FUNC( QT_QWIDGET ) */ HB_FUNC( QT_QWIDGET_DESTROY ) { - hbqt_par_QWidget( 1 )->~QWidget(); + delete hbqt_par_QWidget( 1 ); } /* diff --git a/harbour/contrib/hbqt/QWidgetAction.cpp b/harbour/contrib/hbqt/QWidgetAction.cpp index 6d7e6e72dc..bbc6a9c4cc 100644 --- a/harbour/contrib/hbqt/QWidgetAction.cpp +++ b/harbour/contrib/hbqt/QWidgetAction.cpp @@ -84,7 +84,7 @@ HB_FUNC( QT_QWIDGETACTION ) */ HB_FUNC( QT_QWIDGETACTION_DESTROY ) { - hbqt_par_QWidgetAction( 1 )->~QWidgetAction(); + delete hbqt_par_QWidgetAction( 1 ); } /* diff --git a/harbour/contrib/hbqt/QWindowsStyle.cpp b/harbour/contrib/hbqt/QWindowsStyle.cpp index 55c5702c73..e3faa500d9 100644 --- a/harbour/contrib/hbqt/QWindowsStyle.cpp +++ b/harbour/contrib/hbqt/QWindowsStyle.cpp @@ -85,7 +85,7 @@ HB_FUNC( QT_QWINDOWSSTYLE ) */ HB_FUNC( QT_QWINDOWSSTYLE_DESTROY ) { - hbqt_par_QWindowsStyle( 1 )->~QWindowsStyle(); + delete hbqt_par_QWindowsStyle( 1 ); } diff --git a/harbour/contrib/hbqt/QWindowsXPStyle.cpp b/harbour/contrib/hbqt/QWindowsXPStyle.cpp index 01f0e92d15..c6ea1bde81 100644 --- a/harbour/contrib/hbqt/QWindowsXPStyle.cpp +++ b/harbour/contrib/hbqt/QWindowsXPStyle.cpp @@ -89,7 +89,7 @@ HB_FUNC( QT_QWINDOWSXPSTYLE ) */ HB_FUNC( QT_QWINDOWSXPSTYLE_DESTROY ) { - hbqt_par_QWindowsXPStyle( 1 )->~QWindowsXPStyle(); + delete hbqt_par_QWindowsXPStyle( 1 ); } diff --git a/harbour/contrib/hbqt/QWizard.cpp b/harbour/contrib/hbqt/QWizard.cpp index f642392e33..0f7911d243 100644 --- a/harbour/contrib/hbqt/QWizard.cpp +++ b/harbour/contrib/hbqt/QWizard.cpp @@ -104,7 +104,7 @@ HB_FUNC( QT_QWIZARD ) */ HB_FUNC( QT_QWIZARD_DESTROY ) { - hbqt_par_QWizard( 1 )->~QWizard(); + delete hbqt_par_QWizard( 1 ); } /* diff --git a/harbour/contrib/hbqt/TQAbstractItemModel.prg b/harbour/contrib/hbqt/TQAbstractItemModel.prg index d25d531629..eba4353b89 100644 --- a/harbour/contrib/hbqt/TQAbstractItemModel.prg +++ b/harbour/contrib/hbqt/TQAbstractItemModel.prg @@ -138,6 +138,7 @@ CREATE CLASS HbDbfModel INHERIT QAbstractItemModel METHOD New( bBlock ) INLINE ::pPtr := Qt_HbDbfModel( bBlock ), Self METHOD Reset() INLINE Qt_HbDbfModel_reset( ::pPtr ) METHOD Index( nRow, nCol ) INLINE Qt_HbDbfModel_index( ::pPtr, nRow, nCol, 0 ) + METHOD hbSetRowColumns( nRows, nCols ) INLINE Qt_HbDbfModel_hbSetRowColumns( ::pPtr, nRows, nCols ) ENDCLASS diff --git a/harbour/contrib/hbqt/generator/hbqtgen.prg b/harbour/contrib/hbqt/generator/hbqtgen.prg index 144ab6e6eb..08de6ef396 100644 --- a/harbour/contrib/hbqt/generator/hbqtgen.prg +++ b/harbour/contrib/hbqt/generator/hbqtgen.prg @@ -475,7 +475,8 @@ STATIC FUNCTION GenSource( cProFile, cPathIn, cPathOut, cPathDoc ) aadd( cpp_, 'HB_FUNC( QT_' + upper( cWidget ) + '_DESTROY )' ) aadd( cpp_, '{ ' ) IF ( '~'+cWidget $ cQth ) - aadd( cpp_, ' hbqt_par_' + cWidget + '( 1 )->~' + cWidget + '();' ) + aadd( cpp_, ' delete hbqt_par_' + cWidget + '( 1 );' ) + //aadd( cpp_, ' hbqt_par_' + cWidget + '( 1 )->~' + cWidget + '();' ) ELSE aadd( cpp_, ' ' ) ENDIF diff --git a/harbour/contrib/hbqt/hbqt.ch b/harbour/contrib/hbqt/hbqt.ch index 535c4c74c7..19d40b2c49 100644 --- a/harbour/contrib/hbqt/hbqt.ch +++ b/harbour/contrib/hbqt/hbqt.ch @@ -2112,6 +2112,15 @@ #define QSizePolicy_ShrinkFlag 4 // The widget can shrink below its size hint if necessary. #define QSizePolicy_IgnoreFlag 8 // The widget's size hint is ignored. The widget will get as much space as possible. + +// This enum controls the types of events processed by the processEvents() functions. +// +#define QEventLoop_AllEvents 0x00 // All events. Note that DeferredDelete events are processed specially. See QObject::deleteLater() for more details. +#define QEventLoop_ExcludeUserInputEvents 0x01 // Do not process user input events, such as ButtonPress and KeyPress. Note that the events are not discarded; they will be delivered the next time processEvents() is called without the ExcludeUserInputEvents flag. +#define QEventLoop_ExcludeSocketNotifiers 0x02 // Do not process socket notifier events. Note that the events are not discarded; they will be delivered the next time processEvents() is called without the ExcludeSocketNotifiers flag. +#define QEventLoop_WaitForMoreEvents 0x04 // Wait for events if no pending events are available. +#define QEventLoop_DeferredDeletion 0x10 // deprecated - do not use. +// The ProcessEventsFlags type is a typedef for QFlags. It stores an OR combination of ProcessEventsFlag values. /*----------------------------------------------------------------------*/ #define _HBQT_CH diff --git a/harbour/contrib/hbqt/hbqt.h b/harbour/contrib/hbqt/hbqt.h index d12e8462b1..9d4a4d1bf7 100644 --- a/harbour/contrib/hbqt/hbqt.h +++ b/harbour/contrib/hbqt/hbqt.h @@ -63,10 +63,12 @@ #define hbqt_par_HbDbfModel( n ) ( ( HbDbfModel* ) hb_parptr( n ) ) #define hbqt_par_HbTableView( n ) ( ( HbTableView* ) hb_parptr( n ) ) +#define hbqt_par_MyMainWindow( n ) ( ( MyMainWindow* ) hb_parptr( n ) ) #define hbqt_par_ExtensionOption( n ) ( ( ExtensionOption* ) hb_parptr( n ) ) #define hbqt_par_IUnknown( n ) ( ( IUnknown* ) hb_parptr( n ) ) #define hbqt_par_QAbstractButton( n ) ( ( QAbstractButton* ) hb_parptr( n ) ) +#define hbqt_par_QAbstractEventDispatcher( n ) ( ( QAbstractEventDispatcher* ) hb_parptr( n ) ) #define hbqt_par_QAbstractItemDelegate( n ) ( ( QAbstractItemDelegate* ) hb_parptr( n ) ) #define hbqt_par_QAbstractItemModel( n ) ( ( QAbstractItemModel* ) hb_parptr( n ) ) #define hbqt_par_QAbstractItemView( n ) ( ( QAbstractItemView* ) hb_parptr( n ) ) diff --git a/harbour/contrib/hbqt/hbqt_slots.cpp b/harbour/contrib/hbqt/hbqt_slots.cpp index e58da19b1e..bab5771494 100644 --- a/harbour/contrib/hbqt/hbqt_slots.cpp +++ b/harbour/contrib/hbqt/hbqt_slots.cpp @@ -57,6 +57,7 @@ #include "hbvm.h" #include "hbapiitm.h" #include "hbstack.h" +#include "hbthread.h" #include "hbqt.h" @@ -74,6 +75,8 @@ #include #include +static PHB_ITEM s_mutex = NULL; + /*----------------------------------------------------------------------*/ typedef struct @@ -97,33 +100,29 @@ static HB_TSD_NEW( s_slots, sizeof( HB_SLOTS ), NULL, NULL ); #define hb_getQtEventSlots() ( ( PHB_SLOTS ) hb_stackGetTSD( &s_slots ) ) /*----------------------------------------------------------------------*/ -#if 0 -void qt_setEventFilter( Events * event ) -{ - hb_getQtEventFilter()->events = event; -} -#endif -Events * qt_getEventFilter( void ) + +void qt_setEventFilter() { Events * s_e = hb_getQtEventFilter()->events; if( !s_e ) hb_getQtEventFilter()->events = new Events(); +} +Events * qt_getEventFilter( void ) +{ return hb_getQtEventFilter()->events; } -#if 0 -void qt_setEventSlots( Slots * slot ) -{ - hb_getQtEventSlots()->slot = slot; -} -#endif -Slots * qt_getEventSlots( void ) + +void qt_setEventSlots() { Slots * s_s = hb_getQtEventSlots()->slot; if( !s_s ) hb_getQtEventSlots()->slot = new Slots(); +} +Slots * qt_getEventSlots( void ) +{ return hb_getQtEventSlots()->slot; } @@ -142,10 +141,10 @@ static void SlotsExec( QObject* object, char* event ) { Slots * s_s = qt_getEventSlots(); int i = object->property( event ).toInt(); - if( ( i > 0 ) && ( s_s->listActv.at( i - 1 ) == true ) && hb_vmRequestReenter() ) + if( i > 0 && i <= s_s->listBlock.size() && hb_vmRequestReenter() ) { - PHB_ITEM pObject = hb_itemPutPtr( NULL, ( QObject* ) object ); - hb_vmEvalBlockV( ( PHB_ITEM ) s_s->listBlock.at( i - 1 ), 1, pObject ); + PHB_ITEM pObject = hb_itemPutPtr( NULL, object ); + hb_vmEvalBlockV( s_s->listBlock.at( i - 1 ), 1, pObject ); hb_itemRelease( pObject ); } } @@ -157,11 +156,11 @@ static void SlotsExecBool( QObject* object, char* event, bool bBool ) { Slots * s_s = qt_getEventSlots(); int i = object->property( event ).toInt(); - if( ( i > 0 ) && ( s_s->listActv.at( i - 1 ) == true ) && hb_vmRequestReenter() ) + if( i > 0 && i <= s_s->listBlock.size() && hb_vmRequestReenter() ) { PHB_ITEM pObject = hb_itemPutPtr( NULL, object ); PHB_ITEM pBool = hb_itemPutL( NULL, bBool ); - hb_vmEvalBlockV( ( PHB_ITEM ) s_s->listBlock.at( i - 1 ), 2, pObject, pBool ); + hb_vmEvalBlockV( s_s->listBlock.at( i - 1 ), 2, pObject, pBool ); hb_itemRelease( pObject ); hb_itemRelease( pBool ); } @@ -174,11 +173,11 @@ static void SlotsExecInt( QObject* object, char* event, int iValue ) { Slots * s_s = qt_getEventSlots(); int i = object->property( event ).toInt(); - if( ( i > 0 ) && ( s_s->listActv.at( i - 1 ) == true ) && hb_vmRequestReenter() ) + if( i > 0 && i <= s_s->listBlock.size() && hb_vmRequestReenter() ) { - PHB_ITEM pObject = hb_itemPutPtr( NULL, ( QObject* ) object ); + PHB_ITEM pObject = hb_itemPutPtr( NULL, object ); PHB_ITEM pState = hb_itemPutNI( NULL, iValue ); - hb_vmEvalBlockV( ( PHB_ITEM ) s_s->listBlock.at( i - 1 ), 2, pObject, pState ); + hb_vmEvalBlockV( s_s->listBlock.at( i - 1 ), 2, pObject, pState ); hb_itemRelease( pObject ); hb_itemRelease( pState ); } @@ -191,12 +190,12 @@ static void SlotsExecIntInt( QObject* object, char* event, int iValue1, int iVal { Slots * s_s = qt_getEventSlots(); int i = object->property( event ).toInt(); - if( i > 0 && ( s_s->listActv.at( i - 1 ) == true ) && hb_vmRequestReenter() ) + if( i > 0 && i <= s_s->listBlock.size() && hb_vmRequestReenter() ) { - PHB_ITEM pObject = hb_itemPutPtr( NULL, ( QObject* ) object ); + PHB_ITEM pObject = hb_itemPutPtr( NULL, object ); PHB_ITEM pValue1 = hb_itemPutNI( NULL, iValue1 ); PHB_ITEM pValue2 = hb_itemPutNI( NULL, iValue2 ); - hb_vmEvalBlockV( ( PHB_ITEM ) s_s->listBlock.at( i - 1 ), 3, pObject, pValue1, pValue2 ); + hb_vmEvalBlockV( s_s->listBlock.at( i - 1 ), 3, pObject, pValue1, pValue2 ); hb_itemRelease( pObject ); hb_itemRelease( pValue1 ); hb_itemRelease( pValue2 ); @@ -210,13 +209,13 @@ static void SlotsExecIntIntInt( QObject* object, char* event, int iValue1, int i { Slots * s_s = qt_getEventSlots(); int i = object->property( event ).toInt(); - if( i > 0 && ( s_s->listActv.at( i - 1 ) == true ) && hb_vmRequestReenter() ) + if( i > 0 && i <= s_s->listBlock.size() && hb_vmRequestReenter() ) { - PHB_ITEM pObject = hb_itemPutPtr( NULL, ( QObject* ) object ); + PHB_ITEM pObject = hb_itemPutPtr( NULL, object ); PHB_ITEM pValue1 = hb_itemPutNI( NULL, iValue1 ); PHB_ITEM pValue2 = hb_itemPutNI( NULL, iValue2 ); PHB_ITEM pValue3 = hb_itemPutNI( NULL, iValue3 ); - hb_vmEvalBlockV( ( PHB_ITEM ) s_s->listBlock.at( i - 1 ), 4, pObject, pValue1, pValue2, pValue3 ); + hb_vmEvalBlockV( s_s->listBlock.at( i - 1 ), 4, pObject, pValue1, pValue2, pValue3 ); hb_itemRelease( pObject ); hb_itemRelease( pValue1 ); hb_itemRelease( pValue2 ); @@ -231,14 +230,14 @@ static void SlotsExecIntIntIntInt( QObject* object, char* event, int iValue1, in { Slots * s_s = qt_getEventSlots(); int i = object->property( event ).toInt(); - if( i > 0 && ( s_s->listActv.at( i - 1 ) == true ) && hb_vmRequestReenter() ) + if( i > 0 && i <= s_s->listBlock.size() && hb_vmRequestReenter() ) { - PHB_ITEM pObject = hb_itemPutPtr( NULL, ( QObject* ) object ); + PHB_ITEM pObject = hb_itemPutPtr( NULL, object ); PHB_ITEM pValue1 = hb_itemPutNI( NULL, iValue1 ); PHB_ITEM pValue2 = hb_itemPutNI( NULL, iValue2 ); PHB_ITEM pValue3 = hb_itemPutNI( NULL, iValue3 ); PHB_ITEM pValue4 = hb_itemPutNI( NULL, iValue4 ); - hb_vmEvalBlockV( ( PHB_ITEM ) s_s->listBlock.at( i - 1 ), 5, pObject, pValue1, pValue2, pValue3, pValue4 ); + hb_vmEvalBlockV( s_s->listBlock.at( i - 1 ), 5, pObject, pValue1, pValue2, pValue3, pValue4 ); hb_itemRelease( pObject ); hb_itemRelease( pValue1 ); hb_itemRelease( pValue2 ); @@ -254,16 +253,17 @@ static void SlotsExecIntIntRect( QObject* object, char* event, int iValue1, int { Slots * s_s = qt_getEventSlots(); int i = object->property( event ).toInt(); - if( i > 0 && ( s_s->listActv.at( i - 1 ) == true ) && hb_vmRequestReenter() ) + if( i > 0 && i <= s_s->listBlock.size() && hb_vmRequestReenter() ) { - PHB_ITEM pObject = hb_itemPutPtr( NULL, ( QObject* ) object ); + PHB_ITEM pObject = hb_itemPutPtr( NULL, object ); PHB_ITEM pValue1 = hb_itemPutNI( NULL, iValue1 ); PHB_ITEM pValue2 = hb_itemPutNI( NULL, iValue2 ); PHB_ITEM pValue3 = hb_itemPutPtr( NULL, new QRect( rect ) ); - hb_vmEvalBlockV( ( PHB_ITEM ) s_s->listBlock.at( i - 1 ), 4, pObject, pValue1, pValue2, pValue3 ); + hb_vmEvalBlockV( s_s->listBlock.at( i - 1 ), 4, pObject, pValue1, pValue2, pValue3 ); hb_itemRelease( pObject ); hb_itemRelease( pValue1 ); hb_itemRelease( pValue2 ); + delete ( ( QRect * ) hb_itemGetPtr( pValue3 ) ); hb_itemRelease( pValue3 ); } } @@ -275,11 +275,11 @@ static void SlotsExecString( QObject* object, char* event, const QString & strin { Slots * s_s = qt_getEventSlots(); int i = object->property( event ).toInt(); - if( i > 0 && ( s_s->listActv.at( i - 1 ) == true ) && hb_vmRequestReenter() ) + if( i > 0 && i <= s_s->listBlock.size() && hb_vmRequestReenter() ) { - PHB_ITEM pObject = hb_itemPutPtr( NULL, ( QObject* ) object ); - PHB_ITEM pString = hb_itemPutC( NULL, string.toLatin1().data() ); - hb_vmEvalBlockV( ( PHB_ITEM ) s_s->listBlock.at( i - 1 ), 2, pObject, pString ); + PHB_ITEM pObject = hb_itemPutPtr( NULL, object ); + PHB_ITEM pString = hb_itemPutC( NULL, string.toAscii().data() ); + hb_vmEvalBlockV( s_s->listBlock.at( i - 1 ), 2, pObject, pString ); hb_itemRelease( pObject ); hb_itemRelease( pString ); } @@ -292,12 +292,12 @@ static void SlotsExecString2( QObject* object, char* event, const QString & s1, { Slots * s_s = qt_getEventSlots(); int i = object->property( event ).toInt(); - if( i > 0 && ( s_s->listActv.at( i - 1 ) == true ) && hb_vmRequestReenter() ) + if( i > 0 && i <= s_s->listBlock.size() && hb_vmRequestReenter() ) { - PHB_ITEM pObject = hb_itemPutPtr( NULL, ( QObject* ) object ); - PHB_ITEM pS1 = hb_itemPutC( NULL, s1.toLatin1().data() ); - PHB_ITEM pS2 = hb_itemPutC( NULL, s2.toLatin1().data() ); - hb_vmEvalBlockV( ( PHB_ITEM ) s_s->listBlock.at( i - 1 ), 3, pObject, pS1, pS2 ); + PHB_ITEM pObject = hb_itemPutPtr( NULL, object ); + PHB_ITEM pS1 = hb_itemPutC( NULL, s1.toAscii().data() ); + PHB_ITEM pS2 = hb_itemPutC( NULL, s2.toAscii().data() ); + hb_vmEvalBlockV( s_s->listBlock.at( i - 1 ), 3, pObject, pS1, pS2 ); hb_itemRelease( pObject ); hb_itemRelease( pS1 ); hb_itemRelease( pS2 ); @@ -311,13 +311,13 @@ static void SlotsExecString3( QObject* object, char* event, const QString & s1, { Slots * s_s = qt_getEventSlots(); int i = object->property( event ).toInt(); - if( i > 0 && ( s_s->listActv.at( i - 1 ) == true ) && hb_vmRequestReenter() ) + if( i > 0 && i <= s_s->listBlock.size() && hb_vmRequestReenter() ) { - PHB_ITEM pObject = hb_itemPutPtr( NULL, ( QObject* ) object ); - PHB_ITEM pS1 = hb_itemPutC( NULL, s1.toLatin1().data() ); - PHB_ITEM pS2 = hb_itemPutC( NULL, s2.toLatin1().data() ); - PHB_ITEM pS3 = hb_itemPutC( NULL, s3.toLatin1().data() ); - hb_vmEvalBlockV( ( PHB_ITEM ) s_s->listBlock.at( i - 1 ), 4, pObject, pS1, pS2, pS3 ); + PHB_ITEM pObject = hb_itemPutPtr( NULL, object ); + PHB_ITEM pS1 = hb_itemPutC( NULL, s1.toAscii().data() ); + PHB_ITEM pS2 = hb_itemPutC( NULL, s2.toAscii().data() ); + PHB_ITEM pS3 = hb_itemPutC( NULL, s3.toAscii().data() ); + hb_vmEvalBlockV( s_s->listBlock.at( i - 1 ), 4, pObject, pS1, pS2, pS3 ); hb_itemRelease( pObject ); hb_itemRelease( pS1 ); hb_itemRelease( pS2 ); @@ -332,12 +332,13 @@ static void SlotsExecModel( QObject* object, char* event, const QModelIndex & in { Slots * s_s = qt_getEventSlots(); int i = object->property( event ).toInt(); - if( ( i > 0 ) && ( s_s->listActv.at( i - 1 ) == true ) && hb_vmRequestReenter() ) + if( i > 0 && i <= s_s->listBlock.size() && hb_vmRequestReenter() ) { - PHB_ITEM pObject = hb_itemPutPtr( NULL, ( QObject* ) object ); + PHB_ITEM pObject = hb_itemPutPtr( NULL, object ); PHB_ITEM pState = hb_itemPutPtr( NULL, ( QModelIndex * ) new QModelIndex( index ) ); - hb_vmEvalBlockV( ( PHB_ITEM ) s_s->listBlock.at( i - 1 ), 2, pObject, pState ); + hb_vmEvalBlockV( s_s->listBlock.at( i - 1 ), 2, pObject, pState ); hb_itemRelease( pObject ); + delete ( ( QModelIndex * ) hb_itemGetPtr( pState ) ); hb_itemRelease( pState ); } } @@ -349,12 +350,13 @@ static void SlotsExecRect( QObject* object, char* event, const QRect & rect ) { Slots * s_s = qt_getEventSlots(); int i = object->property( event ).toInt(); - if( ( i > 0 ) && ( s_s->listActv.at( i - 1 ) == true ) && hb_vmRequestReenter() ) + if( i > 0 && i <= s_s->listBlock.size() && hb_vmRequestReenter() ) { - PHB_ITEM pObject = hb_itemPutPtr( NULL, ( QObject* ) object ); + PHB_ITEM pObject = hb_itemPutPtr( NULL, object ); PHB_ITEM p1 = hb_itemPutPtr( NULL, new QRect( rect ) ); - hb_vmEvalBlockV( ( PHB_ITEM ) s_s->listBlock.at( i - 1 ), 2, pObject, p1 ); + hb_vmEvalBlockV( s_s->listBlock.at( i - 1 ), 2, pObject, p1 ); hb_itemRelease( pObject ); + delete ( ( QRect * ) hb_itemGetPtr( p1 ) ); hb_itemRelease( p1 ); } } @@ -366,12 +368,13 @@ static void SlotsExecUrl( QObject* object, char* event, const QUrl & url ) { Slots * s_s = qt_getEventSlots(); int i = object->property( event ).toInt(); - if( ( i > 0 ) && ( s_s->listActv.at( i - 1 ) == true ) && hb_vmRequestReenter() ) + if( i > 0 && i <= s_s->listBlock.size() && hb_vmRequestReenter() ) { - PHB_ITEM pObject = hb_itemPutPtr( NULL, ( QObject* ) object ); + PHB_ITEM pObject = hb_itemPutPtr( NULL, object ); PHB_ITEM p1 = hb_itemPutPtr( NULL, new QUrl( url ) ); - hb_vmEvalBlockV( ( PHB_ITEM ) s_s->listBlock.at( i - 1 ), 2, pObject, p1 ); + hb_vmEvalBlockV( s_s->listBlock.at( i - 1 ), 2, pObject, p1 ); hb_itemRelease( pObject ); + delete ( ( QUrl * ) hb_itemGetPtr( p1 ) ); hb_itemRelease( p1 ); } } @@ -383,12 +386,13 @@ static void SlotsExecTextCharFormat( QObject* object, char* event, const QTextCh { Slots * s_s = qt_getEventSlots(); int i = object->property( event ).toInt(); - if( ( i > 0 ) && ( s_s->listActv.at( i - 1 ) == true ) && hb_vmRequestReenter() ) + if( i > 0 && i <= s_s->listBlock.size() && hb_vmRequestReenter() ) { - PHB_ITEM pObject = hb_itemPutPtr( NULL, ( QObject* ) object ); + PHB_ITEM pObject = hb_itemPutPtr( NULL, object ); PHB_ITEM p1 = hb_itemPutPtr( NULL, new QTextCharFormat( f ) ); - hb_vmEvalBlockV( ( PHB_ITEM ) s_s->listBlock.at( i - 1 ), 2, pObject, p1 ); + hb_vmEvalBlockV( s_s->listBlock.at( i - 1 ), 2, pObject, p1 ); hb_itemRelease( pObject ); + delete ( ( QTextCharFormat * ) hb_itemGetPtr( p1 ) ); hb_itemRelease( p1 ); } } @@ -400,12 +404,13 @@ static void SlotsExecFont( QObject* object, char* event, const QFont & font ) { Slots * s_s = qt_getEventSlots(); int i = object->property( event ).toInt(); - if( ( i > 0 ) && ( s_s->listActv.at( i - 1 ) == true ) && hb_vmRequestReenter() ) + if( i > 0 && i <= s_s->listBlock.size() && hb_vmRequestReenter() ) { - PHB_ITEM pObject = hb_itemPutPtr( NULL, ( QObject* ) object ); + PHB_ITEM pObject = hb_itemPutPtr( NULL, object ); PHB_ITEM p1 = hb_itemPutPtr( NULL, new QFont( font ) ); - hb_vmEvalBlockV( ( PHB_ITEM ) s_s->listBlock.at( i - 1 ), 2, pObject, p1 ); + hb_vmEvalBlockV( s_s->listBlock.at( i - 1 ), 2, pObject, p1 ); hb_itemRelease( pObject ); + delete ( ( QFont * ) hb_itemGetPtr( p1 ) ); hb_itemRelease( p1 ); } } @@ -417,12 +422,13 @@ static void SlotsExecStringList( QObject* object, char* event, const QStringList { Slots * s_s = qt_getEventSlots(); int i = object->property( event ).toInt(); - if( ( i > 0 ) && ( s_s->listActv.at( i - 1 ) == true ) && hb_vmRequestReenter() ) + if( i > 0 && i <= s_s->listBlock.size() && hb_vmRequestReenter() ) { - PHB_ITEM pObject = hb_itemPutPtr( NULL, ( QObject* ) object ); + PHB_ITEM pObject = hb_itemPutPtr( NULL, object ); PHB_ITEM p1 = hb_itemPutPtr( NULL, new QStringList( stringList ) ); - hb_vmEvalBlockV( ( PHB_ITEM ) s_s->listBlock.at( i - 1 ), 2, pObject, p1 ); + hb_vmEvalBlockV( s_s->listBlock.at( i - 1 ), 2, pObject, p1 ); hb_itemRelease( pObject ); + delete ( ( QStringList * ) hb_itemGetPtr( p1 ) ); hb_itemRelease( p1 ); } } @@ -434,12 +440,13 @@ static void SlotsExecNetworkRequest( QObject* object, char* event, const QNetwor { Slots * s_s = qt_getEventSlots(); int i = object->property( event ).toInt(); - if( ( i > 0 ) && ( s_s->listActv.at( i - 1 ) == true ) && hb_vmRequestReenter() ) + if( i > 0 && i <= s_s->listBlock.size() && hb_vmRequestReenter() ) { - PHB_ITEM pObject = hb_itemPutPtr( NULL, ( QObject* ) object ); + PHB_ITEM pObject = hb_itemPutPtr( NULL, object ); PHB_ITEM p1 = hb_itemPutPtr( NULL, ( QNetworkRequest* ) new QNetworkRequest( request ) ); - hb_vmEvalBlockV( ( PHB_ITEM ) s_s->listBlock.at( i - 1 ), 2, pObject, p1 ); + hb_vmEvalBlockV( s_s->listBlock.at( i - 1 ), 2, pObject, p1 ); hb_itemRelease( pObject ); + delete ( ( QNetworkRequest * ) hb_itemGetPtr( p1 ) ); hb_itemRelease( p1 ); } } @@ -451,11 +458,11 @@ static void SlotsExecPointer( QObject* object, char* event, void * p1 ) { Slots * s_s = qt_getEventSlots(); int i = object->property( event ).toInt(); - if( ( i > 0 ) && ( s_s->listActv.at( i - 1 ) == true ) && hb_vmRequestReenter() ) + if( i > 0 && i <= s_s->listBlock.size() && hb_vmRequestReenter() ) { PHB_ITEM pObject = hb_itemPutPtr( NULL, object ); PHB_ITEM pP1 = hb_itemPutPtr( NULL, p1 ); - hb_vmEvalBlockV( ( PHB_ITEM ) s_s->listBlock.at( i - 1 ), 2, pObject, pP1 ); + hb_vmEvalBlockV( s_s->listBlock.at( i - 1 ), 2, pObject, pP1 ); hb_itemRelease( pObject ); hb_itemRelease( pP1 ); } @@ -468,12 +475,12 @@ static void SlotsExecPointerString( QObject* object, char* event, void * p1, QSt { Slots * s_s = qt_getEventSlots(); int i = object->property( event ).toInt(); - if( ( i > 0 ) && ( s_s->listActv.at( i - 1 ) == true ) && hb_vmRequestReenter() ) + if( i > 0 && i <= s_s->listBlock.size() && hb_vmRequestReenter() ) { PHB_ITEM pObject = hb_itemPutPtr( NULL, object ); PHB_ITEM pP1 = hb_itemPutPtr( NULL, p1 ); - PHB_ITEM pS1 = hb_itemPutC( NULL, s1.toLatin1().data() ); - hb_vmEvalBlockV( ( PHB_ITEM ) s_s->listBlock.at( i - 1 ), 3, pObject, pP1, pS1 ); + PHB_ITEM pS1 = hb_itemPutC( NULL, s1.toAscii().data() ); + hb_vmEvalBlockV( s_s->listBlock.at( i - 1 ), 3, pObject, pP1, pS1 ); hb_itemRelease( pObject ); hb_itemRelease( pP1 ); hb_itemRelease( pS1 ); @@ -487,12 +494,12 @@ static void SlotsExecPointerInt( QObject* object, char* event, void * p1, int iI { Slots * s_s = qt_getEventSlots(); int i = object->property( event ).toInt(); - if( ( i > 0 ) && ( s_s->listActv.at( i - 1 ) == true ) && hb_vmRequestReenter() ) + if( i > 0 && i <= s_s->listBlock.size() && hb_vmRequestReenter() ) { PHB_ITEM pObject = hb_itemPutPtr( NULL, object ); PHB_ITEM pP1 = hb_itemPutPtr( NULL, p1 ); PHB_ITEM pI1 = hb_itemPutNI( NULL, iInt ); - hb_vmEvalBlockV( ( PHB_ITEM ) s_s->listBlock.at( i - 1 ), 3, pObject, pP1, pI1 ); + hb_vmEvalBlockV( s_s->listBlock.at( i - 1 ), 3, pObject, pP1, pI1 ); hb_itemRelease( pObject ); hb_itemRelease( pP1 ); hb_itemRelease( pI1 ); @@ -506,12 +513,12 @@ static void SlotsExecPointerPointer( QObject* object, char* event, void * p1, vo { Slots * s_s = qt_getEventSlots(); int i = object->property( event ).toInt(); - if( ( i > 0 ) && ( s_s->listActv.at( i - 1 ) == true ) && hb_vmRequestReenter() ) + if( i > 0 && i <= s_s->listBlock.size() && hb_vmRequestReenter() ) { PHB_ITEM pObject = hb_itemPutPtr( NULL, object ); PHB_ITEM pP1 = hb_itemPutPtr( NULL, p1 ); PHB_ITEM pP2 = hb_itemPutPtr( NULL, p2 ); - hb_vmEvalBlockV( ( PHB_ITEM ) s_s->listBlock.at( i - 1 ), 3, pP1, pP2 ); + hb_vmEvalBlockV( s_s->listBlock.at( i - 1 ), 3, pObject, pP1, pP2 ); hb_itemRelease( pObject ); hb_itemRelease( pP1 ); hb_itemRelease( pP2 ); @@ -1103,10 +1110,12 @@ void Slots::currentCellChanged( int currentRow, int currentColumn, int previousR */ HB_FUNC( QT_CONNECT_SIGNAL ) { - QObject * object = ( QObject* ) hb_parptr( 1 ); /* get sender */ - QString signal = hb_parcx( 2 ); /* get signal */ - PHB_ITEM codeblock = hb_itemNew( hb_param( 3, HB_IT_BLOCK | HB_IT_BYREF ) ); /* get codeblock */ - bool ret = false; /* return value */ + QObject * object = ( QObject* ) hb_parptr( 1 ); /* get sender */ + QString signal = hb_parcx( 2 ); /* get signal */ + PHB_ITEM codeblock = hb_itemNew( hb_param( 3, HB_IT_BLOCK ) ); /* get codeblock */ + bool ret = false; /* return value */ + + qt_setEventSlots(); Slots * s_s = qt_getEventSlots(); if( signal == ( QString ) "clicked()" ) @@ -1704,7 +1713,7 @@ HB_FUNC( QT_DISCONNECT_SIGNAL ) if( i > 0 && i <= s_s->listBlock.size() ) { - hb_itemRelease( ( PHB_ITEM ) s_s->listBlock.at( i - 1 ) ); + hb_itemRelease( s_s->listBlock.at( i - 1 ) ); s_s->listBlock[ i - 1 ] = NULL; s_s->listActv[ i - 1 ] = false; } @@ -1725,7 +1734,7 @@ HB_FUNC( RELEASE_CODEBLOCKS ) { if( ( bool ) s_s->listActv.at( i ) == true ) { - hb_itemRelease( ( PHB_ITEM ) s_s->listBlock.at( i ) ); + hb_itemRelease( s_s->listBlock.at( i ) ); s_s->listBlock[ i ] = NULL; s_s->listActv[ i ] = false; } @@ -1747,66 +1756,13 @@ void release_codeblocks( void ) { if( ( bool ) s_s->listActv.at( i ) == true ) { - hb_itemRelease( ( PHB_ITEM ) s_s->listBlock.at( i ) ); + hb_itemRelease( s_s->listBlock.at( i ) ); } } } } /*----------------------------------------------------------------------*/ - -MyMainWindow::MyMainWindow() -{ - Qt::WindowFlags flags = Qt::WindowCloseButtonHint | Qt::WindowMaximizeButtonHint | - Qt::WindowMinimizeButtonHint | Qt::WindowSystemMenuHint | - Qt::CustomizeWindowHint | Qt::WindowTitleHint | - Qt::Window; - setWindowFlags( flags ); - setFocusPolicy( Qt::StrongFocus ); - setAttribute( Qt::WA_DeleteOnClose ); -} -MyMainWindow::~MyMainWindow( void ) -{ - destroy(); -} -HB_FUNC( QT_MYMAINWINDOW ) -{ - hb_retptr( ( MyMainWindow * ) new MyMainWindow() ); -} - -/*----------------------------------------------------------------------*/ - -MyDrawingArea::MyDrawingArea(QWidget *parent) - : QWidget(parent) -{ - setAttribute( Qt::WA_StaticContents ); - setAttribute( Qt::WA_PaintOnScreen ); - setAttribute( Qt::WA_DeleteOnClose ); - setAttribute( Qt::WA_WindowPropagation ); - - setFocusPolicy( Qt::StrongFocus ); - setMouseTracking( true ); - - setAttribute( Qt::WA_InputMethodEnabled, true ); -} -MyDrawingArea::~MyDrawingArea( void ) -{ -} -void MyDrawingArea::mouseMoveEvent( QMouseEvent * event ) -{ - emit sg_mouseMoveEvent( event ); -} -void MyDrawingArea::keyPressEvent( QKeyEvent * event ) -{ - emit sg_keyPressEvent( event ); -} -HB_FUNC( QT_MYDRAWINGAREA ) -{ - hb_retptr( ( MyDrawingArea * ) new MyDrawingArea() ); -} - -/*----------------------------------------------------------------------*/ - Events::Events( QObject * parent ) : QObject( parent ) { } @@ -1818,11 +1774,12 @@ Events::~Events() bool Events::eventFilter( QObject * object, QEvent * event ) { QEvent::Type eventtype = event->type(); -//char str[ 50 ]; hb_snprintf( str, sizeof( str ), "0 Events::eventFilter = %i", ( int ) eventtype ); OutputDebugString( str ); +//char str[ 50 ]; +//hb_snprintf( str, sizeof( str ), "0 Events::eventFilter = %i", ( int ) eventtype ); OutputDebugString( str ); if( ( int ) eventtype == 0 ) { -//hb_snprintf( str, sizeof( str ), "x Events::eventFilter = %i", ( int ) eventtype ); OutputDebugString( str ); +//hb_snprintf( str, sizeof( str ), "x Events::eventFilter = 0" ); OutputDebugString( str ); return false; } @@ -1831,32 +1788,45 @@ bool Events::eventFilter( QObject * object, QEvent * event ) int found = object->property( prop ).toInt(); if( found == 0 ) { -//hb_snprintf( str, sizeof( str ), "f Events::eventFilter = %i", ( int ) eventtype ); OutputDebugString( str ); +//hb_snprintf( str, sizeof( str ), "f Events::eventFilter = %s %i", " found=0", ( int ) eventtype ); OutputDebugString( str ); return false; } - PHB_ITEM pObject = hb_itemPutPtr( NULL, object ); - PHB_ITEM pEvent = hb_itemPutPtr( NULL, event ); - - bool ret = false; - if( hb_vmRequestReenter() ) - ret = hb_itemGetL( hb_vmEvalBlockV( ( PHB_ITEM ) listBlock.at( found - 1 ), 2, pObject, pEvent ) ); - - hb_itemRelease( pObject ); - hb_itemRelease( pEvent ); - - if( eventtype == QEvent::Close ) + //bool ret = false; + bool ret = true; + if( found <= listBlock.size() && listObj.at( found - 1 ) == object && hb_vmRequestReenter() ) { - if( ret == true ) - event->accept(); - else - event->ignore(); + PHB_ITEM pObject = hb_itemPutPtr( NULL, object ); + PHB_ITEM pEvent = hb_itemPutPtr( NULL, event ); +//hb_snprintf( str, sizeof( str ), "0 Events::eventFilter = %i", ( int ) eventtype ); OutputDebugString( str ); + ret = hb_itemGetL( hb_vmEvalBlockV( ( PHB_ITEM ) listBlock.at( found - 1 ), 2, pObject, pEvent ) ); +//hb_snprintf( str, sizeof( str ), "1 Events::eventFilter = %s", ret ? " yes" : " no" ); OutputDebugString( str ); + hb_itemRelease( pObject ); + hb_itemRelease( pEvent ); + + if( eventtype == QEvent::Close ) + { + if( ret == true ) + event->accept(); + else + event->ignore(); + } } //hb_snprintf( str, sizeof( str ), "1 Events::eventFilter = %i", ( int ) eventtype ); OutputDebugString( str ); return ret; } +HB_FUNC( QT_SETEVENTFILTER ) +{ + qt_setEventFilter(); +} +HB_FUNC( QT_SETEVENTSLOTS ) +{ + qt_setEventSlots(); +} + + HB_FUNC( QT_QEVENTFILTER ) { hb_retptr( qt_getEventFilter() ); @@ -1874,6 +1844,8 @@ HB_FUNC( QT_CONNECT_EVENT ) s_e->listBlock << codeblock; s_e->listActv << true; + s_e->listObj << object; + object->setProperty( str, ( int ) s_e->listBlock.size() ); hb_retl( true ); @@ -1995,6 +1967,7 @@ Qt_WhatsThisRole 5 Qt_SizeHintRole 13 QVariant fetchRole( PHB_ITEM block, int what, int par1, int par2 ) { + QVariant vv; if( hb_vmRequestReenter() ) { PHB_ITEM p0 = hb_itemPutNI( NULL, what ); @@ -2008,25 +1981,23 @@ QVariant fetchRole( PHB_ITEM block, int what, int par1, int par2 ) hb_itemRelease( p2 ); if( hb_itemType( ret ) & HB_IT_STRING ) - return( hb_itemGetC( ret ) ); + vv = hb_itemGetC( ret ); else if( hb_itemType( ret ) & HB_IT_LOGICAL ) - return( hb_itemGetL( ret ) ); + vv = hb_itemGetL( ret ); else if( hb_itemType( ret ) & HB_IT_DOUBLE ) - return( hb_itemGetND( ret ) ); + vv = hb_itemGetND( ret ); else if( hb_itemType( ret ) & HB_IT_NUMERIC ) - return( hb_itemGetNI( ret ) ); - else - return QVariant(); - } - else - { - return QVariant(); + vv = hb_itemGetNI( ret ); + } + return vv; } HbDbfModel::HbDbfModel( PHB_ITEM pBlock ) : QAbstractItemModel() { block = hb_itemNew( pBlock ); + iRows = 0; + iCols = 0; } HbDbfModel::~HbDbfModel() { @@ -2141,6 +2112,7 @@ QVariant HbDbfModel::headerData( int section, Qt::Orientation orientation, int r int HbDbfModel::rowCount( const QModelIndex & /*parent = QModelIndex()*/ ) const { + #if 1 if( hb_vmRequestReenter() ) { PHB_ITEM p0 = hb_itemPutNI( NULL, HBQT_BRW_ROWCOUNT ); @@ -2149,16 +2121,21 @@ int HbDbfModel::rowCount( const QModelIndex & /*parent = QModelIndex()*/ ) const hb_itemRelease( p0 ); + hb_vmRequestRestore(); return result; } else { return 0; } + #else + return iRows; + #endif } int HbDbfModel::columnCount( const QModelIndex & /*parent = QModelIndex()*/ ) const { + #if 1 if( hb_vmRequestReenter() ) { PHB_ITEM p0 = hb_itemPutNI( NULL, HBQT_BRW_COLCOUNT ); @@ -2166,13 +2143,16 @@ int HbDbfModel::columnCount( const QModelIndex & /*parent = QModelIndex()*/ ) co int result = hb_itemGetNI( hb_vmEvalBlockV( block, 1, p0 ) ); hb_itemRelease( p0 ); - + hb_vmRequestRestore(); return result; } else { return 0; } + #else + return iCols; + #endif } QModelIndex HbDbfModel::index( int row, int column, const QModelIndex & parent ) const @@ -2191,7 +2171,283 @@ QModelIndex HbDbfModel::parent( const QModelIndex & /* child */ ) const void HbDbfModel::reset() { QAbstractItemModel::reset(); + //emit dataChanged( createIndex( 0, 0, 0 ), createIndex( iRows, iCols, iRows * iCols ) ); +} + +void HbDbfModel::hbSetRowColumns( int rows, int cols ) +{ + iRows = rows; + iCols = cols; } /*----------------------------------------------------------------------*/ +/*----------------------------------------------------------------------*/ +/*----------------------------------------------------------------------*/ + +MyMainWindow::MyMainWindow( PHB_ITEM pBlock, int iThreadID ) +{ + Qt::WindowFlags flags = Qt::WindowCloseButtonHint | Qt::WindowMaximizeButtonHint | + Qt::WindowMinimizeButtonHint | Qt::WindowSystemMenuHint | + Qt::CustomizeWindowHint | Qt::WindowTitleHint | + Qt::Window; + setWindowFlags( flags ); + setFocusPolicy( Qt::StrongFocus ); + setAttribute( Qt::WA_DeleteOnClose ); + //setAttribute( Qt::WA_NoSystemBackground ); + //setAttribute( Qt::WA_PaintOnScreen ); + //setMouseTracking( true ); + + block = pBlock; + threadID = iThreadID; + activated = true; + painter = new QPainter( this ); +} +MyMainWindow::~MyMainWindow( void ) +{ + destroy(); +} +void MyMainWindow::paintEvent( QPaintEvent * event ) +{ + hb_threadMutexLock( s_mutex ); + + if( hb_vmRequestReenter() ) + { + PHB_ITEM p0 = hb_itemPutNI( NULL, QEvent::Paint ); + PHB_ITEM p1 = hb_itemPutPtr( NULL, event ); + hb_vmEvalBlockV( block, 2, p0, p1 ); + hb_itemRelease( p0 ); + hb_itemRelease( p1 ); + hb_vmRequestRestore(); + } + + // QWidget::paintEvent( event ); + // QWidget::render( painter, QPoint(), event->region(), QWidget::DrawWindowBackground | QWidget::DrawChildren ); + // QWidget::render( painter, QPoint(), event->region(), QWidget::DrawChildren ); + + /* This is an ugly hack to control the way Qt executes its Paint Engine + * which appears to be "not reentrant". If paint message is received by two + * dialogs executing in different Harbour threads, appln GPF's. + * If current thread is forced to release CPU time then everything seems to be + * working fine. But then this slows down the navigation considerably. + * Until this issue is resolved, it seems, we cannot implement multi-window, multi-thread + * interface in Harbour. So sad... + */ + #if defined( QT_EXECUTE_IN_THREADS ) + hb_idleSleep( 0.2 ); + #endif + + hb_threadMutexUnlock( s_mutex ); +} +bool MyMainWindow::event( QEvent * event ) +{ + int type = event->type(); +//hb_snprintf( str, sizeof( str ), " event(%i) %i", threadID , type ); OutputDebugString( str ); + if( type == QEvent::WindowActivate || type == QEvent::Enter ) + { + activated = true; + } + hb_threadMutexLock( s_mutex ); + #if 0 + if( hb_vmRequestReenter() ) + { + PHB_ITEM p0 = hb_itemPutNI( NULL, type ); + PHB_ITEM p1 = hb_itemPutPtr( NULL, event ); + hb_vmEvalBlockV( block, 2, p0, p1 ); + hb_itemRelease( p0 ); + hb_itemRelease( p1 ); + hb_vmRequestRestore(); + } + #endif + bool bRet = QWidget::event( event ); + hb_threadMutexUnlock( s_mutex ); + return bRet; +} +void MyMainWindow::focusInEvent( QFocusEvent *event ) +{ + hb_threadMutexLock( s_mutex ); + if( hb_vmRequestReenter() ) + { + PHB_ITEM p0 = hb_itemPutNI( NULL, QEvent::FocusIn ); + PHB_ITEM p1 = hb_itemPutPtr( NULL, event ); + hb_vmEvalBlockV( block, 2, p0, p1 ); + hb_itemRelease( p0 ); + hb_itemRelease( p1 ); + hb_vmRequestRestore(); + } + activated = true; + QWidget::focusInEvent( event ); + hb_threadMutexUnlock( s_mutex ); +} +void MyMainWindow::focusOutEvent( QFocusEvent *event ) +{ + hb_threadMutexLock( s_mutex ); + if( hb_vmRequestReenter() ) + { + PHB_ITEM p0 = hb_itemPutNI( NULL, QEvent::FocusOut ); + PHB_ITEM p1 = hb_itemPutPtr( NULL, event ); + hb_vmEvalBlockV( block, 2, p0, p1 ); + hb_itemRelease( p0 ); + hb_itemRelease( p1 ); + hb_vmRequestRestore(); + } + QWidget::focusOutEvent( event ); + hb_threadMutexUnlock( s_mutex ); +} +void MyMainWindow::keyPressEvent( QKeyEvent * event ) +{ + hb_threadMutexLock( s_mutex ); + if( hb_vmRequestReenter() ) + { + PHB_ITEM p0 = hb_itemPutNI( NULL, QEvent::KeyPress ); + PHB_ITEM p1 = hb_itemPutPtr( NULL, event ); + hb_vmEvalBlockV( block, 2, p0, p1 ); + hb_itemRelease( p0 ); + hb_itemRelease( p1 ); + hb_vmRequestRestore(); + } + QWidget::keyPressEvent( event ); + hb_threadMutexUnlock( s_mutex ); +} +void MyMainWindow::mouseDoubleClickEvent( QMouseEvent * event ) +{ + hb_threadMutexLock( s_mutex ); + if( hb_vmRequestReenter() ) + { + PHB_ITEM p0 = hb_itemPutNI( NULL, QEvent::MouseButtonDblClick ); + PHB_ITEM p1 = hb_itemPutPtr( NULL, event ); + hb_vmEvalBlockV( block, 2, p0, p1 ); + hb_itemRelease( p0 ); + hb_itemRelease( p1 ); + hb_vmRequestRestore(); + } + QWidget::mouseDoubleClickEvent( event ); + hb_threadMutexUnlock( s_mutex ); +} +void MyMainWindow::mouseMoveEvent( QMouseEvent * event ) +{ + hb_threadMutexLock( s_mutex ); + if( hb_vmRequestReenter() ) + { + PHB_ITEM p0 = hb_itemPutNI( NULL, QEvent::MouseMove ); + PHB_ITEM p1 = hb_itemPutPtr( NULL, event ); + hb_vmEvalBlockV( block, 2, p0, p1 ); + hb_itemRelease( p0 ); + hb_itemRelease( p1 ); + hb_vmRequestRestore(); + } + QWidget::mouseMoveEvent( event ); + hb_threadMutexUnlock( s_mutex ); +} +void MyMainWindow::mousePressEvent( QMouseEvent * event ) +{ + hb_threadMutexLock( s_mutex ); + if( hb_vmRequestReenter() ) + { + PHB_ITEM p0 = hb_itemPutNI( NULL, QEvent::MouseButtonPress ); + PHB_ITEM p1 = hb_itemPutPtr( NULL, event ); + hb_vmEvalBlockV( block, 2, p0, p1 ); + hb_itemRelease( p0 ); + hb_itemRelease( p1 ); + hb_vmRequestRestore(); + } + QWidget::mousePressEvent( event ); + hb_threadMutexUnlock( s_mutex ); +} +void MyMainWindow::mouseReleaseEvent( QMouseEvent * event ) +{ + hb_threadMutexLock( s_mutex ); + if( hb_vmRequestReenter() ) + { + PHB_ITEM p0 = hb_itemPutNI( NULL, QEvent::MouseButtonRelease ); + PHB_ITEM p1 = hb_itemPutPtr( NULL, event ); + hb_vmEvalBlockV( block, 2, p0, p1 ); + hb_itemRelease( p0 ); + hb_itemRelease( p1 ); + hb_vmRequestRestore(); + } + QWidget::mouseReleaseEvent( event ); + hb_threadMutexUnlock( s_mutex ); +} +void MyMainWindow::wheelEvent( QWheelEvent * event ) +{ + hb_threadMutexLock( s_mutex ); + if( hb_vmRequestReenter() ) + { + PHB_ITEM p0 = hb_itemPutNI( NULL, QEvent::Wheel ); + PHB_ITEM p1 = hb_itemPutPtr( NULL, event ); + hb_vmEvalBlockV( block, 2, p0, p1 ); + hb_itemRelease( p0 ); + hb_itemRelease( p1 ); + hb_vmRequestRestore(); + } + QWidget::wheelEvent( event ); + hb_threadMutexUnlock( s_mutex ); +} +void MyMainWindow::resizeEvent( QResizeEvent * event ) +{ + hb_threadMutexLock( s_mutex ); + if( hb_vmRequestReenter() ) + { + PHB_ITEM p0 = hb_itemPutNI( NULL, QEvent::Resize ); + PHB_ITEM p1 = hb_itemPutPtr( NULL, event ); + hb_vmEvalBlockV( block, 2, p0, p1 ); + hb_itemRelease( p0 ); + hb_itemRelease( p1 ); + hb_vmRequestRestore(); + } + QWidget::resizeEvent( event ); + hb_threadMutexUnlock( s_mutex ); +} + +HB_FUNC( QT_MYMAINWINDOW ) +{ + PHB_ITEM bBlock = hb_itemNew( ( PHB_ITEM ) hb_param( 1, HB_IT_BLOCK ) ); + hb_retptr( ( MyMainWindow * ) new MyMainWindow( bBlock, hb_parni( 2 ) ) ); +} +HB_FUNC( QT_MYMAINWINDOW_DESTROY ) +{ + hb_itemRelease( hbqt_par_MyMainWindow( 1 )->block ); +} +HB_FUNC( QT_MUTEXCREATE ) +{ + if( s_mutex == NULL ) + { + s_mutex = hb_threadMutexCreate( FALSE ); + } +} +/*----------------------------------------------------------------------*/ +/*----------------------------------------------------------------------*/ +/*----------------------------------------------------------------------*/ + +MyDrawingArea::MyDrawingArea(QWidget *parent) + : QWidget(parent) +{ + setAttribute( Qt::WA_StaticContents ); + setAttribute( Qt::WA_PaintOnScreen ); + setAttribute( Qt::WA_DeleteOnClose ); + setAttribute( Qt::WA_WindowPropagation ); + + setFocusPolicy( Qt::StrongFocus ); + setMouseTracking( true ); + + setAttribute( Qt::WA_InputMethodEnabled, true ); +} +MyDrawingArea::~MyDrawingArea( void ) +{ +} +void MyDrawingArea::mouseMoveEvent( QMouseEvent * event ) +{ + emit sg_mouseMoveEvent( event ); +} +void MyDrawingArea::keyPressEvent( QKeyEvent * event ) +{ + emit sg_keyPressEvent( event ); +} +HB_FUNC( QT_MYDRAWINGAREA ) +{ + hb_retptr( ( MyDrawingArea * ) new MyDrawingArea() ); +} + +/*----------------------------------------------------------------------*/ + #endif diff --git a/harbour/contrib/hbqt/hbqt_slots.h b/harbour/contrib/hbqt/hbqt_slots.h index 7851b23b23..c0a9d52ea4 100644 --- a/harbour/contrib/hbqt/hbqt_slots.h +++ b/harbour/contrib/hbqt/hbqt_slots.h @@ -74,12 +74,61 @@ #include #include #include +#include #include "hbapi.h" #include "hbapiitm.h" /*----------------------------------------------------------------------*/ +class MyMainWindow : public QMainWindow +{ + Q_OBJECT + +public: + MyMainWindow( PHB_ITEM pBlock, int iThreadID ); + virtual ~MyMainWindow(); + + bool event( QEvent * event ); + void keyPressEvent( QKeyEvent * event ); + void mouseDoubleClickEvent( QMouseEvent * event ); + void mouseMoveEvent( QMouseEvent * event ); + void mousePressEvent( QMouseEvent * event ); + void mouseReleaseEvent( QMouseEvent * event ); + void wheelEvent( QWheelEvent * event ); + void resizeEvent( QResizeEvent * event ); + void paintEvent( QPaintEvent * event ); + void focusInEvent( QFocusEvent * event ); + void focusOutEvent( QFocusEvent * event ); + + PHB_ITEM block; + int threadID; + bool activated; + QPainter * painter; + + char str[ 50 ]; +}; + +/*----------------------------------------------------------------------*/ + +class MyDrawingArea : public QWidget +{ + Q_OBJECT + +public: + MyDrawingArea( QWidget *parent = 0 ); + virtual ~MyDrawingArea( void ); + + void keyPressEvent( QKeyEvent * event ); + void mouseMoveEvent( QMouseEvent * event ); + +signals: + void sg_mouseMoveEvent( QMouseEvent * event ); + void sg_keyPressEvent( QKeyEvent * event ); +}; + +/*----------------------------------------------------------------------*/ + class HbDbfModel : public QAbstractItemModel { Q_OBJECT @@ -89,6 +138,10 @@ public: ~HbDbfModel(); PHB_ITEM block; + int iRows; + int iCols; + + void hbSetRowColumns( int rows, int cols ); Qt::ItemFlags flags( const QModelIndex & index ) const; QVariant data( const QModelIndex & index, int role = Qt::DisplayRole ) const; @@ -103,7 +156,6 @@ public: /*----------------------------------------------------------------------*/ class HbTableView : public QTableView -//class HbTableView : public QTableWidget { Q_OBJECT @@ -139,35 +191,6 @@ signals: /*----------------------------------------------------------------------*/ -class MyMainWindow : public QMainWindow -{ - Q_OBJECT - -public: - MyMainWindow(); - virtual ~MyMainWindow(); -}; - -/*----------------------------------------------------------------------*/ - -class MyDrawingArea : public QWidget -{ - Q_OBJECT - -public: - MyDrawingArea( QWidget *parent = 0 ); - virtual ~MyDrawingArea( void ); - - void keyPressEvent( QKeyEvent * event ); - void mouseMoveEvent( QMouseEvent * event ); - -signals: - void sg_mouseMoveEvent( QMouseEvent * event ); - void sg_keyPressEvent( QKeyEvent * event ); -}; - -/*----------------------------------------------------------------------*/ - class Slots: public QObject { Q_OBJECT @@ -312,6 +335,7 @@ public: ~Events(); QList listBlock; QList listActv; + QList listObj; protected: bool eventFilter( QObject * obj, QEvent * event ); diff --git a/harbour/contrib/hbqt/moc_slots.cpp b/harbour/contrib/hbqt/moc_slots.cpp index e07a8c6dfb..7e2f6cc46c 100644 --- a/harbour/contrib/hbqt/moc_slots.cpp +++ b/harbour/contrib/hbqt/moc_slots.cpp @@ -1,8 +1,8 @@ /**************************************************************************** ** Meta object code from reading C++ file 'hbqt_slots.h' ** -** Created: Wed Sep 9 00:41:01 2009 -** by: The Qt Meta Object Compiler version 61 (Qt 4.5.0) +** Created: Wed Sep 16 21:02:46 2009 +** by: The Qt Meta Object Compiler version 61 (Qt 4.5.2) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ @@ -11,12 +11,126 @@ #if !defined(Q_MOC_OUTPUT_REVISION) #error "The header file 'hbqt_slots.h' doesn't include ." #elif Q_MOC_OUTPUT_REVISION != 61 -#error "This file was generated using the moc from 4.5.0. It" +#error "This file was generated using the moc from 4.5.2. It" #error "cannot be used with the include files from this version of Qt." #error "(The moc has changed too much.)" #endif QT_BEGIN_MOC_NAMESPACE +static const uint qt_meta_data_MyMainWindow[] = { + + // content: + 2, // revision + 0, // classname + 0, 0, // classinfo + 0, 0, // methods + 0, 0, // properties + 0, 0, // enums/sets + 0, 0, // constructors + + 0 // eod +}; + +static const char qt_meta_stringdata_MyMainWindow[] = { + "MyMainWindow\0" +}; + +const QMetaObject MyMainWindow::staticMetaObject = { + { &QMainWindow::staticMetaObject, qt_meta_stringdata_MyMainWindow, + qt_meta_data_MyMainWindow, 0 } +}; + +const QMetaObject *MyMainWindow::metaObject() const +{ + return &staticMetaObject; +} + +void *MyMainWindow::qt_metacast(const char *_clname) +{ + if (!_clname) return 0; + if (!strcmp(_clname, qt_meta_stringdata_MyMainWindow)) + return static_cast(const_cast< MyMainWindow*>(this)); + return QMainWindow::qt_metacast(_clname); +} + +int MyMainWindow::qt_metacall(QMetaObject::Call _c, int _id, void **_a) +{ + _id = QMainWindow::qt_metacall(_c, _id, _a); + if (_id < 0) + return _id; + return _id; +} +static const uint qt_meta_data_MyDrawingArea[] = { + + // content: + 2, // revision + 0, // classname + 0, 0, // classinfo + 2, 12, // methods + 0, 0, // properties + 0, 0, // enums/sets + 0, 0, // constructors + + // signals: signature, parameters, type, tag, flags + 21, 15, 14, 14, 0x05, + 53, 15, 14, 14, 0x05, + + 0 // eod +}; + +static const char qt_meta_stringdata_MyDrawingArea[] = { + "MyDrawingArea\0\0event\0" + "sg_mouseMoveEvent(QMouseEvent*)\0" + "sg_keyPressEvent(QKeyEvent*)\0" +}; + +const QMetaObject MyDrawingArea::staticMetaObject = { + { &QWidget::staticMetaObject, qt_meta_stringdata_MyDrawingArea, + qt_meta_data_MyDrawingArea, 0 } +}; + +const QMetaObject *MyDrawingArea::metaObject() const +{ + return &staticMetaObject; +} + +void *MyDrawingArea::qt_metacast(const char *_clname) +{ + if (!_clname) return 0; + if (!strcmp(_clname, qt_meta_stringdata_MyDrawingArea)) + return static_cast(const_cast< MyDrawingArea*>(this)); + return QWidget::qt_metacast(_clname); +} + +int MyDrawingArea::qt_metacall(QMetaObject::Call _c, int _id, void **_a) +{ + _id = QWidget::qt_metacall(_c, _id, _a); + if (_id < 0) + return _id; + if (_c == QMetaObject::InvokeMetaMethod) { + switch (_id) { + case 0: sg_mouseMoveEvent((*reinterpret_cast< QMouseEvent*(*)>(_a[1]))); break; + case 1: sg_keyPressEvent((*reinterpret_cast< QKeyEvent*(*)>(_a[1]))); break; + default: ; + } + _id -= 2; + } + return _id; +} + +// SIGNAL 0 +void MyDrawingArea::sg_mouseMoveEvent(QMouseEvent * _t1) +{ + void *_a[] = { 0, const_cast(reinterpret_cast(&_t1)) }; + QMetaObject::activate(this, &staticMetaObject, 0, _a); +} + +// SIGNAL 1 +void MyDrawingArea::sg_keyPressEvent(QKeyEvent * _t1) +{ + void *_a[] = { 0, const_cast(reinterpret_cast(&_t1)) }; + QMetaObject::activate(this, &staticMetaObject, 1, _a); +} static const uint qt_meta_data_HbDbfModel[] = { // content: @@ -201,120 +315,6 @@ void HbTableView::sg_scrollContentsBy(int _t1, int _t2) void *_a[] = { 0, const_cast(reinterpret_cast(&_t1)), const_cast(reinterpret_cast(&_t2)) }; QMetaObject::activate(this, &staticMetaObject, 8, _a); } -static const uint qt_meta_data_MyMainWindow[] = { - - // content: - 2, // revision - 0, // classname - 0, 0, // classinfo - 0, 0, // methods - 0, 0, // properties - 0, 0, // enums/sets - 0, 0, // constructors - - 0 // eod -}; - -static const char qt_meta_stringdata_MyMainWindow[] = { - "MyMainWindow\0" -}; - -const QMetaObject MyMainWindow::staticMetaObject = { - { &QMainWindow::staticMetaObject, qt_meta_stringdata_MyMainWindow, - qt_meta_data_MyMainWindow, 0 } -}; - -const QMetaObject *MyMainWindow::metaObject() const -{ - return &staticMetaObject; -} - -void *MyMainWindow::qt_metacast(const char *_clname) -{ - if (!_clname) return 0; - if (!strcmp(_clname, qt_meta_stringdata_MyMainWindow)) - return static_cast(const_cast< MyMainWindow*>(this)); - return QMainWindow::qt_metacast(_clname); -} - -int MyMainWindow::qt_metacall(QMetaObject::Call _c, int _id, void **_a) -{ - _id = QMainWindow::qt_metacall(_c, _id, _a); - if (_id < 0) - return _id; - return _id; -} -static const uint qt_meta_data_MyDrawingArea[] = { - - // content: - 2, // revision - 0, // classname - 0, 0, // classinfo - 2, 12, // methods - 0, 0, // properties - 0, 0, // enums/sets - 0, 0, // constructors - - // signals: signature, parameters, type, tag, flags - 21, 15, 14, 14, 0x05, - 53, 15, 14, 14, 0x05, - - 0 // eod -}; - -static const char qt_meta_stringdata_MyDrawingArea[] = { - "MyDrawingArea\0\0event\0" - "sg_mouseMoveEvent(QMouseEvent*)\0" - "sg_keyPressEvent(QKeyEvent*)\0" -}; - -const QMetaObject MyDrawingArea::staticMetaObject = { - { &QWidget::staticMetaObject, qt_meta_stringdata_MyDrawingArea, - qt_meta_data_MyDrawingArea, 0 } -}; - -const QMetaObject *MyDrawingArea::metaObject() const -{ - return &staticMetaObject; -} - -void *MyDrawingArea::qt_metacast(const char *_clname) -{ - if (!_clname) return 0; - if (!strcmp(_clname, qt_meta_stringdata_MyDrawingArea)) - return static_cast(const_cast< MyDrawingArea*>(this)); - return QWidget::qt_metacast(_clname); -} - -int MyDrawingArea::qt_metacall(QMetaObject::Call _c, int _id, void **_a) -{ - _id = QWidget::qt_metacall(_c, _id, _a); - if (_id < 0) - return _id; - if (_c == QMetaObject::InvokeMetaMethod) { - switch (_id) { - case 0: sg_mouseMoveEvent((*reinterpret_cast< QMouseEvent*(*)>(_a[1]))); break; - case 1: sg_keyPressEvent((*reinterpret_cast< QKeyEvent*(*)>(_a[1]))); break; - default: ; - } - _id -= 2; - } - return _id; -} - -// SIGNAL 0 -void MyDrawingArea::sg_mouseMoveEvent(QMouseEvent * _t1) -{ - void *_a[] = { 0, const_cast(reinterpret_cast(&_t1)) }; - QMetaObject::activate(this, &staticMetaObject, 0, _a); -} - -// SIGNAL 1 -void MyDrawingArea::sg_keyPressEvent(QKeyEvent * _t1) -{ - void *_a[] = { 0, const_cast(reinterpret_cast(&_t1)) }; - QMetaObject::activate(this, &staticMetaObject, 1, _a); -} static const uint qt_meta_data_Slots[] = { // content: diff --git a/harbour/contrib/hbqt/qth/QAbstractItemModel.qth b/harbour/contrib/hbqt/qth/QAbstractItemModel.qth index 6a4d37a0ca..8ac92cf82f 100644 --- a/harbour/contrib/hbqt/qth/QAbstractItemModel.qth +++ b/harbour/contrib/hbqt/qth/QAbstractItemModel.qth @@ -66,6 +66,7 @@ CREATE CLASS HbDbfModel INHERIT QAbstractItemModel METHOD New( bBlock ) INLINE ::pPtr := Qt_HbDbfModel( bBlock ), Self METHOD Reset() INLINE Qt_HbDbfModel_reset( ::pPtr ) METHOD Index( nRow, nCol ) INLINE Qt_HbDbfModel_index( ::pPtr, nRow, nCol, 0 ) + METHOD hbSetRowColumns( nRows, nCols ) INLINE Qt_HbDbfModel_hbSetRowColumns( ::pPtr, nRows, nCols ) ENDCLASS @@ -101,6 +102,11 @@ HB_FUNC( QT_HBDBFMODEL_INDEX ) hb_retptr( new QModelIndex( hbqt_par_HbDbfModel( 1 )->index( hb_parni( 2 ), hb_parni( 3 ), QModelIndex() ) ) ); } +HB_FUNC( QT_HBDBFMODEL_HBSETROWCOLUMNS ) +{ + hbqt_par_HbDbfModel( 1 )->hbSetRowColumns( hb_parni( 2 ), hb_parni( 3 ) ); +} +