diff --git a/harbour/ChangeLog b/harbour/ChangeLog index c12ca06529..342b2fbe42 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -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. diff --git a/harbour/contrib/hbqt/qtgui/qth/QTreeWidgetItem.qth b/harbour/contrib/hbqt/qtgui/qth/QTreeWidgetItem.qth index f27c798351..31d66870fa 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QTreeWidgetItem.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QTreeWidgetItem.qth @@ -67,8 +67,8 @@ enum ItemType { Type, UserType } -void addChild ( QTreeWidgetItem * child ) [*X=1*] -void addChildren ( const QList & children ) [*X=1*] +void addChild ( QTreeWidgetItem * child ) [*D=1*] +void addChildren ( const QList & children ) [*D=1*] QBrush background ( int column ) const Qt::CheckState checkState ( int column ) const QTreeWidgetItem * child ( int index ) const diff --git a/harbour/contrib/hbqt/tests/browqt.prg b/harbour/contrib/hbqt/tests/browqt.prg index 09982c9fc0..eb664ba6fd 100644 --- a/harbour/contrib/hbqt/tests/browqt.prg +++ b/harbour/contrib/hbqt/tests/browqt.prg @@ -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()