2012-06-20 19:57 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)

* contrib/hbqt/qtcore/hbqt_bind.cpp
    ! Organized: tracelog entries.

  * contrib/hbqt/qtgui/THbQtUI.prg
    - Deleted: DESTRUCTOR _destroy().
This commit is contained in:
Pritpal Bedi
2012-06-21 02:59:49 +00:00
parent 7065ffaa42
commit 17385d0aba
3 changed files with 15 additions and 13 deletions

View File

@@ -16,6 +16,13 @@
The license applies to all entries newer than 2009-04-28.
*/
2012-06-20 19:57 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbqt/qtcore/hbqt_bind.cpp
! Organized: tracelog entries.
* contrib/hbqt/qtgui/THbQtUI.prg
- Deleted: DESTRUCTOR _destroy().
2012-06-20 18:44 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbqt/qtcore/qth/QDataStream.qth
* contrib/hbqt/qtcore/qth/QEventLoop.qth

View File

@@ -425,20 +425,17 @@ void hbqt_bindDestroyHbObject( PHB_ITEM pObject )
{
if( bind->pDelFunc != NULL )
{
HB_TRACE( HB_TR_DEBUG, ( ".........HARBOUR_DESTROYING_ACTUAL_QT_OBJECT( %p, %s, %i )", bind->qtObject, bind->szClassName, bind->iFlags ) );
if( bind->iFlags & HBQT_BIT_QOBJECT )
{
HB_TRACE( HB_TR_DEBUG, ( ".........HARBOUR_DESTROYING_ACTUAL_QT_OBJECT_NAMED( %p, %s )", bind->qtObject, ( ( QObject * ) bind->qtObject )->objectName().toAscii().data() ) );
if( bind->iThreadId == 1 && ( ( QObject * ) bind->qtObject )->objectName() == "PleaseDoNotDelete" ) /* This is a hack: will be removed a bit later */
{
HB_TRACE( HB_TR_DEBUG, ( ".........HARBOUR_NOT_DESTROYING_ACTUAL_QT_OBJECT( %p, %s, PleaseDoNotDelete )", bind->qtObject, bind->szClassName ) );
fDelQtObject = false;
}
// else if( ( QString ) ( ( QObject * ) bind->qtObject )->metaObject()->className() == "QDesktopWidget" )
// fDelQtObject = false;
}
if( fDelQtObject )
{
HB_TRACE( HB_TR_DEBUG, ( ".........HARBOUR_DESTROYING_ACTUAL_QT_OBJECT_NAMED( %p, %s )", bind->qtObject, bind->szClassName ) );
HB_TRACE( HB_TR_DEBUG, ( ".........HARBOUR_DESTROYING_ACTUAL_QT_OBJECT( %p, %s )", bind->qtObject, bind->szClassName ) );
bind->fDeleting = true;
bind->pDelFunc( bind->qtObject, bind->iFlags );
bind->fDeleting = false;
@@ -482,6 +479,7 @@ void hbqt_bindDestroyQtObject( void * qtObject )
hb_vmRequestRestore();
}
HB_TRACE( HB_TR_DEBUG, ( "............QT_DESTROY_ENDS( %p )..............", qtObject ) );
}
HBQSlots * hbqt_bindGetReceiverSlotsByHbObject( PHB_ITEM pObject )

View File

@@ -69,16 +69,17 @@
#include "error.ch"
#include "hbtrace.ch"
#define Qt_WA_DeleteOnClose 55
/*----------------------------------------------------------------------*/
CREATE CLASS HbQtUI INHERIT HbQtObjectHandler
CREATE CLASS HbQtUI
VAR oWidget /* TOFIX: User code uses this directly. Then rename this to __oRootWidget and make it PROTECTED. */
VAR qObj INIT { => } /* TOFIX: User code uses this directly. Then rename this to __hWidget and make it PROTECTED. */
METHOD new( oRootWidget, hWidget )
METHOD destroy()
DESTRUCTOR _destroy()
ERROR HANDLER __OnError( ... )
@@ -91,16 +92,12 @@ METHOD HbQtUI:new( oRootWidget, hWidget )
::oWidget := oRootWidget
::qObj := hWidget
::oWidget:setAttribute( Qt_WA_DeleteOnClose, .f. )
RETURN Self
/*----------------------------------------------------------------------*/
/* QUESTION: Is this needed? */
METHOD HbQtUI:_destroy()
RETURN ::destroy()
/*----------------------------------------------------------------------*/
METHOD HbQtUI:destroy()
LOCAL oObj