diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 09dd198af3..f3eb641619 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,10 +16,51 @@ The license applies to all entries newer than 2009-04-28. */ +2011-04-16 23:04 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * contrib/hbxbp/xbpfiledialog.prg + * contrib/hbxbp/tests/xbpqtc.prg + * contrib/hbxbp/xbpbrowse.prg + * contrib/hbxbp/xbpgeneric.prg + * contrib/hbqt/gtqtc/gtqtc.cpp + * contrib/hbqt/qtcore/hbqt_pointer.cpp + * contrib/hbqt/qtcore/qth/HBQSlots.qth + * contrib/hbqt/qtcore/qth/HBQEvents.qth + * contrib/hbqt/qtcore/hbqt_hbqslots.cpp + * contrib/hbqt/tests/demoqt.prg + * contrib/hbide/hbqreportsmanager.prg + * contrib/hbide/idemain.prg + * contrib/hbide/ideeditor.prg + ! HB_TR_ALWAYS -> HB_TR_DEBUG. + Neverending battle with abused debugging facilities continue. + Please _never_ use HB_TR_ALWAYS in committed code, not even + in commented lines because it's confusing, it trashes console + on *nix systems, it creates a rubbish/unfinished feel for + anyone trying out these components and it creates unnecessary + noise on lists in the form of problem reports. + For those few developers who actually need these lines: + _Set HB_TR_LEVEL on your development machine_ to HB_TR_DEBUG + to get those debug lines!! + Also: Never use HB_TR_ALWAYS as a mean of generating + test output meant for users, I've found some of these in + tests/ .prgs. Use something native instead, like + a text box, msgbox, log file, OutStd(), QOut(), etc. + If this won't change in the future, the best will be to + simply remove HB_TR_ALWAYS from hbtrace.ch, thus making + it unsuited for purposes it wasn't designed for. + Thank you. + + * config/win/mingw.mk + + Added commented -Wextra warning option which will be particularly + interesting with the release of gcc 4.6, since they've finally + implemented the last useful feature which was unique to BCC: + -Wunused-but-set-variable and -Wunused-but-set-parameter + See: + http://gcc.gnu.org/gcc-4.6/changes.html + 2011-04-16 11:59 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) * contrib/hbide/ideactions.prg * contrib/hbide/idedocks.prg - ! Adopted: to comply with latest hbXBP change where + ! Adopted: to comply with latest hbXBP change where oXbp:setStyleSheet() was made PROTECed method. 2011-04-16 20:32 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) diff --git a/harbour/config/win/mingw.mk b/harbour/config/win/mingw.mk index 3da09c99f0..b21057b0f5 100644 --- a/harbour/config/win/mingw.mk +++ b/harbour/config/win/mingw.mk @@ -35,6 +35,7 @@ endif ifneq ($(HB_BUILD_WARN),no) CFLAGS += -W -Wall + # CFLAGS += -Wextra else CFLAGS += -Wmissing-braces -Wreturn-type -Wformat ifneq ($(HB_BUILD_MODE),cpp) diff --git a/harbour/contrib/hbide/hbqreportsmanager.prg b/harbour/contrib/hbide/hbqreportsmanager.prg index 2590686e51..2cbeee4515 100644 --- a/harbour/contrib/hbide/hbqreportsmanager.prg +++ b/harbour/contrib/hbide/hbqreportsmanager.prg @@ -1555,7 +1555,7 @@ METHOD HbqReportsManager:printPreview( qPrinter ) qList := qInfo:availablePrinters() FOR i := 0 TO qList:size() - 1 qStr := qList:at( i ) -//HB_TRACE( HB_TR_ALWAYS, qList:at( i ), valtype( qList:at( i ) ), qStr:printerName() ) +//HB_TRACE( HB_TR_DEBUG, qList:at( i ), valtype( qList:at( i ) ), qStr:printerName() ) NEXT qPrinter:setOutputFormat( QPrinter_PdfFormat ) qPrinter:setOrientation( ::qScene:orientation() ) @@ -1597,7 +1597,7 @@ METHOD HbqReportsManager:printReport( qPrinter ) qRectF := QRectF( TO_MMS( qRectF:x() ), TO_MMS( qRectF:y() ), TO_MMS( qRectF:width() ), TO_MMS( qRectF:height() ) ) qT := oHqrObject:transform() -//HB_TRACE( HB_TR_ALWAYS, qT:m11(), qT:m12(), qT:m13(), qT:m21(), qT:m22(), qT:m23(), qT:m31(), qT:m32(), qT:m33() ) +//HB_TRACE( HB_TR_DEBUG, qT:m11(), qT:m12(), qT:m13(), qT:m21(), qT:m22(), qT:m23(), qT:m31(), qT:m32(), qT:m33() ) qT:translate( 0,0 ) qPainter:resetMatrix() qPainter:setWorldTransform( qT ) diff --git a/harbour/contrib/hbide/ideeditor.prg b/harbour/contrib/hbide/ideeditor.prg index 272a65bdd0..bd9b06b78a 100644 --- a/harbour/contrib/hbide/ideeditor.prg +++ b/harbour/contrib/hbide/ideeditor.prg @@ -1430,7 +1430,7 @@ METHOD IdeEditor:split( nOrient, oEditP ) METHOD IdeEditor:destroy() LOCAL n, oEdit -HB_TRACE( HB_TR_ALWAYS, "..........................................................IdeEditor:destroy()", 0 ) +HB_TRACE( HB_TR_DEBUG, "..........................................................IdeEditor:destroy()", 0 ) ::oEdit:qEdit:disconnect( "updateRequest(QRect,int)" ) IF !empty( ::qTimerSave ) @@ -1480,7 +1480,7 @@ HB_TRACE( HB_TR_ALWAYS, "....................................................... ::oIde:lDockRVisible := .f. ENDIF ENDIF -HB_TRACE( HB_TR_ALWAYS, "................................................................IdeEditor:destroy()", 1 ) +HB_TRACE( HB_TR_DEBUG, "................................................................IdeEditor:destroy()", 1 ) RETURN Self /*----------------------------------------------------------------------*/ diff --git a/harbour/contrib/hbide/idemain.prg b/harbour/contrib/hbide/idemain.prg index dbc9b5c6e2..670218b4de 100644 --- a/harbour/contrib/hbide/idemain.prg +++ b/harbour/contrib/hbide/idemain.prg @@ -369,9 +369,9 @@ METHOD HbIde:destroy() LOCAL xTmp /* Very important - destroy resources */ - HB_TRACE( HB_TR_ALWAYS, "------------------------------------------------------" ) - HB_TRACE( HB_TR_ALWAYS, "Before ::oIde:destroy()", memory( 1001 ) ) - HB_TRACE( HB_TR_ALWAYS, " " ) + HB_TRACE( HB_TR_DEBUG, "------------------------------------------------------" ) + HB_TRACE( HB_TR_DEBUG, "Before ::oIde:destroy()", memory( 1001 ) ) + HB_TRACE( HB_TR_DEBUG, " " ) ::oSBar := NIL ::oMenu := NIL @@ -516,9 +516,9 @@ METHOD HbIde:destroy() ::qCompModel := NIL ::qProtoList := NIL - HB_TRACE( HB_TR_ALWAYS, " " ) - HB_TRACE( HB_TR_ALWAYS, "After ::oIde:destroy()", memory( 1001 ) ) - HB_TRACE( HB_TR_ALWAYS, "======================================================" ) + HB_TRACE( HB_TR_DEBUG, " " ) + HB_TRACE( HB_TR_DEBUG, "After ::oIde:destroy()", memory( 1001 ) ) + HB_TRACE( HB_TR_DEBUG, "======================================================" ) RETURN self @@ -1198,7 +1198,7 @@ METHOD HbIde:manageFocusInEditor() LOCAL qEdit IF !empty( qEdit := ::oEM:getEditCurrent() ) -// HB_TRACE( HB_TR_ALWAYS, 1000001 ) +// HB_TRACE( HB_TR_DEBUG, 1000001 ) qEdit:setFocus( 0 ) ENDIF diff --git a/harbour/contrib/hbqt/gtqtc/gtqtc.cpp b/harbour/contrib/hbqt/gtqtc/gtqtc.cpp index 7fb346fb87..52f709fe39 100644 --- a/harbour/contrib/hbqt/gtqtc/gtqtc.cpp +++ b/harbour/contrib/hbqt/gtqtc/gtqtc.cpp @@ -709,7 +709,7 @@ static int hb_gt_wvt_ReadKey( PHB_GT pGT, int iEventMask ) int c = 0; bool fKey = HB_FALSE; - //HB_TRACE( HB_TR_ALWAYS, ( "hb_gt_wvt_ReadKey(%p,%d)", pGT, iEventMask ) ); + //HB_TRACE( HB_TR_DEBUG, ( "hb_gt_wvt_ReadKey(%p,%d)", pGT, iEventMask ) ); HB_SYMBOL_UNUSED( iEventMask ); /* we ignore the eventmask! */ pWVT = HB_GTWVT_GET( pGT ); @@ -2759,5 +2759,3 @@ static LRESULT CALLBACK hb_gt_wvt_WndProc( HWND hWnd, UINT message, WPARAM wPara } #endif /*----------------------------------------------------------------------*/ - - diff --git a/harbour/contrib/hbqt/qtcore/hbqt_hbqslots.cpp b/harbour/contrib/hbqt/qtcore/hbqt_hbqslots.cpp index 09ab0521db..5a8f1f6213 100644 --- a/harbour/contrib/hbqt/qtcore/hbqt_hbqslots.cpp +++ b/harbour/contrib/hbqt/qtcore/hbqt_hbqslots.cpp @@ -330,7 +330,7 @@ HB_FUNC( __HBQT_SLOTS_DISCONNECT ) if( t_slots->listBlock.at( i - 1 ) != NULL ) { - //HB_TRACE( HB_TR_ALWAYS, ( " __HBQT_SLOTS_DISCONNECT %d", i ) ); + //HB_TRACE( HB_TR_DEBUG, ( " __HBQT_SLOTS_DISCONNECT %d", i ) ); hb_itemRelease( t_slots->listBlock.at( i - 1 ) ); t_slots->listBlock[ i - 1 ] = NULL; } diff --git a/harbour/contrib/hbqt/qtcore/hbqt_pointer.cpp b/harbour/contrib/hbqt/qtcore/hbqt_pointer.cpp index 3a89ba9bfb..94004b3dfd 100644 --- a/harbour/contrib/hbqt/qtcore/hbqt_pointer.cpp +++ b/harbour/contrib/hbqt/qtcore/hbqt_pointer.cpp @@ -458,7 +458,7 @@ HB_FUNC( HBQT_ISEQUAL ) HB_FUNC( __HBQT_ERROR ) { - HB_TRACE( HB_TR_ALWAYS, ( "In __HBQT_ERROR" )); + HB_TRACE( HB_TR_DEBUG, ( "In __HBQT_ERROR" )); hb_errRT_BASE( EG_ARG, 9999, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); } diff --git a/harbour/contrib/hbqt/qtcore/qth/HBQEvents.qth b/harbour/contrib/hbqt/qtcore/qth/HBQEvents.qth index e918cc7fa3..325139ebda 100644 --- a/harbour/contrib/hbqt/qtcore/qth/HBQEvents.qth +++ b/harbour/contrib/hbqt/qtcore/qth/HBQEvents.qth @@ -42,7 +42,7 @@ HB_FUNC( QT_HBQEVENTS ) static HB_GARBAGE_FUNC( hbqt_gcMark_HBQEvents ) { HBQT_GC_T_HBQEvents * p = ( HBQT_GC_T_HBQEvents * ) Cargo; - //HB_TRACE( HB_TR_ALWAYS, ( "hbqt_gcMark_HBQEvents cargo=%p", (void*)Cargo ) ); + //HB_TRACE( HB_TR_DEBUG, ( "hbqt_gcMark_HBQEvents cargo=%p", (void*)Cargo ) ); if( p ) { if( p->ph ) @@ -52,11 +52,11 @@ static HB_GARBAGE_FUNC( hbqt_gcMark_HBQEvents ) for( i = t_slots->listBlock.size() - 1; i >= 0 ; i-- ) { - //HB_TRACE( HB_TR_ALWAYS, ( "hbqt_gcMark_HBQEvents marking %d", i ) ); + //HB_TRACE( HB_TR_DEBUG, ( "hbqt_gcMark_HBQEvents marking %d", i ) ); if( t_slots->listBlock[ i ] != NULL ) { hb_gcMark( t_slots->listBlock[ i ] ); - //HB_TRACE( HB_TR_ALWAYS, ( " MARKED %d ptr=%p", i, (void *)t_slots->listBlock.at( i ) ) ); + //HB_TRACE( HB_TR_DEBUG, ( " MARKED %d ptr=%p", i, (void *)t_slots->listBlock.at( i ) ) ); } } } diff --git a/harbour/contrib/hbqt/qtcore/qth/HBQSlots.qth b/harbour/contrib/hbqt/qtcore/qth/HBQSlots.qth index 420daa8015..a5ec952294 100644 --- a/harbour/contrib/hbqt/qtcore/qth/HBQSlots.qth +++ b/harbour/contrib/hbqt/qtcore/qth/HBQSlots.qth @@ -31,7 +31,7 @@ New = HB_GARBAGE_FUNC( hbqt_gcMark_HBQSlots ) { HBQT_GC_T_HBQSlots * p = ( HBQT_GC_T_HBQSlots * ) Cargo; - //HB_TRACE( HB_TR_ALWAYS, ( "hbqt_gcMark_HBQSlots cargo=%p", Cargo ) ); + //HB_TRACE( HB_TR_DEBUG, ( "hbqt_gcMark_HBQSlots cargo=%p", Cargo ) ); if( p ) { if( p->ph ) @@ -41,11 +41,11 @@ HB_GARBAGE_FUNC( hbqt_gcMark_HBQSlots ) for( i = t_slots->listBlock.size() - 1; i >= 0 ; i-- ) { - //HB_TRACE( HB_TR_ALWAYS, ( "hbqt_gcMark_HBQSlots marking %d", i ) ); + //HB_TRACE( HB_TR_DEBUG, ( "hbqt_gcMark_HBQSlots marking %d", i ) ); if( t_slots->listBlock[ i ] != NULL ) { hb_gcMark( t_slots->listBlock[ i ] ); - //HB_TRACE( HB_TR_ALWAYS, ( " MARKED %d ptr=%p", i, (void *)t_slots->listBlock.at( i ) ) ); + //HB_TRACE( HB_TR_DEBUG, ( " MARKED %d ptr=%p", i, (void *)t_slots->listBlock.at( i ) ) ); } } } diff --git a/harbour/contrib/hbqt/tests/demoqt.prg b/harbour/contrib/hbqt/tests/demoqt.prg index a0d6409935..1c4343c736 100644 --- a/harbour/contrib/hbqt/tests/demoqt.prg +++ b/harbour/contrib/hbqt/tests/demoqt.prg @@ -78,7 +78,7 @@ STATIC oSys, oMenuSys, oActShow, oActHide /*----------------------------------------------------------------------*/ FUNCTION My_Events( e ) - HB_TRACE( HB_TR_ALWAYS, "Key Pressed", e:key() ) + HB_TRACE( HB_TR_DEBUG, "Key Pressed", e:key() ) RETURN nil /*----------------------------------------------------------------------*/ @@ -391,7 +391,7 @@ STATIC FUNCTION Build_TreeView( oWnd ) oTV := QTreeView( oWnd ) oTV:setMouseTracking( .t. ) -* oTV:connect( "hovered()", {|i| HB_TRACE( HB_TR_ALWAYS, ( "oTV:hovered" ) } ) +* oTV:connect( "hovered()", {|i| HB_TRACE( HB_TR_DEBUG, ( "oTV:hovered" ) } ) oDirModel := QDirModel() oTV:setModel( oDirModel ) oTV:move( 5, 7 ) @@ -407,7 +407,7 @@ STATIC FUNCTION Build_ListBox( oWnd, aPos, aSize ) oListBox := QListView( oWnd ) oListBox:setMouseTracking( .t. ) -* oListBox:connect( "hovered()", {|i| HB_TRACE( HB_TR_ALWAYS, ( "oListBox:hovered" ) } ) +* oListBox:connect( "hovered()", {|i| HB_TRACE( HB_TR_DEBUG, ( "oListBox:hovered" ) } ) oStrList := QStringList() diff --git a/harbour/contrib/hbxbp/tests/xbpqtc.prg b/harbour/contrib/hbxbp/tests/xbpqtc.prg index 8930cf72fa..709fcd051b 100644 --- a/harbour/contrib/hbxbp/tests/xbpqtc.prg +++ b/harbour/contrib/hbxbp/tests/xbpqtc.prg @@ -123,7 +123,7 @@ PROCEDURE BuildADialog() IF ( nEvent == xbeP_Close ) .OR. ( nEvent == xbeP_Keyboard .and. mp1 == xbeK_ESC ) EXIT ENDIF - HB_TRACE( HB_TR_ALWAYS, nEvent, valtype( oXbp ), iif( hb_isObject( oXbp ), oXbp:title, "Nothing" ) ) + HB_TRACE( HB_TR_DEBUG, nEvent, valtype( oXbp ), iif( hb_isObject( oXbp ), oXbp:title, "Nothing" ) ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO @@ -599,4 +599,3 @@ STATIC FUNCTION RGB( r, g, b ) RETURN GraMakeRGBColor( { b,g,r } ) /* a bug in Qt */ /*----------------------------------------------------------------------*/ - diff --git a/harbour/contrib/hbxbp/xbpbrowse.prg b/harbour/contrib/hbxbp/xbpbrowse.prg index 52e1b7ae00..9f692b24e0 100644 --- a/harbour/contrib/hbxbp/xbpbrowse.prg +++ b/harbour/contrib/hbxbp/xbpbrowse.prg @@ -975,7 +975,7 @@ METHOD XbpBrowse:manageCommitData( qWidget ) LOCAL oCol := ::columns[ ::colPos ] LOCAL cTyp := valtype( eval( oCol:block ) ) - HB_TRACE( HB_TR_ALWAYS, cTxt ) + HB_TRACE( HB_TR_DEBUG, cTxt ) DO CASE CASE cTyp == "C" oCol:setData( cTxt ) @@ -994,7 +994,7 @@ METHOD XbpBrowse:manageCommitData( qWidget ) METHOD XbpBrowse:manageEditorClosed( pWidget, nHint ) pWidget:close() -//HB_TRACE( HB_TR_ALWAYS, nHint, QAbstractItemDelegate_NoHint, QAbstractItemDelegate_SubmitModelCache ) +//HB_TRACE( HB_TR_DEBUG, nHint, QAbstractItemDelegate_NoHint, QAbstractItemDelegate_SubmitModelCache ) DO CASE CASE nHint == QAbstractItemDelegate_NoHint /* 0 RETURN is presses */ diff --git a/harbour/contrib/hbxbp/xbpfiledialog.prg b/harbour/contrib/hbxbp/xbpfiledialog.prg index d237d8d026..8a0ea4ff74 100644 --- a/harbour/contrib/hbxbp/xbpfiledialog.prg +++ b/harbour/contrib/hbxbp/xbpfiledialog.prg @@ -180,14 +180,14 @@ METHOD XbpFileDialog:execSlot( cSlot, p ) /*----------------------------------------------------------------------*/ METHOD XbpFileDialog:_destroy() - HB_TRACE( HB_TR_ALWAYS, "XbpFileDialog:_destroy()" ) + HB_TRACE( HB_TR_DEBUG, "XbpFileDialog:_destroy()" ) RETURN ::destroy() /*----------------------------------------------------------------------*/ METHOD XbpFileDialog:destroy() IF !empty( ::oWidget ) - HB_TRACE( HB_TR_ALWAYS, "XbpFileDialog:destroy()" ) + HB_TRACE( HB_TR_DEBUG, "XbpFileDialog:destroy()" ) ::disconnect() ::xbpWindow:destroy() ENDIF diff --git a/harbour/contrib/hbxbp/xbpgeneric.prg b/harbour/contrib/hbxbp/xbpgeneric.prg index 9eb8d65bd9..7f28606b38 100644 --- a/harbour/contrib/hbxbp/xbpgeneric.prg +++ b/harbour/contrib/hbxbp/xbpgeneric.prg @@ -222,7 +222,7 @@ FUNCTION SetAppEvent( nEvent, mp1, mp2, oXbp ) t_nEventIn := 1 ENDIF -//HB_TRACE( HB_TR_ALWAYS, "SetAppEvent ... ", t_nEventIn, nEvent, oXbp:className(), oXbp:title ) +//HB_TRACE( HB_TR_DEBUG, "SetAppEvent ... ", t_nEventIn, nEvent, oXbp:className(), oXbp:title ) t_events[ t_nEventIn, 1 ] := nEvent t_events[ t_nEventIn, 2 ] := mp1