From 2d5d02b780ed601f7cd1f55f6de8f8bae2075101 Mon Sep 17 00:00:00 2001 From: Pritpal Bedi Date: Thu, 16 Sep 2010 20:34:57 +0000 Subject: [PATCH] 2010-09-16 13:32 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) * contrib/hbide/ideactions.prg * contrib/hbide/ideobject.prg ! Minor. * contrib/hbqt/hbqt_hbmk2_plugin.hbs + Added: required :pPtr initialization. * contrib/hbqt/qtcore/hbqt_misc.prg ! Changed the way hbqt_ptr( oQtOROtherObject ) was returning :pPtr. Now it checks <:pPtr> instance variable's presence if it is a member of the class or not. WARNING: Now onwards any class derived from hbQT class must contain :pPtr instance variable to work properly. * contrib/hbqt/qtgui/THbQtUI.prg + Added: :pPtr instance vaiable. --- harbour/ChangeLog | 19 +++++++++++++++++++ harbour/contrib/hbide/ideactions.prg | 4 +--- harbour/contrib/hbide/ideobject.prg | 1 - harbour/contrib/hbqt/hbqt_hbmk2_plugin.hbs | 1 + harbour/contrib/hbqt/qtcore/hbqt_misc.prg | 7 +++++++ harbour/contrib/hbqt/qtgui/THbQtUI.prg | 2 ++ 6 files changed, 30 insertions(+), 4 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 93bf5ba2c6..c632fcfbe1 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,25 @@ The license applies to all entries newer than 2009-04-28. */ +2010-09-16 13:32 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) + * contrib/hbide/ideactions.prg + * contrib/hbide/ideobject.prg + ! Minor. + + * contrib/hbqt/hbqt_hbmk2_plugin.hbs + + Added: required :pPtr initialization. + + * contrib/hbqt/qtcore/hbqt_misc.prg + ! Changed the way hbqt_ptr( oQtOROtherObject ) was returning :pPtr. + Now it checks <:pPtr> instance variable's presence if it + is a member of the class or not. + + WARNING: Now onwards any class derived from hbQT class must contain + :pPtr instance variable to work properly. + + * contrib/hbqt/qtgui/THbQtUI.prg + + Added: :pPtr instance vaiable. + 2010-09-15 19:05 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) * contrib/hbide/idemain.prg ! A last minute miss. diff --git a/harbour/contrib/hbide/ideactions.prg b/harbour/contrib/hbide/ideactions.prg index 82a3a7b36e..cfb10151d8 100644 --- a/harbour/contrib/hbide/ideactions.prg +++ b/harbour/contrib/hbide/ideactions.prg @@ -106,9 +106,7 @@ METHOD IdeActions:create( oIde ) DEFAULT oIde TO ::oIde ::oIde := oIde - ::buildActions() - RETURN Self /*----------------------------------------------------------------------*/ @@ -141,7 +139,7 @@ METHOD IdeActions:buildActions() FOR EACH a_ IN aAct IF !( hb_hHasKey( ::hActions, a_[ ACT_NAME ] ) ) - qAction := QAction( ::qDlg ) + qAction := QAction( ::oDlg:oWidget ) qAction:setCheckable( iif( empty( a_[ ACT_CHECKABLE ] ), .F., upper( a_[ ACT_CHECKABLE ] ) == "YES" ) ) qAction:setText( strtran( a_[ ACT_TEXT ], "~", "&" ) ) IF !empty( a_[ ACT_IMAGE ] ) diff --git a/harbour/contrib/hbide/ideobject.prg b/harbour/contrib/hbide/ideobject.prg index 41301aa182..8e794453ef 100644 --- a/harbour/contrib/hbide/ideobject.prg +++ b/harbour/contrib/hbide/ideobject.prg @@ -107,7 +107,6 @@ CLASS IdeObject ACCESS oFont INLINE ::oIde:oFont ACCESS oSBar INLINE ::oIde:oSBar ACCESS oDlg INLINE ::oIde:oDlg - ACCESS qDlg INLINE ::oIde:oDlg:oWidget ACCESS oDA INLINE ::oIde:oDA ACCESS qLayout INLINE ::oIde:qLayout diff --git a/harbour/contrib/hbqt/hbqt_hbmk2_plugin.hbs b/harbour/contrib/hbqt/hbqt_hbmk2_plugin.hbs index 2f136d8344..0550d72b2e 100644 --- a/harbour/contrib/hbqt/hbqt_hbmk2_plugin.hbs +++ b/harbour/contrib/hbqt/hbqt_hbmk2_plugin.hbs @@ -687,6 +687,7 @@ STATIC FUNCTION hbq_gen_ui_prg( cFile, cFuncName ) AAdd( aLinesPRG, " oUI := HbQtUI():new()" ) AAdd( aLinesPRG, " oUI:qObj := qObj" ) AAdd( aLinesPRG, " oUI:oWidget := oWidget" ) + AAdd( aLinesPRG, " oUI:pPtr := oWidget:pPtr" ) AAdd( aLinesPRG, "" ) AAdd( aLinesPRG, " RETURN oUI" ) AAdd( aLinesPRG, "" ) diff --git a/harbour/contrib/hbqt/qtcore/hbqt_misc.prg b/harbour/contrib/hbqt/qtcore/hbqt_misc.prg index 185d5358d0..17b50060ab 100644 --- a/harbour/contrib/hbqt/qtcore/hbqt_misc.prg +++ b/harbour/contrib/hbqt/qtcore/hbqt_misc.prg @@ -53,6 +53,7 @@ #include "hbclass.ch" #include "common.ch" #include "error.ch" +#include "hbtrace.ch" /*----------------------------------------------------------------------*/ @@ -150,6 +151,7 @@ METHOD HbQtObjectHandler:disconnect( cnEvent ) /*----------------------------------------------------------------------*/ FUNCTION hbqt_ptr( xParam ) + #if 0 LOCAL cClsName IF hb_isObject( xParam ) @@ -165,6 +167,11 @@ FUNCTION hbqt_ptr( xParam ) ENDIF ENDIF + #else + IF hb_isObject( xParam ) .AND. __objHasMsg( xParam, "PPTR" ) + RETURN xParam:pPtr + ENDIF + #endif RETURN xParam diff --git a/harbour/contrib/hbqt/qtgui/THbQtUI.prg b/harbour/contrib/hbqt/qtgui/THbQtUI.prg index b59ef0bd45..c6f1349321 100644 --- a/harbour/contrib/hbqt/qtgui/THbQtUI.prg +++ b/harbour/contrib/hbqt/qtgui/THbQtUI.prg @@ -75,6 +75,7 @@ CLASS HbQtUI + DATA pPtr DATA cFile DATA qParent @@ -258,6 +259,7 @@ METHOD HbQtUI:loadUI( cUiFull, qParent ) ENDIF ::oWidget := oWidget + ::pPtr := oWidget:pPtr RETURN oWidget