diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 42f67468c5..e626235d32 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,16 @@ The license applies to all entries newer than 2009-04-28. */ +2012-07-05 01:00 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) + * contrib/hbide/idebrowse.prg + * contrib/hbide/ideconsole.prg + * contrib/hbide/idedocks.prg + ! Fixed: some regressions plus releasing objects no longer + required during execution of HbIDE. + + * contrib/hbqt/gtqtc/gtqtc.cpp + ! Fixed: a regression caused by latest changes i HbQt. + 2012-07-05 00:43 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) + contrib/hbqt/qtopengl + contrib/hbqt/qtopengl/doc diff --git a/harbour/contrib/hbide/idebrowse.prg b/harbour/contrib/hbide/idebrowse.prg index c36b5e36e6..197f55c82b 100644 --- a/harbour/contrib/hbide/idebrowse.prg +++ b/harbour/contrib/hbide/idebrowse.prg @@ -1437,12 +1437,15 @@ METHOD IdeBrowsePanel:destroyBrw( oBrw ) IF ( n := ascan( ::aBrowsers, {|e_| e_[ SUB_BROWSER ] == oBrw } ) ) > 0 oSub := ::aBrowsers[ n, SUB_WINDOW ] + hb_adel( ::aBrowsers, n, .t. ) ::qWidget:removeSubWindow( oSub ) - oBrw:destroy() - oSub := NIL - - hb_adel( ::aBrowsers, n, .t. ) +#if 1 + oSub:setParent( QWidget() ) /* This alone releases all Windows down its hirarchy, right at this line */ + /* Without it GPFing when a single browser was being closed via X button */ +#endif + oBrw:destroy() /* this is almost non-effective */ + oBrw := NIL ENDIF RETURN Self @@ -1651,27 +1654,15 @@ METHOD IdeBrowse:new( oIde, oManager, oPanel, aInfo ) METHOD IdeBrowse:destroy() + IF ::lOpened + ( ::cAlias )->( dbCloseArea() ) + ENDIF + IF !empty( ::qTimer ) ::qTimer:disconnect( "timeout()" ) - ::qTimer := NIL ENDIF - IF ! empty( ::qMdi ) - * ::qMdi:disconnect( "aboutToActivate()" ) - ::qMdi:disconnect( "windowStateChanged(Qt::WindowStates,Qt::WindowStates)" ) - ::qMdi:disconnect( QEvent_Close ) - ENDIF - - IF ! empty( ::oWnd ) - ::qLayout:removeWidget( ::qSplitter ) - ::oWnd:destroy() - ::qForm := NIL - IF ::lOpened - ( ::cAlias )->( dbCloseArea() ) - ENDIF - ::qSplitter := NIL - ::oManager:oCurBrw := NIL - ENDIF + ::QTimer := NIL RETURN Self @@ -1942,7 +1933,7 @@ METHOD IdeBrowse:buildMdiWindow() * ::qMdi:connect( "aboutToActivate()", {|| ::execEvent( "mdiSubWindow_aboutToActivate" ) } ) ::qMdi:connect( "windowStateChanged(Qt::WindowStates,Qt::WindowStates)", ; {|p,p1| ::execEvent( "mdiSubWindow_windowStateChanged", p, p1 ) } ) - ::qMdi:connect( QEvent_Close, {|| ::execEvent( "mdiSubWindow_buttonXclicked" ) } ) + ::qMdi:connect( QEvent_Close, {|oEvent| oEvent:accept(), ::execEvent( "mdiSubWindow_buttonXclicked" ) } ) RETURN Self diff --git a/harbour/contrib/hbide/ideconsole.prg b/harbour/contrib/hbide/ideconsole.prg index 35f24b33b1..38a0f5f642 100644 --- a/harbour/contrib/hbide/ideconsole.prg +++ b/harbour/contrib/hbide/ideconsole.prg @@ -217,7 +217,6 @@ METHOD IdeConsole:new( oIde ) ::oIde := oIde - RETURN Self /*----------------------------------------------------------------------*/ @@ -236,8 +235,13 @@ METHOD IdeConsole:show() LOCAL qRect, qRect1 IF empty( ::oUI ) - ::oMdiArea := QMdiArea():new() - ::oCuiEdDock:oWidget:setWidget( ::oMdiArea ) + IF empty( ::oMdiArea ) + ::oMdiArea := QMdiArea() + ::oMdiArea:setHorizontalScrollBarPolicy( Qt_ScrollBarAlwaysOn ) + ::oMdiArea:setVerticalScrollBarPolicy( Qt_ScrollBarAlwaysOn ) + + ::oCuiEdDock:oWidget:setWidget( ::oMdiArea ) + ENDIF ::oUI := XbpCrt():new( , , { 10,10 }, { 600,480 }, , .t. ) ::oUI:title := "My First CRT" @@ -267,10 +271,10 @@ METHOD IdeConsole:show() BuildScreen() - ::oMdiArea:removeSubWindow( ::oUI:oWidget /*::oMDI*/ ) + ::oMdiArea:removeSubWindow( ::oMDI ) ::oMDI := NIL - ::oUI:destroy() + ::oUI:destroy() ::oUI := NIL ::oCuiEdDock:oWidget:hide() diff --git a/harbour/contrib/hbide/idedocks.prg b/harbour/contrib/hbide/idedocks.prg index 4fec7f651a..3c505016b6 100644 --- a/harbour/contrib/hbide/idedocks.prg +++ b/harbour/contrib/hbide/idedocks.prg @@ -766,7 +766,6 @@ HB_TRACE( HB_TR_DEBUG, "editWidget_dragEnterEvent", 0 ) EXIT CASE "editWidget_dropEvent" -HB_TRACE( HB_TR_DEBUG, "editWidget_dropEvent", 0 ) qMime := p:mimeData() IF qMime:hasUrls() qList := qMime:urls() diff --git a/harbour/contrib/hbqt/gtqtc/gtqtc.cpp b/harbour/contrib/hbqt/gtqtc/gtqtc.cpp index 0b194013c6..9b4dc5b802 100644 --- a/harbour/contrib/hbqt/gtqtc/gtqtc.cpp +++ b/harbour/contrib/hbqt/gtqtc/gtqtc.cpp @@ -1127,14 +1127,19 @@ static HB_BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) break; case HB_GTI_WIDGET: - //pInfo->pResult = hb_itemNew( hbqt_create_objectGC( hbqt_gcAllocate_QMainWindow( pWVT->qWnd, false ), "HB_QMAINWINDOW" ) ); - pInfo->pResult = hbqt_bindSetHbObject( NULL, pWVT->qWnd, "HB_QMAINWINDOW", NULL, HBQT_BIT_QOBJECT ); - + { + PHB_ITEM pItem = hbqt_bindGetHbObject( NULL, pWVT->qWnd, "HB_QMAINWINDOW", NULL, HBQT_BIT_QOBJECT ); + pInfo->pResult = hb_itemNew( pItem ); + hb_itemRelease( pItem ); + } break; case HB_GTI_DRAWINGAREA: - //pInfo->pResult = hb_itemNew( hbqt_create_objectGC( hbqt_gcAllocate_QWidget( pWVT->qWnd->_drawingArea, false ), "HB_QWIDGET" ) ); - pInfo->pResult = hbqt_bindSetHbObject( NULL, pWVT->qWnd->_drawingArea, "HB_QWIDGET", NULL, HBQT_BIT_QOBJECT ); + { + PHB_ITEM pItem = hbqt_bindGetHbObject( NULL, pWVT->qWnd->_drawingArea, "HB_QWIDGET", NULL, HBQT_BIT_QOBJECT ); + pInfo->pResult = hb_itemNew( pItem ); + hb_itemRelease( pItem ); + } break; case HB_GTI_EVENTLOOP: