diff --git a/harbour/ChangeLog b/harbour/ChangeLog index e35f261c84..41d02574d8 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,25 @@ The license applies to all entries newer than 2009-04-28. */ +2011-02-28 17:09 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) + * contrib/hbxbp/xbplistbox.prg + * contrib/hbxbp/xbptabpage.prg + * contrib/hbxbp/xbptreeview.prg + * contrib/hbxbp/xbpgeneric.prg + * contrib/hbqt/qtcore/hbqt_pointer.cpp + * contrib/hbqt/qtcore/hbqtcore.hbx + * contrib/hbide/idesaveload.prg + * contrib/hbide/ideharbourhelp.prg + * contrib/hbide/ideeditor.prg + * contrib/hbide/idebrowse.prg + * contrib/hbide/idedocks.prg + * Renamed HBQT_ISEQUALGCQTPOINTER() to HBQT_ISEQUAL(). + [ as a personal note I don't get how two different + .prg level objects can have the same QT object pointer + associated with them. IOW the most natural solution + would be to use ( oObj1 == oObj2 ) expression on + .prg level. ] + 2011-02-28 16:31 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * contrib/hbqt/qtgui/hbqt_init.cpp * contrib/hbqt/qtgui/hbqt_hbqgraphicsitem.cpp diff --git a/harbour/contrib/hbide/idebrowse.prg b/harbour/contrib/hbide/idebrowse.prg index effc18cec2..b34a07ecd0 100644 --- a/harbour/contrib/hbide/idebrowse.prg +++ b/harbour/contrib/hbide/idebrowse.prg @@ -1402,7 +1402,7 @@ METHOD IdeBrowsePanel:execEvent( cEvent, p ) SWITCH cEvent CASE "mdiArea_subWindowActivated" IF ! empty( ::aBrowsers ) - IF ( n := ascan( ::aBrowsers, {|e_| hbqt_IsEqualGcQtPointer( e_[ SUB_WINDOW ], p ) } ) ) > 0 + IF ( n := ascan( ::aBrowsers, {|e_| hbqt_IsEqual( e_[ SUB_WINDOW ], p ) } ) ) > 0 oBrw := ::aBrowsers[ n, SUB_BROWSER ] oBrw:configure() diff --git a/harbour/contrib/hbide/idedocks.prg b/harbour/contrib/hbide/idedocks.prg index 72a2094687..ed8d7517d0 100644 --- a/harbour/contrib/hbide/idedocks.prg +++ b/harbour/contrib/hbide/idedocks.prg @@ -635,7 +635,7 @@ HB_TRACE( HB_TR_DEBUG, "projectTree_dropEvent" ) CASE "x_mdiArea_subWindowActivated" IF ! empty( ::oIde:aMdies ) - IF ( n := ascan( ::oIde:aMdies, {|e| hbqt_IsEqualGcQtPointer( e, p ) } ) ) > 0 + IF ( n := ascan( ::oIde:aMdies, {|e| hbqt_IsEqual( e, p ) } ) ) > 0 ::setView( ::oIde:aMdies[ n ]:objectName() ) @@ -1963,4 +1963,3 @@ METHOD IdeDocks:buildFormatWidget() RETURN Self /*----------------------------------------------------------------------*/ - diff --git a/harbour/contrib/hbide/ideeditor.prg b/harbour/contrib/hbide/ideeditor.prg index a7993cf88a..f62cdbee53 100644 --- a/harbour/contrib/hbide/ideeditor.prg +++ b/harbour/contrib/hbide/ideeditor.prg @@ -436,7 +436,7 @@ METHOD IdeEditsManager:getTabCurrent() IF !empty( ::qTabWidget ) qTab := ::qTabWidget:currentWidget() - nTab := ascan( ::aTabs, {|e_| hbqt_IsEqualGcQtPointer( e_[ TAB_OTAB ]:oWidget, qTab ) } ) + nTab := ascan( ::aTabs, {|e_| hbqt_IsEqual( e_[ TAB_OTAB ]:oWidget, qTab ) } ) ENDIF RETURN nTab @@ -447,7 +447,7 @@ METHOD IdeEditsManager:getDocumentCurrent() IF !empty( ::qTabWidget ) .AND. ::qTabWidget:count() > 0 qTab := ::qTabWidget:currentWidget() - IF ( nTab := ascan( ::aTabs, {|e_| hbqt_IsEqualGcQtPointer( e_[ TAB_OTAB ]:oWidget, qTab ) } ) ) > 0 + IF ( nTab := ascan( ::aTabs, {|e_| hbqt_IsEqual( e_[ TAB_OTAB ]:oWidget, qTab ) } ) ) > 0 RETURN ::aTabs[ nTab, TAB_OEDITOR ]:document() ENDIF ENDIF @@ -461,7 +461,7 @@ METHOD IdeEditsManager:getEditObjectCurrent() IF !empty( ::qTabWidget ) .AND. ::qTabWidget:count() > 0 qTab := ::qTabWidget:currentWidget() - IF ( nTab := ascan( ::aTabs, {|e_| hbqt_IsEqualGcQtPointer( e_[ TAB_OTAB ]:oWidget, qTab ) } ) ) > 0 + IF ( nTab := ascan( ::aTabs, {|e_| hbqt_IsEqual( e_[ TAB_OTAB ]:oWidget, qTab ) } ) ) > 0 RETURN ::aTabs[ nTab, TAB_OEDITOR ]:qCoEdit ENDIF ENDIF @@ -475,7 +475,7 @@ METHOD IdeEditsManager:getEditCurrent() IF !empty( ::qTabWidget ) .AND. ::qTabWidget:count() > 0 qTab := ::qTabWidget:currentWidget() - IF ( nTab := ascan( ::aTabs, {|e_| hbqt_IsEqualGcQtPointer( e_[ TAB_OTAB ]:oWidget, qTab ) } ) ) > 0 + IF ( nTab := ascan( ::aTabs, {|e_| hbqt_IsEqual( e_[ TAB_OTAB ]:oWidget, qTab ) } ) ) > 0 RETURN ::aTabs[ nTab, TAB_OEDITOR ]:qCqEdit ENDIF ENDIF @@ -489,7 +489,7 @@ METHOD IdeEditsManager:getEditorCurrent() IF !empty( ::qTabWidget ) .AND. ::qTabWidget:count() > 0 qTab := ::qTabWidget:currentWidget() - IF ( nTab := ascan( ::aTabs, {|e_| hbqt_IsEqualGcQtPointer( e_[ TAB_OTAB ]:oWidget, qTab ) } ) ) > 0 + IF ( nTab := ascan( ::aTabs, {|e_| hbqt_IsEqual( e_[ TAB_OTAB ]:oWidget, qTab ) } ) ) > 0 RETURN ::aTabs[ nTab, TAB_OEDITOR ] ENDIF ENDIF @@ -504,7 +504,7 @@ METHOD IdeEditsManager:getEditorByIndex( nIndex ) /* Index is 0 based */ IF hb_isNumeric( nIndex ) .AND. nIndex >= 0 .AND. nIndex < ::qTabWidget:count() qTab := ::qTabWidget:widget( nIndex ) FOR EACH a_ IN ::aTabs - IF !empty( a_[ TAB_OTAB ] ) .AND. hbqt_IsEqualGcQtPointer( a_[ TAB_OTAB ]:oWidget, qTab ) + IF !empty( a_[ TAB_OTAB ] ) .AND. hbqt_IsEqual( a_[ TAB_OTAB ]:oWidget, qTab ) RETURN ::aTabs[ a_:__enumIndex(), TAB_OEDITOR ] ENDIF NEXT diff --git a/harbour/contrib/hbide/ideharbourhelp.prg b/harbour/contrib/hbide/ideharbourhelp.prg index 97c593e337..16b2ec3703 100644 --- a/harbour/contrib/hbide/ideharbourhelp.prg +++ b/harbour/contrib/hbide/ideharbourhelp.prg @@ -518,7 +518,7 @@ METHOD IdeHarbourHelp:execEvent( nMode, p, p1 ) CASE "treeCategory_itemSelectionChanged" qTWItem := ::oUI:q_treeCategory:currentItem() - n := ascan( ::aCategory, {|e_| hbqt_IsEqualGcQtPointer( e_[ 5 ], qTWItem ) } ) + n := ascan( ::aCategory, {|e_| hbqt_IsEqual( e_[ 5 ], qTWItem ) } ) IF n > 0 IF ::aCategory[ n, 5 ]:childCount() == 0 ::oUI:q_treeDoc:setCurrentItem( ::aCategory[ n, 4 ], 0 ) diff --git a/harbour/contrib/hbide/idesaveload.prg b/harbour/contrib/hbide/idesaveload.prg index f04e65ff72..bcfd81ca3d 100644 --- a/harbour/contrib/hbide/idesaveload.prg +++ b/harbour/contrib/hbide/idesaveload.prg @@ -349,7 +349,7 @@ METHOD IdeINI:save( cHbideIni ) nTabs := ::oIde:qTabWidget:count() FOR n := 1 TO nTabs pTab := ::oIde:qTabWidget:widget( n - 1 ) - nTab := ascan( ::oIde:aTabs, {|e_| hbqt_IsEqualGcQtPointer( e_[ 1 ]:oWidget, pTab ) } ) + nTab := ascan( ::oIde:aTabs, {|e_| hbqt_IsEqual( e_[ 1 ]:oWidget, pTab ) } ) oEdit := ::oIde:aTabs[ nTab, TAB_OEDITOR ] IF !Empty( oEdit:sourceFile ) .AND. !( ".ppo" == lower( oEdit:cExt ) ) diff --git a/harbour/contrib/hbqt/qtcore/hbqt_pointer.cpp b/harbour/contrib/hbqt/qtcore/hbqt_pointer.cpp index f059d13887..3b56fe3b22 100644 --- a/harbour/contrib/hbqt/qtcore/hbqt_pointer.cpp +++ b/harbour/contrib/hbqt/qtcore/hbqt_pointer.cpp @@ -309,7 +309,7 @@ HB_FUNC( HBQT_FINDCHILD ) hb_retptr( object->findChild< QObject * >( hbqt_par_QString( 2 ) ) ); } -HB_FUNC( HBQT_ISEQUALGCQTPOINTER ) +HB_FUNC( HBQT_ISEQUAL ) { hb_retl( hbqt_pPtrFromObj( 1 ) == hbqt_pPtrFromObj( 2 ) ); } diff --git a/harbour/contrib/hbqt/qtcore/hbqtcore.hbx b/harbour/contrib/hbqt/qtcore/hbqtcore.hbx index 7596ce6d89..28b76ad32e 100644 --- a/harbour/contrib/hbqt/qtcore/hbqtcore.hbx +++ b/harbour/contrib/hbqt/qtcore/hbqtcore.hbx @@ -35,7 +35,7 @@ DYNAMIC HBQSTRING DYNAMIC HBQSTRINGFROMPOINTER DYNAMIC HBQTOBJECTHANDLER DYNAMIC HBQT_FINDCHILD -DYNAMIC HBQT_ISEQUALGCQTPOINTER +DYNAMIC HBQT_ISEQUAL DYNAMIC HBQT_ISOBJECT DYNAMIC HB_HBQEVENTS DYNAMIC HB_HBQSLOTS diff --git a/harbour/contrib/hbxbp/xbpgeneric.prg b/harbour/contrib/hbxbp/xbpgeneric.prg index 75f2e1f028..9fd1a694a4 100644 --- a/harbour/contrib/hbxbp/xbpgeneric.prg +++ b/harbour/contrib/hbxbp/xbpgeneric.prg @@ -506,40 +506,39 @@ FUNCTION ConfirmBox( oOwner, cMessage, cTitle, nButtons, nStyle, nStartBtn ) SWITCH nButtons CASE XBPMB_OK - nRet := iif( hbqt_IsEqualGcQtPointer( qClk, qOk ), XBPMB_RET_OK, -1 ) + nRet := iif( hbqt_IsEqual( qClk, qOk ), XBPMB_RET_OK, -1 ) EXIT CASE XBPMB_OKCANCEL - nRet := iif( hbqt_IsEqualGcQtPointer( qClk, qOk ), XBPMB_RET_OK, XBPMB_RET_CANCEL ) + nRet := iif( hbqt_IsEqual( qClk, qOk ), XBPMB_RET_OK, XBPMB_RET_CANCEL ) EXIT CASE XBPMB_RETRYCANCEL - nRet := iif( hbqt_IsEqualGcQtPointer( qClk, qRetry ), XBPMB_RET_RETRY, XBPMB_RET_CANCEL ) + nRet := iif( hbqt_IsEqual( qClk, qRetry ), XBPMB_RET_RETRY, XBPMB_RET_CANCEL ) EXIT CASE XBPMB_ABORTRETRYIGNORE - nRet := iif( hbqt_IsEqualGcQtPointer( qClk, qAbort ), XBPMB_RET_ABORT, ; - iif( hbqt_IsEqualGcQtPointer( qClk, qRetry ), XBPMB_RET_RETRY, XBPMB_RET_CANCEL ) ) + nRet := iif( hbqt_IsEqual( qClk, qAbort ), XBPMB_RET_ABORT, ; + iif( hbqt_IsEqual( qClk, qRetry ), XBPMB_RET_RETRY, XBPMB_RET_CANCEL ) ) EXIT CASE XBPMB_YESNO - nRet := iif( hbqt_IsEqualGcQtPointer( qClk, qYes ), XBPMB_RET_YES, XBPMB_RET_NO ) + nRet := iif( hbqt_IsEqual( qClk, qYes ), XBPMB_RET_YES, XBPMB_RET_NO ) EXIT CASE XBPMB_YESNOCANCEL - nRet := iif( hbqt_IsEqualGcQtPointer( qClk, qYes ), XBPMB_RET_YES, ; - iif( hbqt_IsEqualGcQtPointer( qClk, qNo ), XBPMB_RET_NO, XBPMB_RET_CANCEL ) ) + nRet := iif( hbqt_IsEqual( qClk, qYes ), XBPMB_RET_YES, ; + iif( hbqt_IsEqual( qClk, qNo ), XBPMB_RET_NO, XBPMB_RET_CANCEL ) ) EXIT CASE XBPMB_CANCEL - nRet := iif( hbqt_IsEqualGcQtPointer( qClk, qCancel ), XBPMB_RET_CANCEL, -1 ) + nRet := iif( hbqt_IsEqual( qClk, qCancel ), XBPMB_RET_CANCEL, -1 ) EXIT CASE XBPMB_ENTER - nRet := iif( hbqt_IsEqualGcQtPointer( qClk, qEnter ), XBPMB_RET_ENTER, -1 ) + nRet := iif( hbqt_IsEqual( qClk, qEnter ), XBPMB_RET_ENTER, -1 ) EXIT CASE XBPMB_ENTERCANCEL - nRet := iif( hbqt_IsEqualGcQtPointer( qClk, qEnter ), XBPMB_RET_ENTER, XBPMB_RET_CANCEL ) + nRet := iif( hbqt_IsEqual( qClk, qEnter ), XBPMB_RET_ENTER, XBPMB_RET_CANCEL ) EXIT CASE XBPMB_HELP - nRet := iif( hbqt_IsEqualGcQtPointer( qClk, qHelp ), XBPMB_RET_OK, -1 ) + nRet := iif( hbqt_IsEqual( qClk, qHelp ), XBPMB_RET_OK, -1 ) EXIT ENDSWITCH RETURN nRet /*----------------------------------------------------------------------*/ - diff --git a/harbour/contrib/hbxbp/xbplistbox.prg b/harbour/contrib/hbxbp/xbplistbox.prg index f1034d4102..a42efc2a37 100644 --- a/harbour/contrib/hbxbp/xbplistbox.prg +++ b/harbour/contrib/hbxbp/xbplistbox.prg @@ -264,7 +264,7 @@ METHOD XbpListBox:toggleSelected( nIndex ) METHOD XbpListBox:getItemIndex( pItm ) - RETURN ascan( ::aItems, {|o| hbqt_IsEqualGcQtPointer( o, pItm ) } ) + RETURN ascan( ::aItems, {|o| hbqt_IsEqual( o, pItm ) } ) /*----------------------------------------------------------------------*/ @@ -275,7 +275,7 @@ METHOD XbpListBox:execSlot( cSlot, p ) IF hb_isBlock( ::hb_contextMenu ) qPos := p IF ( qItm := ::oWidget:itemAt( qPos ) ):hasValidPointer() - IF ( n := ascan( ::aItems, {|o| hbqt_IsEqualGcQtPointer( o, qItm ) } ) ) > 0 + IF ( n := ascan( ::aItems, {|o| hbqt_IsEqual( o, qItm ) } ) ) > 0 qPt := ::oWidget:mapToGlobal( QPoint( p ) ) eval( ::hb_contextMenu, { qPt:x(), qPt:y() }, NIL, ::aItems[ n ] ) ENDIF diff --git a/harbour/contrib/hbxbp/xbptabpage.prg b/harbour/contrib/hbxbp/xbptabpage.prg index 5356decd0f..d57bebef1c 100644 --- a/harbour/contrib/hbxbp/xbptabpage.prg +++ b/harbour/contrib/hbxbp/xbptabpage.prg @@ -338,7 +338,7 @@ METHOD XbpTabWidget:execSlot( cSlot, p ) qPoint := ::oWidget:mapToGlobal( p ) qWidget := QApplication():widgetAt( qPoint ) - iIndex := ascan( ::aChildren, {|o| hbqt_IsEqualGcQtPointer( o:oWidget, qWidget ) } ) - 1 + iIndex := ascan( ::aChildren, {|o| hbqt_IsEqual( o:oWidget, qWidget ) } ) - 1 ELSE iIndex := p ENDIF @@ -346,7 +346,7 @@ METHOD XbpTabWidget:execSlot( cSlot, p ) IF !empty( ::aChildren ) .and. iIndex >= 0 .and. iIndex < len( ::aChildren ) qTab := ::oWidget:widget( iIndex ) - IF ( nIndex := ascan( ::aChildren, {|o| hbqt_IsEqualGcQtPointer( o:oWidget, qTab ) } ) ) > 0 + IF ( nIndex := ascan( ::aChildren, {|o| hbqt_IsEqual( o:oWidget, qTab ) } ) ) > 0 oTab := ::aChildren[ nIndex ] DO CASE diff --git a/harbour/contrib/hbxbp/xbptreeview.prg b/harbour/contrib/hbxbp/xbptreeview.prg index 5a33c5efd9..9f1c7bdd22 100644 --- a/harbour/contrib/hbxbp/xbptreeview.prg +++ b/harbour/contrib/hbxbp/xbptreeview.prg @@ -187,7 +187,7 @@ METHOD XbpTreeView:hbCreateFromQtPtr( oParent, oOwner, aPos, aSize, aPresParams, METHOD XbpTreeView:execSlot( cSlot, p ) LOCAL n, qPt, qItem, oItem, qPos - IF ( n := ascan( ::aItems, {|o| iif( empty( o ), .f., hbqt_IsEqualGcQtPointer( o:oWidget, p ) ) } ) ) > 0 + IF ( n := ascan( ::aItems, {|o| iif( empty( o ), .f., hbqt_IsEqual( o:oWidget, p ) ) } ) ) > 0 oItem := ::aItems[ n ] ENDIF @@ -206,7 +206,7 @@ METHOD XbpTreeView:execSlot( cSlot, p ) IF hb_isBlock( ::hb_contextMenu ) qPos := QPoint( p ) IF ( qItem := ::oWidget:itemAt( qPos ) ):hasValidPointer() - IF ( n := ascan( ::aItems, {|o| hbqt_IsEqualGcQtPointer( o:oWidget, qItem ) } ) ) > 0 + IF ( n := ascan( ::aItems, {|o| hbqt_IsEqual( o:oWidget, qItem ) } ) ) > 0 qPt := ::oWidget:mapToGlobal( QPoint( p ) ) eval( ::hb_contextMenu, { qPt:x(), qPt:y() }, NIL, ::aItems[ n ] ) ENDIF