From 5b9f7f3d97fdbfa32c90e7bb2c9a577d9870e514 Mon Sep 17 00:00:00 2001 From: Pritpal Bedi Date: Thu, 3 Dec 2009 19:44:05 +0000 Subject: [PATCH] 2009-12-03 11:39 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com) * contrib/hbqt/generator/qt45.qtp * contrib/hbqt/hbqt_garbage.h * contrib/hbqt/qtcore/filelist.mk * contrib/hbqt/qtcore/QUiLoader.cpp * contrib/hbqt/qtgui/QLabel.cpp * contrib/hbqt/qth/QLabel.qth ! Fixed QUiLoader issue. ! Fixed XbpStatic()'s weired behaviour which was caused by expected improvements in QLabel() class which eventually did not yield desired results, unluckily. I will look into this matter later. Now, HBQT sources re-built places proper make files and components. --- harbour/ChangeLog | 13 +++++++++++++ harbour/contrib/hbqt/generator/qt45.qtp | 2 +- harbour/contrib/hbqt/hbqt_garbage.h | 2 ++ harbour/contrib/hbqt/qtcore/QUiLoader.cpp | 23 ++++++++++++++++++++--- harbour/contrib/hbqt/qtcore/filelist.mk | 2 ++ harbour/contrib/hbqt/qtgui/QLabel.cpp | 17 +---------------- harbour/contrib/hbqt/qth/QLabel.qth | 17 +---------------- 7 files changed, 40 insertions(+), 36 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 14812b1fe1..7f3b043eed 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,19 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-12-03 11:39 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com) + * contrib/hbqt/generator/qt45.qtp + * contrib/hbqt/hbqt_garbage.h + * contrib/hbqt/qtcore/filelist.mk + * contrib/hbqt/qtcore/QUiLoader.cpp + * contrib/hbqt/qtgui/QLabel.cpp + * contrib/hbqt/qth/QLabel.qth + ! Fixed QUiLoader issue. + ! Fixed XbpStatic()'s weired behaviour which was caused by expected improvements + in QLabel() class which eventually did not yield desired results, unluckily. + I will look into this matter later. + Now, HBQT sources re-built places proper make files and components. + 2009-12-03 18:47 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * contrib/Makefile + Moved hbcairo to section for contribs with external dependencies. diff --git a/harbour/contrib/hbqt/generator/qt45.qtp b/harbour/contrib/hbqt/generator/qt45.qtp index f6c2c3080e..d90fa23f91 100644 --- a/harbour/contrib/hbqt/generator/qt45.qtp +++ b/harbour/contrib/hbqt/generator/qt45.qtp @@ -261,7 +261,7 @@ QTranslator.qth QTreeView.qth QTreeWidget.qth QTreeWidgetItem.qth -;QUiLoader.qth +QUiLoader.qth QUrl.qth QValidator.qth QVariant.qth diff --git a/harbour/contrib/hbqt/hbqt_garbage.h b/harbour/contrib/hbqt/hbqt_garbage.h index 4d635c03de..ecdf7b0f5f 100644 --- a/harbour/contrib/hbqt/hbqt_garbage.h +++ b/harbour/contrib/hbqt/hbqt_garbage.h @@ -255,6 +255,7 @@ 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 ); @@ -523,6 +524,7 @@ 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 ); diff --git a/harbour/contrib/hbqt/qtcore/QUiLoader.cpp b/harbour/contrib/hbqt/qtcore/QUiLoader.cpp index 34978693ee..b990b0a8a4 100644 --- a/harbour/contrib/hbqt/qtcore/QUiLoader.cpp +++ b/harbour/contrib/hbqt/qtcore/QUiLoader.cpp @@ -2,6 +2,12 @@ * $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 @@ -90,11 +96,22 @@ QT_G_FUNC( release_QUiLoader ) const QMetaObject * m = ( ( QObject * ) p->ph )->metaObject(); if( ( QString ) m->className() != ( QString ) "QObject" ) { - ( ( QUiLoader * ) p->ph )->~QUiLoader(); + switch( hbqt_get_object_release_method() ) + { + case HBQT_RELEASE_WITH_DELETE: + delete ( ( QUiLoader * ) p->ph ); + break; + case HBQT_RELEASE_WITH_DESTRUTOR: + ( ( QUiLoader * ) p->ph )->~QUiLoader(); + break; + case HBQT_RELEASE_WITH_DELETE_LATER: + ( ( QUiLoader * ) p->ph )->deleteLater(); + break; + } p->ph = NULL; HB_TRACE( HB_TR_DEBUG, ( "release_QUiLoader Object deleted!" ) ); #if defined( __HB_DEBUG__ ) - hbqt_debug( " YES release_QUiLoader %i B %i KB", ( int ) hb_xquery( 1001 ), hb_getMemUsed() ); + hbqt_debug( " YES release_QUiLoader %i B %i KB", ( int ) hb_xquery( 1001 ), hbqt_getmemused() ); #endif } else @@ -122,7 +139,7 @@ void * gcAllocate_QUiLoader( void * pObj ) p->func = release_QUiLoader; new( & p->pq ) QPointer< QUiLoader >( ( QUiLoader * ) pObj ); #if defined( __HB_DEBUG__ ) - hbqt_debug( " new_QUiLoader %i B %i KB", ( int ) hb_xquery( 1001 ), hb_getMemUsed() ); + hbqt_debug( " new_QUiLoader %i B %i KB", ( int ) hb_xquery( 1001 ), hbqt_getmemused() ); #endif return( p ); } diff --git a/harbour/contrib/hbqt/qtcore/filelist.mk b/harbour/contrib/hbqt/qtcore/filelist.mk index b72550862f..cb97ec62f7 100644 --- a/harbour/contrib/hbqt/qtcore/filelist.mk +++ b/harbour/contrib/hbqt/qtcore/filelist.mk @@ -53,6 +53,7 @@ CPP_SOURCES := \ QTime.cpp \ QTimer.cpp \ QTranslator.cpp \ + QUiLoader.cpp \ QUrl.cpp \ QVariant.cpp \ @@ -103,6 +104,7 @@ 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 08cb842a15..126ef077f8 100644 --- a/harbour/contrib/hbqt/qtgui/QLabel.cpp +++ b/harbour/contrib/hbqt/qtgui/QLabel.cpp @@ -148,22 +148,7 @@ HB_FUNC( QT_QLABEL ) { void * pObj = NULL; - if( hb_pcount() == 1 && HB_ISCHAR( 1 ) ) - { - pObj = ( QLabel* ) new QLabel( hbqt_par_QString( 1 ) ) ; - } - else if( hb_pcount() == 1 && HB_ISPOINTER( 1 ) ) - { - pObj = ( QLabel* ) new QLabel( hbqt_par_QWidget( 1 ) ) ; - } - if( hb_pcount() == 2 && HB_ISCHAR( 1 ) && HB_ISPOINTER( 2 ) ) - { - pObj = ( QLabel* ) new QLabel( hbqt_par_QString( 1 ), hbqt_par_QWidget( 2 ) ) ; - } - else - { - pObj = ( QLabel* ) new QLabel() ; - } + pObj = ( QLabel* ) new QLabel( hbqt_par_QWidget( 1 ) ) ; hb_retptrGC( gcAllocate_QLabel( pObj ) ); } diff --git a/harbour/contrib/hbqt/qth/QLabel.qth b/harbour/contrib/hbqt/qth/QLabel.qth index 488d38d38b..d1c177df71 100644 --- a/harbour/contrib/hbqt/qth/QLabel.qth +++ b/harbour/contrib/hbqt/qth/QLabel.qth @@ -70,22 +70,7 @@ New = pParent, nFlags */ HB_FUNC( QT_QLABEL ) { - if( hb_pcount() == 1 && HB_ISCHAR( 1 ) ) - { - hb_retptr( ( QLabel* ) new QLabel( hbqt_par_QString( 1 ) ) ); - } - else if( hb_pcount() == 1 && HB_ISPOINTER( 1 ) ) - { - hb_retptr( ( QLabel* ) new QLabel( hbqt_par_QWidget( 1 ) ) ); - } - if( hb_pcount() == 2 && HB_ISCHAR( 1 ) && HB_ISPOINTER( 2 ) ) - { - hb_retptr( ( QLabel* ) new QLabel( hbqt_par_QString( 1 ), hbqt_par_QWidget( 2 ) ) ); - } - else - { - hb_retptr( ( QLabel* ) new QLabel() ); - } + hb_retptr( ( QLabel* ) new QLabel( hbqt_par_QWidget( 1 ) ) ); }