From a84d9149aed9012dcf697095a58f2118bad11b24 Mon Sep 17 00:00:00 2001 From: Pritpal Bedi Date: Thu, 7 Apr 2011 00:25:43 +0000 Subject: [PATCH] 2011-04-06 17:20 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) * contrib/hbqt/qtcore/hbqt_hbqevents.cpp ! Restore the point of execution when QEvent::Close is set to ignore(). This might have impact on user code where it is set to any other value. * contrib/hbqt/qtgui/qth/QColor.qth ! Fixed constructor. TODO: to review constructor code in all .qth's. --- harbour/ChangeLog | 11 +++++++++++ harbour/contrib/hbqt/qtcore/hbqt_hbqevents.cpp | 10 +++++----- harbour/contrib/hbqt/qtgui/qth/QColor.qth | 4 +++- 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index c3f7f0c2ff..cb92c8b5ff 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,17 @@ The license applies to all entries newer than 2009-04-28. */ +2011-04-06 17:20 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) + * contrib/hbqt/qtcore/hbqt_hbqevents.cpp + ! Restore the point of execution when QEvent::Close is set to + ignore(). This might have impact on user code where it is + set to any other value. + + * contrib/hbqt/qtgui/qth/QColor.qth + ! Fixed constructor. + + TODO: to review constructor code in all .qth's. + 2011-04-06 20:15 UTC+0200 Maurilio Longo (maurilio.longo@libero.it) * harbour/src/common/hbdate.c ! Fixed OS/2 compilation, it was not using gettimeofday() and so diff --git a/harbour/contrib/hbqt/qtcore/hbqt_hbqevents.cpp b/harbour/contrib/hbqt/qtcore/hbqt_hbqevents.cpp index 6e5d2c5836..744d730b29 100644 --- a/harbour/contrib/hbqt/qtcore/hbqt_hbqevents.cpp +++ b/harbour/contrib/hbqt/qtcore/hbqt_hbqevents.cpp @@ -205,10 +205,6 @@ bool HBQEvents::eventFilter( QObject * object, QEvent * event ) QEvent::Type eventtype = event->type(); if( ( int ) eventtype > 0 ) { - if( eventtype == QEvent::Close ) - { - event->ignore(); - } char prop[ 20 ]; hb_snprintf( prop, sizeof( prop ), "%s%i%s", "P", eventtype, "P" ); @@ -234,6 +230,10 @@ bool HBQEvents::eventFilter( QObject * object, QEvent * event ) } } } + if( eventtype == QEvent::Close ) + { + event->ignore(); + } } } return false; @@ -340,7 +340,7 @@ HB_FUNC( __HBQT_EVENTS_NEW ) p = new HBQEvents(); o->installEventFilter( p ); - + hb_retptrGC( hbqt_gcAllocate_HBQEvents( p, true ) ); } diff --git a/harbour/contrib/hbqt/qtgui/qth/QColor.qth b/harbour/contrib/hbqt/qtgui/qth/QColor.qth index 8209d36845..83d2ce951b 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QColor.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QColor.qth @@ -63,7 +63,9 @@ HB_FUNC( QT_QCOLOR ) else hb_errRT_BASE( EG_ARG, 9999, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); } else - hb_errRT_BASE( EG_ARG, 9999, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); + { + __HB_RETPTRGC__( new QColor() ); + } }