2012-07-02 16:01 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)

* contrib/hbqt/qtgui/qth/QTreeWidgetItem.qth
    ! Fixed: regression as per prev commit.
       QTreeWidgetItem() can receive another QTreeWidgetItem
       as its child and hence is subject to not destroy Qt 
       object by Harbour.

  * contrib/hbqt/tests/browqt.prg
    + Enabled: Build_TreeView() which was causing GPF on exit,
       a result of above fix.
This commit is contained in:
Pritpal Bedi
2012-07-02 23:05:58 +00:00
parent 6f8de93eb6
commit bfee8cfc23
3 changed files with 32 additions and 2 deletions

View File

@@ -16,6 +16,17 @@
The license applies to all entries newer than 2009-04-28.
*/
2012-07-02 16:01 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbqt/qtgui/qth/QTreeWidgetItem.qth
! Fixed: regression as per prev commit.
QTreeWidgetItem() can receive another QTreeWidgetItem
as its child and hence is subject to not destroy Qt
object by Harbour.
* contrib/hbqt/tests/browqt.prg
+ Enabled: Build_TreeView() which was causing GPF on exit,
a result of above fix.
2012-07-02 17:01 UTC+0200 Viktor Szakats (harbour syenar.net)
* doc/en/file.txt
! Double DIRCHANGE removed and 'he' to 'be' changed.

View File

@@ -67,8 +67,8 @@ enum ItemType { Type, UserType }
</ENUMS>
<PROTOS>
void addChild ( QTreeWidgetItem * child ) [*X=1*]
void addChildren ( const QList<QTreeWidgetItem *> & children ) [*X=1*]
void addChild ( QTreeWidgetItem * child ) [*D=1*]
void addChildren ( const QList<QTreeWidgetItem *> & children ) [*D=1*]
QBrush background ( int column ) const
Qt::CheckState checkState ( int column ) const
QTreeWidgetItem * child ( int index ) const

View File

@@ -20,6 +20,24 @@ PROCEDURE ExecOneMore()
RETURN
STATIC PROCEDURE BuildADialog()
LOCAL oEventLoop, oDA, lExit := .f.
oDA := QWidget()
oDA:setAttribute( Qt_WA_DeleteOnClose, .f. )
oDA:resize(640,460 )
oEventLoop := QEventLoop( oDA )
oDA:connect( QEvent_Close, {|| lExit := .t. } )
oDA:Show()
DO WHILE ! lExit
oEventLoop:processEvents()
ENDDO
oDA:disconnect( QEvent_Close )
oEventLoop:exit()
HB_TRACE( HB_TR_ALWAYS, "EXITING" )
RETURN
STATIC PROCEDURE xBuildADialog()
LOCAL tb1, mo1, lay1, lay2, bt1, bt2, bt3, hd1, i, oDgt, oSmdl
LOCAL oDA
LOCAL aStru1
@@ -69,6 +87,7 @@ STATIC PROCEDURE BuildADialog()
lay2:addWidget( bt3 )
oEventLoop := QEventLoop( oDA )
//oDA:connect( QEvent_Close, {|oEventClose| oEventClose:ignore(), oEventLoop:exit( 0 ) } )
oDA:connect( QEvent_Close, {|| oEventLoop:exit( 0 ) } )
oDA:Show()
oEventLoop:exec()