From 20e61f78a3395c82f75b8697a5fc5e58b6ffbb86 Mon Sep 17 00:00:00 2001 From: Pritpal Bedi Date: Sun, 18 Apr 2010 06:08:21 +0000 Subject: [PATCH] 2010-04-17 23:02 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com) * contrib/hbqt/hbqt_hbslots.cpp % Slots disconnecting QTableWidget were improper, detected through Linux. * contrib/hbqt/THbQtUI.prg ! More cleanup. * contrib/hbide/hbide.prg * contrib/hbide/ideactions.prg * contrib/hbide/ideharbourhelp.prg * contrib/hbide/idemisc.prg * contrib/hbide/idesaveload.prg ! Fixed some artifacts relevant to Linux. --- harbour/ChangeLog | 15 +++++++++++++++ harbour/contrib/hbide/hbide.prg | 4 ++-- harbour/contrib/hbide/ideactions.prg | 6 +++--- harbour/contrib/hbide/ideharbourhelp.prg | 11 ++++------- harbour/contrib/hbide/idemisc.prg | 2 +- harbour/contrib/hbide/idesaveload.prg | 10 +++++----- harbour/contrib/hbqt/THbQtUI.prg | 10 ++-------- harbour/contrib/hbqt/hbqt_hbslots.cpp | 12 ++++++------ 8 files changed, 38 insertions(+), 32 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index b20cc7bdf4..02814ec5f9 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,21 @@ past entries belonging to author(s): Viktor Szakats. */ +2010-04-17 23:02 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com) + * contrib/hbqt/hbqt_hbslots.cpp + % Slots disconnecting QTableWidget were improper, detected + through Linux. + + * contrib/hbqt/THbQtUI.prg + ! More cleanup. + + * contrib/hbide/hbide.prg + * contrib/hbide/ideactions.prg + * contrib/hbide/ideharbourhelp.prg + * contrib/hbide/idemisc.prg + * contrib/hbide/idesaveload.prg + ! Fixed some artifacts relevant to Linux. + 2010-04-17 22:18 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com) * contrib/hbqt/THbQtUI.prg diff --git a/harbour/contrib/hbide/hbide.prg b/harbour/contrib/hbide/hbide.prg index a2a4139bb3..54921bc4fc 100644 --- a/harbour/contrib/hbide/hbide.prg +++ b/harbour/contrib/hbide/hbide.prg @@ -558,7 +558,7 @@ HB_TRACE( HB_TR_ALWAYS, "HbIde:create( cProjIni )", "#Params=" ) HB_TRACE( HB_TR_ALWAYS, "======================================================" ) HB_TRACE( HB_TR_ALWAYS, "Before ::oDlg:destroy()", memory( 1001 ) ) HB_TRACE( HB_TR_ALWAYS, " " ) - +#if 1 ::oTM:destroy() ::oSK:destroy() ::oSC:destroy() @@ -579,7 +579,7 @@ HB_TRACE( HB_TR_ALWAYS, "HbIde:create( cProjIni )", "#Params=" ) ::oFont := NIL qSplash := NIL - +#endif HB_TRACE( HB_TR_ALWAYS, " " ) HB_TRACE( HB_TR_ALWAYS, "After ::oDlg:destroy()", memory( 1001 ) ) HB_TRACE( HB_TR_ALWAYS, "======================================================" ) diff --git a/harbour/contrib/hbide/ideactions.prg b/harbour/contrib/hbide/ideactions.prg index eda1c3fd11..6c581b7af0 100644 --- a/harbour/contrib/hbide/ideactions.prg +++ b/harbour/contrib/hbide/ideactions.prg @@ -744,15 +744,15 @@ STATIC FUNCTION mnuNormalizeItem( cCaption ) * 02/01/2010 - 23:23:22 - vailtom */ FUNCTION hbide_mnuAddFileToMRU( oIde, cFileName, nType ) - LOCAL nPos + LOCAL nPos, cFileNormal IF nType != INI_RECENTPROJECTS .AND. nType != INI_RECENTFILES RETURN nil ENDIF - cFileName := hbide_pathNormalized( cFileName ) + cFileNormal := hbide_pathNormalized( cFileName ) - IF ( nPos := aScan( oIde:aIni[ nType ], {|f| hbide_pathNormalized( f ) == cFileName } ) ) > 0 + IF ( nPos := aScan( oIde:aIni[ nType ], {|f| hbide_pathNormalized( f ) == cFileNormal } ) ) > 0 hb_aDel( oIde:aIni[ nType ], nPos, .T. ) ENDIF diff --git a/harbour/contrib/hbide/ideharbourhelp.prg b/harbour/contrib/hbide/ideharbourhelp.prg index 8af753af24..283bd6b9bc 100644 --- a/harbour/contrib/hbide/ideharbourhelp.prg +++ b/harbour/contrib/hbide/ideharbourhelp.prg @@ -252,9 +252,6 @@ METHOD IdeHarbourHelp:destroy() METHOD IdeHarbourHelp:clear() LOCAL a_ - ::disconnect( ::oUI:q_treeDoc , "itemSelectionChanged()" ) - ::disconnect( ::oUI:q_treeCategory, "itemSelectionChanged()" ) - ::aHistory := {} ::aFuncByFile := {} @@ -409,6 +406,9 @@ METHOD IdeHarbourHelp:installSignals() ::oUI:signal( "editIndex" , "returnPressed()" , {| | ::execEvent( editIndex_returnPressed ) } ) ::oUI:signal( "listIndex" , "itemDoubleClicked(QLWItem)", {|p| ::execEvent( listIndex_ItemDoubleClicked, p ) } ) + ::oUI:signal( "treeDoc" , "itemSelectionChanged()" , {| | ::execEvent( treeDoc_itemSelectionChanged ) } ) + ::oUI:signal( "treeCategory" , "itemSelectionChanged()" , {| | ::execEvent( treeCategory_itemSelectionChanged ) } ) + RETURN Self /*----------------------------------------------------------------------*/ @@ -595,10 +595,7 @@ METHOD IdeHarbourHelp:refreshDocTree() /* Clean Environment */ ::clear() - // - ::connect( ::oUI:q_treeDoc , "itemSelectionChanged()" , {| | ::execEvent( treeDoc_itemSelectionChanged ) } ) - ::connect( ::oUI:q_treeCategory, "itemSelectionChanged()" , {| | ::execEvent( treeCategory_itemSelectionChanged ) } ) - // + ::aNodes := {} ::aFuncByFile := {} ::aHistory := {} diff --git a/harbour/contrib/hbide/idemisc.prg b/harbour/contrib/hbide/idemisc.prg index aa288c11cf..a5793f83d5 100644 --- a/harbour/contrib/hbide/idemisc.prg +++ b/harbour/contrib/hbide/idemisc.prg @@ -604,7 +604,7 @@ FUNCTION hbide_isValidText( cSourceFile ) hb_fNameSplit( cSourceFile, , , @cExt ) RETURN ( lower( cExt ) $ ".c,.cpp,.prg,.h,.ch,.txt,.log,.ini,.env,.ppo," + ; - ".cc,.hbc,.hbp,.hbm,.xml,.bat,.sh,.rc,.ui,.uic,.bak,.fmg" ) + ".cc,.hbc,.hbp,.hbm,.xml,.bat,.sh,.rc,.ui,.uic,.bak,.fmg,.qth,.qtp" ) /*----------------------------------------------------------------------*/ diff --git a/harbour/contrib/hbide/idesaveload.prg b/harbour/contrib/hbide/idesaveload.prg index 3404c5d258..f669db1729 100644 --- a/harbour/contrib/hbide/idesaveload.prg +++ b/harbour/contrib/hbide/idesaveload.prg @@ -147,14 +147,14 @@ HB_TRACE( HB_TR_ALWAYS, "hbide_saveINI( oIde )", 0, oIde:nRunMode, oIde:cProjIni qVScr := QScrollBar():configure( oEdit:qEdit:verticalScrollBar() ) qCursor := QTextCursor():configure( oEdit:qEdit:textCursor() ) - aadd( txt_, "file_" + hb_ntos( ++nn ) + "=" + hbide_pathNormalized( oEdit:sourceFile ) + "," + ; + aadd( txt_, "file_" + hb_ntos( ++nn ) + "=" + hbide_pathNormalized( oEdit:sourceFile, .f. ) + "," + ; hb_ntos( qCursor:position() ) + "," + ; hb_ntos( qHScr:value() ) + "," + ; hb_ntos( qVScr:value() ) + "," + ; oEdit:cTheme + "," + ; oEdit:cView + "," ) ELSE - aadd( txt_, "file_" + hb_ntos( ++nn ) + "=" + hbide_pathNormalized( oEdit:sourceFile ) + "," + ; + aadd( txt_, "file_" + hb_ntos( ++nn ) + "=" + hbide_pathNormalized( oEdit:sourceFile, .f. ) + "," + ; hb_ntos( oEdit:nPos ) + "," + ; hb_ntos( oEdit:nHPos ) + "," + ; hb_ntos( oEdit:nVPos ) + "," + ; @@ -184,21 +184,21 @@ HB_TRACE( HB_TR_ALWAYS, "hbide_saveINI( oIde )", 0, oIde:nRunMode, oIde:cProjIni aadd( txt_, "[RECENTFILES]" ) aadd( txt_, " " ) FOR n := 1 TO len( oIde:aIni[ INI_RECENTFILES ] ) - aadd( txt_, "recentfile_" + hb_ntos( n ) + "=" + hbide_pathNormalized( oIde:aIni[ INI_RECENTFILES, n ] ) ) + aadd( txt_, "recentfile_" + hb_ntos( n ) + "=" + hbide_pathNormalized( oIde:aIni[ INI_RECENTFILES, n ], .f. ) ) NEXT aadd( txt_, " " ) aadd( txt_, "[RECENTPROJECTS]" ) aadd( txt_, " " ) FOR n := 1 TO len( oIde:aIni[ INI_RECENTPROJECTS ] ) - aadd( txt_, "recentproject_" + hb_ntos( n ) + "=" + hbide_pathNormalized( oIde:aIni[ INI_RECENTPROJECTS, n ] ) ) + aadd( txt_, "recentproject_" + hb_ntos( n ) + "=" + hbide_pathNormalized( oIde:aIni[ INI_RECENTPROJECTS, n ], .f. ) ) NEXT aadd( txt_, " " ) aadd( txt_, "[FOLDERS]" ) aadd( txt_, " " ) FOR n := 1 TO len( oIde:aIni[ INI_FOLDERS ] ) - aadd( txt_, "folder_" + hb_ntos( n ) + "=" + hbide_pathNormalized( oIde:aIni[ INI_FOLDERS, n ] ) ) + aadd( txt_, "folder_" + hb_ntos( n ) + "=" + hbide_pathNormalized( oIde:aIni[ INI_FOLDERS, n ], .f. ) ) NEXT aadd( txt_, " " ) diff --git a/harbour/contrib/hbqt/THbQtUI.prg b/harbour/contrib/hbqt/THbQtUI.prg index 7c07e74101..4822435aee 100644 --- a/harbour/contrib/hbqt/THbQtUI.prg +++ b/harbour/contrib/hbqt/THbQtUI.prg @@ -166,15 +166,9 @@ METHOD HbQtUI:destroy() ENDIF ENDIF NEXT - #if 0 - ::qObj[ ::cMainWidgetName ] := NIL - ::widgets[ 1, 2 ] := NIL - ::aEvents := NIL - ::qObj := NIL - ::widgets := {} - #endif + ::oWidget:close() - ::oWidget := NIL + ::oWidget := NIL RETURN i diff --git a/harbour/contrib/hbqt/hbqt_hbslots.cpp b/harbour/contrib/hbqt/hbqt_hbslots.cpp index 4b0dbb55e0..3e60b7268d 100644 --- a/harbour/contrib/hbqt/hbqt_hbslots.cpp +++ b/harbour/contrib/hbqt/hbqt_hbslots.cpp @@ -281,12 +281,12 @@ static bool disconnect_signal( QObject * object, const char * signal ) if( signal == ( QString ) "itemSelectionChanged()" ) return object->disconnect( SIGNAL( itemSelectionChanged() ) ); /* QTableWidget */ if( signal == ( QString ) "currentItemChanged(QTblWItem)" ) return object->disconnect( SIGNAL( currentItemChanged( QTableWidgetItem *, QTableWidgetItem * ) ) ); - if( signal == ( QString ) "itemActivated(QTblWItem)" ) return object->disconnect( SIGNAL( itemActivated( QTableWidgetItem *, int ) ) ); - if( signal == ( QString ) "itemChanged(QTblWItem)" ) return object->disconnect( SIGNAL( itemChanged( QTableWidgetItem *, int ) ) ); - if( signal == ( QString ) "itemClicked(QTblWItem)" ) return object->disconnect( SIGNAL( itemClicked( QTableWidgetItem *, int ) ) ); - if( signal == ( QString ) "itemDoubleClicked(QTblWItem)" ) return object->disconnect( SIGNAL( itemDoubleClicked( QTableWidgetItem *, int ) ) ); - if( signal == ( QString ) "itemEntered(QTblWItem)" ) return object->disconnect( SIGNAL( itemEntered( QTableWidgetItem *, int ) ) ); - if( signal == ( QString ) "itemPressed(QTblWItem)" ) return object->disconnect( SIGNAL( itemPressed( QTableWidgetItem *, int ) ) ); + if( signal == ( QString ) "itemActivated(QTblWItem)" ) return object->disconnect( SIGNAL( itemActivated( QTableWidgetItem * ) ) ); + if( signal == ( QString ) "itemChanged(QTblWItem)" ) return object->disconnect( SIGNAL( itemChanged( QTableWidgetItem * ) ) ); + if( signal == ( QString ) "itemClicked(QTblWItem)" ) return object->disconnect( SIGNAL( itemClicked( QTableWidgetItem * ) ) ); + if( signal == ( QString ) "itemDoubleClicked(QTblWItem)" ) return object->disconnect( SIGNAL( itemDoubleClicked( QTableWidgetItem * ) ) ); + if( signal == ( QString ) "itemEntered(QTblWItem)" ) return object->disconnect( SIGNAL( itemEntered( QTableWidgetItem * ) ) ); + if( signal == ( QString ) "itemPressed(QTblWItem)" ) return object->disconnect( SIGNAL( itemPressed( QTableWidgetItem * ) ) ); /* */ if( signal == ( QString ) "iconChanged()" ) return object->disconnect( SIGNAL( iconChanged() ) ); if( signal == ( QString ) "titleChanged(QString)" ) return object->disconnect( SIGNAL( titleChanged( const QString & ) ) );