2011-02-16 18:40 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)

* contrib/hbqt/qtgui/qth/QTableWidget.qth
  * contrib/hbqt/qtgui/qth/QTreeWidget.qth
  * contrib/hbqt/qtgui/qth/QTreeWidgetItem.qth
    + Added: [*A=1*] token to methods where ownership is 
      returned back to HVM from Qt object.
  * contrib/hbqt/hbmk2_qt.hbs
    + Implemented: protocol to transfer the ownership to free 
      a Qt object to HVM. 
    TODO: spot methods in all .qth files where ownership 
          is switched to application instead of its parent.
          Speak-out if you find one.
This commit is contained in:
Pritpal Bedi
2011-02-17 02:48:16 +00:00
parent 3f105ded2e
commit 87e60a5b3a
5 changed files with 28 additions and 11 deletions

View File

@@ -16,6 +16,19 @@
The license applies to all entries newer than 2009-04-28.
*/
2011-02-16 18:40 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbqt/qtgui/qth/QTableWidget.qth
* contrib/hbqt/qtgui/qth/QTreeWidget.qth
* contrib/hbqt/qtgui/qth/QTreeWidgetItem.qth
+ Added: [*A=1*] token to methods where ownership is
returned back to HVM from Qt object.
* contrib/hbqt/hbmk2_qt.hbs
+ Implemented: protocol to transfer the ownership to free
a Qt object to HVM.
TODO: spot methods in all .qth files where ownership
is switched to application instead of its parent.
Speak-out if you find one.
2011-02-16 17:02 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbqt/qtgui/qth/HBQPlainTextEdit.qth
! Fix: optional parameter was not properly laid.

View File

@@ -1595,14 +1595,14 @@ METHOD HbQtSource:buildMethodBody( oMtd )
ELSE
FP := oMtd:cCmd
ENDIF
//
/* Manage Re-Attached */
IF oMtd:nAttach > 0
FP := strtran( FP, ", false", ", true" )
ENDIF
/* Manage detached Argument */
IF oMtd:nDetach > 0
#if 0
aadd( ::txt_, " HBQT_GC_T * q = ( HBQT_GC_T * ) hb_parptrGC( hbqt_gcFuncs(), " + hb_ntos( oMtd:nDetach + 1 ) + " );" )
aadd( ::txt_, " if( q && q->ph )" )
aadd( ::txt_, " q->bNew = false;" )
#endif
aadd( ::txt_, " hbqt_detachgcpointer( " + hb_ntos( oMtd:nDetach + 1 ) + " );" )
ENDIF
@@ -2200,6 +2200,9 @@ METHOD HbQtSource:parseProto( cProto, fBody_ )
CASE "D"
oMtd:nDetach := val( cVal )
EXIT
CASE "A"
oMtd:nAttach := val( cVal )
EXIT
CASE "xxx"
EXIT
ENDSWITCH
@@ -2675,6 +2678,7 @@ CREATE CLASS HbqtMethod
DATA cMrk INIT "" // ^^^
DATA nDetach INIT 0
DATA nAttach INIT 0
DATA cFun INIT ""
DATA cRet INIT ""

View File

@@ -70,9 +70,9 @@ void setRowCount ( int rows )
void setVerticalHeaderItem ( int row, QTableWidgetItem * item ) [*D=2*]
void setVerticalHeaderLabels ( const QStringList & labels )
void sortItems ( int column, Qt::SortOrder order = Qt::AscendingOrder )
QTableWidgetItem * takeHorizontalHeaderItem ( int column )
QTableWidgetItem * takeItem ( int row, int column )
QTableWidgetItem * takeVerticalHeaderItem ( int row )
QTableWidgetItem * takeHorizontalHeaderItem ( int column ) [*A=1*]
QTableWidgetItem * takeItem ( int row, int column ) [*A=1*]
QTableWidgetItem * takeVerticalHeaderItem ( int row ) [*A=1*]
QTableWidgetItem * verticalHeaderItem ( int row ) const
int visualColumn ( int logicalColumn ) const
QRect visualItemRect ( const QTableWidgetItem * item ) const

View File

@@ -64,7 +64,7 @@ void setHeaderLabels ( const QStringList & labels )
void setItemWidget ( QTreeWidgetItem * item, int column, QWidget * widget )
int sortColumn () const
void sortItems ( int column, Qt::SortOrder order )
QTreeWidgetItem * takeTopLevelItem ( int index )
QTreeWidgetItem * takeTopLevelItem ( int index ) [*A=1*]
QTreeWidgetItem * topLevelItem ( int index ) const
int topLevelItemCount () const
QRect visualItemRect ( const QTreeWidgetItem * item ) const

View File

@@ -98,7 +98,7 @@ void setWhatsThis ( int column, const QString & whatsThis )
QSize sizeHint ( int column ) const
void sortChildren ( int column, Qt::SortOrder order )
QString statusTip ( int column ) const
QTreeWidgetItem * takeChild ( int index )
QTreeWidgetItem * takeChild ( int index ) [*A=1*]
QList<QTreeWidgetItem *> takeChildren ()
QString text ( int column ) const
int textAlignment ( int column ) const