From d5a707e00f77ecee1ee9590ba8c4e1063ce26e8a Mon Sep 17 00:00:00 2001 From: Pritpal Bedi Date: Fri, 6 May 2011 18:49:08 +0000 Subject: [PATCH] 2011-05-06 11:46 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) * contrib/hbxbp/xbpdialog.prg * contrib/hbxbp/xbpwindow.prg ! Fixed: handelling of :close callback and PostAppEvent( xbeP_Close ). --- harbour/ChangeLog | 5 +++++ harbour/contrib/hbxbp/xbpdialog.prg | 4 +++- harbour/contrib/hbxbp/xbpwindow.prg | 6 +----- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 971167a27c..a3cdd67983 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,11 @@ The license applies to all entries newer than 2009-04-28. */ +2011-05-06 11:46 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) + * contrib/hbxbp/xbpdialog.prg + * contrib/hbxbp/xbpwindow.prg + ! Fixed: handelling of :close callback and PostAppEvent( xbeP_Close ). + 2011-05-06 11:00 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) * contrib/hbqt/qtgui/qth/QPrinterInfo.qth ! Fixed: constructor. diff --git a/harbour/contrib/hbxbp/xbpdialog.prg b/harbour/contrib/hbxbp/xbpdialog.prg index ae7dd1d760..743349dc16 100644 --- a/harbour/contrib/hbxbp/xbpdialog.prg +++ b/harbour/contrib/hbxbp/xbpdialog.prg @@ -249,6 +249,8 @@ METHOD XbpDialog:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible ) ::postCreate() + ::oWidget:setAttribute( Qt_WA_DeleteOnClose, .f. ) + RETURN Self /*----------------------------------------------------------------------*/ @@ -289,8 +291,8 @@ METHOD XbpDialog:execEvent( nEvent, pEvent ) CASE nEvent == QEvent_Close pEvent:ignore() - ::close() SetAppEvent( xbeP_Close, NIL, NIL, Self ) + ENDCASE RETURN .F. diff --git a/harbour/contrib/hbxbp/xbpwindow.prg b/harbour/contrib/hbxbp/xbpwindow.prg index b889d1dc95..e507f742bd 100644 --- a/harbour/contrib/hbxbp/xbpwindow.prg +++ b/harbour/contrib/hbxbp/xbpwindow.prg @@ -673,11 +673,7 @@ METHOD XbpWindow:handleEvent( nEvent, mp1, mp2 ) SWITCH ( nEvent ) CASE xbeP_Close - #if 0 - IF ! empty( ::oWidget ) - ::destroy() - ENDIF - #endif + ::close() EXIT CASE xbeP_Keyboard ::keyboard( mp1 )