From 609bfd674fc83e7018c24b45912a2349e1990344 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Wed, 9 Mar 2011 16:51:24 +0000 Subject: [PATCH] 2011-03-09 17:51 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * contrib/hbqt/qtgui/hbqt_init.cpp * contrib/hbqt/qtcore/hbqt_init.cpp ! QWidget related event moved to hbqtgui to avoid build breakage. --- harbour/ChangeLog | 5 +++++ harbour/contrib/hbqt/qtcore/hbqt_init.cpp | 13 ------------- harbour/contrib/hbqt/qtgui/hbqt_init.cpp | 12 +++++++++++- 3 files changed, 16 insertions(+), 14 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 7fed25b0f9..305e03d56c 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,11 @@ The license applies to all entries newer than 2009-04-28. */ +2011-03-09 17:51 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) + * contrib/hbqt/qtgui/hbqt_init.cpp + * contrib/hbqt/qtcore/hbqt_init.cpp + ! QWidget related event moved to hbqtgui to avoid build breakage. + 2011-03-09 17:17 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * contrib/hbqt/hbmk2_qt.hbs ! Fixed scope of generate HB_EXTERN section. diff --git a/harbour/contrib/hbqt/qtcore/hbqt_init.cpp b/harbour/contrib/hbqt/qtcore/hbqt_init.cpp index 217a8a4248..3b8df491ea 100644 --- a/harbour/contrib/hbqt/qtcore/hbqt_init.cpp +++ b/harbour/contrib/hbqt/qtcore/hbqt_init.cpp @@ -75,13 +75,11 @@ #include #include #include -#include #include HB_EXTERN_BEGIN extern void * hbqt_gcAllocate_QObject( void * pObj, bool bNew ); -extern void * hbqt_gcAllocate_QWidget( void * pObj, bool bNew ); extern void * hbqt_gcAllocate_QTime( void * pObj, bool bNew ); extern void * hbqt_gcAllocate_QSize( void * pObj, bool bNew ); extern void * hbqt_gcAllocate_QSizeF( void * pObj, bool bNew ); @@ -365,16 +363,6 @@ static void hbqt_SlotsExecQObject( PHB_ITEM * codeBlock, void ** arguments, QStr hb_vmSend( 1 ); } -static void hbqt_SlotsExecQWidget( PHB_ITEM * codeBlock, void ** arguments, QStringList pList ) -{ - Q_UNUSED( pList ); - - hb_vmPushEvalSym(); - hb_vmPush( codeBlock ); - hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QWidget( ( *reinterpret_cast< void*( * ) >( arguments[ 1 ] ) ), false ), "hb_QWidget" ) ); - hb_vmSend( 1 ); -} - /*----------------------------------------------------------------------*/ HB_FUNC_EXTERN( HB_QEVENT ); @@ -415,7 +403,6 @@ static void hbqt_registerCallbacks( void ) hbqt_slots_register_callback( "QTime" , hbqt_SlotsExecQTime ); hbqt_slots_register_callback( "QUrl" , hbqt_SlotsExecQUrl ); hbqt_slots_register_callback( "QObject*" , hbqt_SlotsExecQObject ); - hbqt_slots_register_callback( "QWidget*" , hbqt_SlotsExecQWidget ); hbqt_events_register_createobj( QEvent::Timer , "hb_QEvent" ); } diff --git a/harbour/contrib/hbqt/qtgui/hbqt_init.cpp b/harbour/contrib/hbqt/qtgui/hbqt_init.cpp index c473b6efcf..5adb933840 100644 --- a/harbour/contrib/hbqt/qtgui/hbqt_init.cpp +++ b/harbour/contrib/hbqt/qtgui/hbqt_init.cpp @@ -288,6 +288,16 @@ static void hbqt_SlotsExecQTreeWidgetItemQTreeWidgetItem( PHB_ITEM * codeBlock, hb_vmSend( 2 ); } +static void hbqt_SlotsExecQWidget( PHB_ITEM * codeBlock, void ** arguments, QStringList pList ) +{ + Q_UNUSED( pList ); + + hb_vmPushEvalSym(); + hb_vmPush( codeBlock ); + hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QWidget( ( *reinterpret_cast< void*( * ) >( arguments[ 1 ] ) ), false ), "hb_QWidget" ) ); + hb_vmSend( 1 ); +} + static void hbqt_SlotsExecQWidgetQWidget( PHB_ITEM * codeBlock, void ** arguments, QStringList pList ) { Q_UNUSED( pList ); @@ -311,7 +321,6 @@ static void hbqt_SlotsExecQWidgetInt( PHB_ITEM * codeBlock, void ** arguments, Q } - HB_FUNC_EXTERN( HB_QABSTRACTBUTTON ); HB_FUNC_EXTERN( HB_QACTION ); HB_FUNC_EXTERN( HB_QMDISUBWINDOW ); @@ -412,6 +421,7 @@ static void hbqt_registerCallbacks( void ) hbqt_slots_register_callback( "QWidget*$QWidget*" , hbqt_SlotsExecQWidgetQWidget ); hbqt_slots_register_callback( "QTreeWidgetItem*" , hbqt_SlotsExecQTreeWidgetItem ); hbqt_slots_register_callback( "QListWidgetItem*" , hbqt_SlotsExecQListWidgetItem ); + hbqt_slots_register_callback( "QWidget*" , hbqt_SlotsExecQWidget ); hbqt_events_register_createobj( QEvent::MouseButtonPress , "hb_QMouseEvent" ); hbqt_events_register_createobj( QEvent::MouseButtonRelease , "hb_QMouseEvent" );