diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 327011064c..316d71a794 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,17 @@ past entries belonging to author(s): Viktor Szakats. */ +2010-01-11 08:20 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com) + * contrib/hbide/ideprojmanager.prg + ! Fixed bug reported by Marco Bra + + * contrib/hbqt/hbqt_destruct.cpp + * contrib/hbqt/hbqt_hbqmainwindow.cpp + * contrib/hbqt/qtgui/QMainWindow.cpp + * contrib/hbqt/qth/QMainWindow.qth + % Moved hbqt_QMainWindow_save(rest)Settings() from + hbqt_destruct.cpp to QMainWindow.cpp. + 2010-01-12 16:44 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * src/common/hbstr.c * Formatting. diff --git a/harbour/contrib/hbide/ideprojmanager.prg b/harbour/contrib/hbide/ideprojmanager.prg index 10c73ff158..6136753e1f 100644 --- a/harbour/contrib/hbide/ideprojmanager.prg +++ b/harbour/contrib/hbide/ideprojmanager.prg @@ -99,7 +99,7 @@ CLASS IdeProject DATA outputName INIT hb_dirBase() + "projects" DATA launchParams INIT "" DATA launchProgram INIT "" - DATA hbpFlags INIT "" + DATA hbpFlags INIT {} DATA sources INIT {} DATA metaData INIT {} DATA dotHbp INIT "" @@ -933,7 +933,10 @@ METHOD IdeProjManager:buildProject( cProject, lLaunch, lRebuild, lPPO, lViaQt ) aadd( aHbp, "# User Supplied Flags" ) aadd( aHbp, " " ) - aeval( ::oProject:hbpFlags, {|e| aadd( aHbp, e ) } ) + IF !empty( ::oProject:hbpFlags ) + aeval( ::oProject:hbpFlags, {|e| aadd( aHbp, e ) } ) + ENDIF + aadd( aHbp, " " ) aadd( aHbp, "# hbIDE Supplied Flags" ) aadd( aHbp, " " ) diff --git a/harbour/contrib/hbqt/hbqt_destruct.cpp b/harbour/contrib/hbqt/hbqt_destruct.cpp index f4df9ce0d8..a31523b79a 100644 --- a/harbour/contrib/hbqt/hbqt_destruct.cpp +++ b/harbour/contrib/hbqt/hbqt_destruct.cpp @@ -60,8 +60,6 @@ #if QT_VERSION >= 0x040500 #include -#include -#include static int s_iObjectReleaseMethod = HBQT_RELEASE_WITH_DELETE_LATER; @@ -135,20 +133,6 @@ HB_FUNC( HBQT_SETCODECFORCSTRINGS ) QTextCodec::setCodecForCStrings( codec ); } -HB_FUNC( HBQT_QMAINWINDOW_SAVESETTINGS ) -{ - QSettings qSet( hbqt_par_QString( 1 ), QSettings::IniFormat ); - - qSet.setValue( hbqt_par_QString( 2 ), hbqt_par_QMainWindow( 3 )->saveState() ); -} - -HB_FUNC( HBQT_QMAINWINDOW_RESTSETTINGS ) -{ - QSettings qSet( hbqt_par_QString( 1 ), QSettings::IniFormat ); - - hbqt_par_QMainWindow( 3 )->restoreState( qSet.value( hbqt_par_QString( 2 ) ).toByteArray() ); -} - /*----------------------------------------------------------------------*/ #endif // #if QT_VERSION >= 0x040500 diff --git a/harbour/contrib/hbqt/hbqt_hbqmainwindow.cpp b/harbour/contrib/hbqt/hbqt_hbqmainwindow.cpp index 12627feec8..be25a9c29a 100644 --- a/harbour/contrib/hbqt/hbqt_hbqmainwindow.cpp +++ b/harbour/contrib/hbqt/hbqt_hbqmainwindow.cpp @@ -85,6 +85,7 @@ HBQMainWindow::~HBQMainWindow( void ) if( block ) { + HB_TRACE( HB_TR_DEBUG, ( "HBQMainWindow::~HBQMainWindow: MID" ) ); hb_itemRelease( block ); block = NULL; } diff --git a/harbour/contrib/hbqt/qtgui/QMainWindow.cpp b/harbour/contrib/hbqt/qtgui/QMainWindow.cpp index 46bcc8ef4e..da916c7b9e 100644 --- a/harbour/contrib/hbqt/qtgui/QMainWindow.cpp +++ b/harbour/contrib/hbqt/qtgui/QMainWindow.cpp @@ -83,6 +83,7 @@ #include #include +#include /* @@ -90,6 +91,20 @@ * ~QMainWindow () */ +HB_FUNC( HBQT_QMAINWINDOW_SAVESETTINGS ) +{ + QSettings qSet( hbqt_par_QString( 1 ), QSettings::IniFormat ); + + qSet.setValue( hbqt_par_QString( 2 ), hbqt_par_QMainWindow( 3 )->saveState() ); +} + +HB_FUNC( HBQT_QMAINWINDOW_RESTSETTINGS ) +{ + QSettings qSet( hbqt_par_QString( 1 ), QSettings::IniFormat ); + + hbqt_par_QMainWindow( 3 )->restoreState( qSet.value( hbqt_par_QString( 2 ) ).toByteArray() ); +} + typedef struct { void * ph; @@ -143,7 +158,7 @@ void * hbqt_gcAllocate_QMainWindow( void * pObj ) p->func = hbqt_gcRelease_QMainWindow; new( & p->pq ) QPointer< QMainWindow >( ( QMainWindow * ) pObj ); HB_TRACE( HB_TR_DEBUG, ( " new_QMainWindow %i B %i KB", ( int ) hb_xquery( 1001 ), hbqt_getmemused() ) ); - return( p ); + return p; } HB_FUNC( QT_QMAINWINDOW ) diff --git a/harbour/contrib/hbqt/qth/QMainWindow.qth b/harbour/contrib/hbqt/qth/QMainWindow.qth index ff17c6034e..c3961b5bf4 100644 --- a/harbour/contrib/hbqt/qth/QMainWindow.qth +++ b/harbour/contrib/hbqt/qth/QMainWindow.qth @@ -61,6 +61,7 @@ New = pParent, nFlags #include +#include /* @@ -71,6 +72,20 @@ HB_FUNC( QT_QMAINWINDOW ) { hb_retptr( ( QMainWindow* ) new QMainWindow( hbqt_par_QWidget( 1 ), ( Qt::WindowFlags ) hb_parni( 2 ) ) ); } + +HB_FUNC( HBQT_QMAINWINDOW_SAVESETTINGS ) +{ + QSettings qSet( hbqt_par_QString( 1 ), QSettings::IniFormat ); + + qSet.setValue( hbqt_par_QString( 2 ), hbqt_par_QMainWindow( 3 )->saveState() ); +} + +HB_FUNC( HBQT_QMAINWINDOW_RESTSETTINGS ) +{ + QSettings qSet( hbqt_par_QString( 1 ), QSettings::IniFormat ); + + hbqt_par_QMainWindow( 3 )->restoreState( qSet.value( hbqt_par_QString( 2 ) ).toByteArray() ); +}