From d409d69959ad9c5cdc1204675a4ed38203b8e2f3 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Thu, 3 Dec 2009 13:57:38 +0000 Subject: [PATCH] 2009-12-03 14:56 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * bin/hb-mkimp.bat - Deleted creation of QT implibs for mingw. Enough to use what's provided by QT SDK. * contrib/hbqt/qtgui/QLabel.cpp * contrib/hbqt/hbqt_garbage.h * contrib/hbqt/qtcore/filelist.mk * Rerun generator. This caused that QTUILoader references got removed, plus a few other changes. * contrib/hbqt/qtcore/QUiLoader.cpp - Deleted header telling this file is automatically generated. ! Manually fixed debug lines to be in sync with rest of hbqt. * contrib/hbqt/qtcore/Makefile ! Fixed to add QTUILoaded stuff manually, since it's missing from generated filelist.mk. * config/win/msvc.mk * Minor in comment. --- harbour/ChangeLog | 22 ++++++++++++++++++++++ harbour/bin/hb-mkimp.bat | 4 ---- harbour/config/win/msvc.mk | 2 +- harbour/contrib/hbqt/hbqt_garbage.h | 4 ---- harbour/contrib/hbqt/qtcore/Makefile | 3 +++ harbour/contrib/hbqt/qtcore/QUiLoader.cpp | 22 ++++++++-------------- harbour/contrib/hbqt/qtcore/filelist.mk | 2 -- harbour/contrib/hbqt/qtgui/QLabel.cpp | 15 +++++++++++++-- 8 files changed, 47 insertions(+), 27 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index fb2eb44bdf..5289be25fe 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,28 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-12-03 14:56 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) + * bin/hb-mkimp.bat + - Deleted creation of QT implibs for mingw. Enough to use what's + provided by QT SDK. + + * contrib/hbqt/qtgui/QLabel.cpp + * contrib/hbqt/hbqt_garbage.h + * contrib/hbqt/qtcore/filelist.mk + * Rerun generator. This caused that QTUILoader references + got removed, plus a few other changes. + + * contrib/hbqt/qtcore/QUiLoader.cpp + - Deleted header telling this file is automatically generated. + ! Manually fixed debug lines to be in sync with rest of hbqt. + + * contrib/hbqt/qtcore/Makefile + ! Fixed to add QTUILoaded stuff manually, since it's missing + from generated filelist.mk. + + * config/win/msvc.mk + * Minor in comment. + 2009-12-03 13:53 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * contrib/xhb/freadlin.c * contrib/hbide/freadlin.c diff --git a/harbour/bin/hb-mkimp.bat b/harbour/bin/hb-mkimp.bat index 1b335375b4..8a5d655d99 100644 --- a/harbour/bin/hb-mkimp.bat +++ b/harbour/bin/hb-mkimp.bat @@ -119,10 +119,6 @@ if not "%HB_LIB_INSTALL%" == "" ( if exist "%HB_WITH_OPENSSL%\..\libeay32.lib" copy /b /y "%HB_WITH_OPENSSL%\..\libeay32.lib" "%HB_LIB_INSTALL%\liblibeay32.a" if exist "%HB_WITH_OPENSSL%\..\ssleay32.lib" copy /b /y "%HB_WITH_OPENSSL%\..\ssleay32.lib" "%HB_LIB_INSTALL%\libssleay32.a" if exist "%HB_WITH_PGSQL%\..\lib\libpq.lib" copy /b /y "%HB_WITH_PGSQL%\..\lib\libpq.lib" "%HB_LIB_INSTALL%\liblibpq.a" - if exist "%HB_WITH_QT%\..\lib\libQtCore4.a" copy /b /y "%HB_WITH_QT%\..\lib\libQtCore4.a" "%HB_LIB_INSTALL%\libQtCore4.a" - if exist "%HB_WITH_QT%\..\lib\libQtGui4.a" copy /b /y "%HB_WITH_QT%\..\lib\libQtGui4.a" "%HB_LIB_INSTALL%\libQtGui4.a" - if exist "%HB_WITH_QT%\..\lib\libQtNetwork4.a" copy /b /y "%HB_WITH_QT%\..\lib\libQtNetwork4.a" "%HB_LIB_INSTALL%\libQtNetwork4.a" - if exist "%HB_WITH_QT%\..\lib\libQtWebKit4.a" copy /b /y "%HB_WITH_QT%\..\lib\libQtWebKit4.a" "%HB_LIB_INSTALL%\libQtWebKit4.a" goto END ) diff --git a/harbour/config/win/msvc.mk b/harbour/config/win/msvc.mk index 5d102859d8..f735ed4c19 100644 --- a/harbour/config/win/msvc.mk +++ b/harbour/config/win/msvc.mk @@ -8,7 +8,7 @@ LIB_EXT := .lib ifeq ($(HB_CPU),x86) # Always compile in -UNICODE mode for MSVC 9.0 and upper - # This version doesn't support Win9x anyway. [vszakats] + # These versions don't support Win9x anymore, so it's safe. [vszakats] ifeq ($(filter $(HB_COMPILER_VER),600 700 710 800),) HB_CFLAGS += -DUNICODE endif diff --git a/harbour/contrib/hbqt/hbqt_garbage.h b/harbour/contrib/hbqt/hbqt_garbage.h index 6f98fc1758..4d635c03de 100644 --- a/harbour/contrib/hbqt/hbqt_garbage.h +++ b/harbour/contrib/hbqt/hbqt_garbage.h @@ -255,7 +255,6 @@ extern QT_G_FUNC( release_QTranslator ); extern QT_G_FUNC( release_QTreeView ); extern QT_G_FUNC( release_QTreeWidget ); extern QT_G_FUNC( release_QTreeWidgetItem ); -extern QT_G_FUNC( release_QUiLoader ); extern QT_G_FUNC( release_QUrl ); extern QT_G_FUNC( release_QValidator ); extern QT_G_FUNC( release_QVariant ); @@ -275,7 +274,6 @@ extern QT_G_FUNC( release_QWidget ); extern QT_G_FUNC( release_QWidgetAction ); extern QT_G_FUNC( release_QWidgetItem ); extern QT_G_FUNC( release_QWindowsStyle ); -extern QT_G_FUNC( release_QWindowsXPStyle ); extern QT_G_FUNC( release_QWizard ); extern QT_G_FUNC( release_QWizardPage ); @@ -525,7 +523,6 @@ extern void * gcAllocate_QTranslator( void * pObj ); extern void * gcAllocate_QTreeView( void * pObj ); extern void * gcAllocate_QTreeWidget( void * pObj ); extern void * gcAllocate_QTreeWidgetItem( void * pObj ); -extern void * gcAllocate_QUiLoader( void * pObj ); extern void * gcAllocate_QUrl( void * pObj ); extern void * gcAllocate_QValidator( void * pObj ); extern void * gcAllocate_QVariant( void * pObj ); @@ -545,7 +542,6 @@ extern void * gcAllocate_QWidget( void * pObj ); extern void * gcAllocate_QWidgetAction( void * pObj ); extern void * gcAllocate_QWidgetItem( void * pObj ); extern void * gcAllocate_QWindowsStyle( void * pObj ); -extern void * gcAllocate_QWindowsXPStyle( void * pObj ); extern void * gcAllocate_QWizard( void * pObj ); extern void * gcAllocate_QWizardPage( void * pObj ); diff --git a/harbour/contrib/hbqt/qtcore/Makefile b/harbour/contrib/hbqt/qtcore/Makefile index a279166436..77ee58d425 100644 --- a/harbour/contrib/hbqt/qtcore/Makefile +++ b/harbour/contrib/hbqt/qtcore/Makefile @@ -14,6 +14,9 @@ ifneq ($(HB_HAS_QT),) include $(TOP)$(ROOT)contrib/hbqt/qtcore/filelist.mk + CPP_SOURCES += QUiLoader.cpp + PRG_SOURCES += TQUiLoader.prg + include $(TOP)$(ROOT)config/header.mk include $(TOP)$(ROOT)config/lib.mk diff --git a/harbour/contrib/hbqt/qtcore/QUiLoader.cpp b/harbour/contrib/hbqt/qtcore/QUiLoader.cpp index a0a1aeed8e..34978693ee 100644 --- a/harbour/contrib/hbqt/qtcore/QUiLoader.cpp +++ b/harbour/contrib/hbqt/qtcore/QUiLoader.cpp @@ -2,12 +2,6 @@ * $Id$ */ -/* -------------------------------------------------------------------- */ -/* WARNING: Automatically generated source file. DO NOT EDIT! */ -/* Instead, edit corresponding .qth file, */ -/* or the generator tool itself, and run regenarate. */ -/* -------------------------------------------------------------------- */ - /* * Harbour Project source code: * QT wrapper main header @@ -99,23 +93,23 @@ QT_G_FUNC( release_QUiLoader ) ( ( QUiLoader * ) p->ph )->~QUiLoader(); p->ph = NULL; HB_TRACE( HB_TR_DEBUG, ( "release_QUiLoader Object deleted!" ) ); - #if defined(__debug__) - just_debug( " YES release_QUiLoader %i B %i KB", ( int ) hb_xquery( 1001 ), hb_getMemUsed() ); + #if defined( __HB_DEBUG__ ) + hbqt_debug( " YES release_QUiLoader %i B %i KB", ( int ) hb_xquery( 1001 ), hb_getMemUsed() ); #endif } else { HB_TRACE( HB_TR_DEBUG, ( "release_QUiLoader Object Name Missing!" ) ); - #if defined(__debug__) - just_debug( " NO release_QUiLoader" ); + #if defined( __HB_DEBUG__ ) + hbqt_debug( " NO release_QUiLoader" ); #endif } } else { HB_TRACE( HB_TR_DEBUG, ( "release_QUiLoader Object Allready deleted!" ) ); - #if defined(__debug__) - just_debug( " DEL release_QUiLoader" ); + #if defined( __HB_DEBUG__ ) + hbqt_debug( " DEL release_QUiLoader" ); #endif } } @@ -127,8 +121,8 @@ void * gcAllocate_QUiLoader( void * pObj ) p->ph = pObj; p->func = release_QUiLoader; new( & p->pq ) QPointer< QUiLoader >( ( QUiLoader * ) pObj ); - #if defined(__debug__) - just_debug( " new_QUiLoader %i B %i KB", ( int ) hb_xquery( 1001 ), hb_getMemUsed() ); + #if defined( __HB_DEBUG__ ) + hbqt_debug( " new_QUiLoader %i B %i KB", ( int ) hb_xquery( 1001 ), hb_getMemUsed() ); #endif return( p ); } diff --git a/harbour/contrib/hbqt/qtcore/filelist.mk b/harbour/contrib/hbqt/qtcore/filelist.mk index 345bcd3c32..b72550862f 100644 --- a/harbour/contrib/hbqt/qtcore/filelist.mk +++ b/harbour/contrib/hbqt/qtcore/filelist.mk @@ -54,7 +54,6 @@ CPP_SOURCES := \ QTimer.cpp \ QTranslator.cpp \ QUrl.cpp \ - QUiLoader.cpp \ QVariant.cpp \ @@ -104,7 +103,6 @@ PRG_SOURCES := \ TQTime.prg \ TQTimer.prg \ TQTranslator.prg \ - TQUiLoader.prg \ TQUrl.prg \ TQVariant.prg \ diff --git a/harbour/contrib/hbqt/qtgui/QLabel.cpp b/harbour/contrib/hbqt/qtgui/QLabel.cpp index 1b427f941f..08cb842a15 100644 --- a/harbour/contrib/hbqt/qtgui/QLabel.cpp +++ b/harbour/contrib/hbqt/qtgui/QLabel.cpp @@ -96,7 +96,18 @@ QT_G_FUNC( release_QLabel ) const QMetaObject * m = ( ( QObject * ) p->ph )->metaObject(); if( ( QString ) m->className() != ( QString ) "QObject" ) { - ( ( QLabel * ) p->ph )->~QLabel(); + switch( hbqt_get_object_release_method() ) + { + case HBQT_RELEASE_WITH_DELETE: + delete ( ( QLabel * ) p->ph ); + break; + case HBQT_RELEASE_WITH_DESTRUTOR: + ( ( QLabel * ) p->ph )->~QLabel(); + break; + case HBQT_RELEASE_WITH_DELETE_LATER: + ( ( QLabel * ) p->ph )->deleteLater(); + break; + } p->ph = NULL; HB_TRACE( HB_TR_DEBUG, ( "release_QLabel Object deleted!" ) ); #if defined( __HB_DEBUG__ ) @@ -139,7 +150,7 @@ HB_FUNC( QT_QLABEL ) if( hb_pcount() == 1 && HB_ISCHAR( 1 ) ) { - pObj = ( QLabel* ) new QLabel( hbqt_par_QString( 1 ), 0, 0 ) ; + pObj = ( QLabel* ) new QLabel( hbqt_par_QString( 1 ) ) ; } else if( hb_pcount() == 1 && HB_ISPOINTER( 1 ) ) {