2012-06-22 12:47 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbqt/hbmk2_qt.hb
* contrib/hbqt/qtcore/hbqt.h
* contrib/hbqt/qtcore/hbqt_init.cpp
- Removed: a hack introduced some months back where
C++ static items were held in a list them released
at exit of an application. This was double work and
now is not needed at all.
* contrib/hbqt/qtcore/hbqt_bind.cpp
- Reverted: last fix where <qtObject> was compared against
a numeric, which, BTW was a stupid implementation.
A pointer casted to a numeric is always true.
* contrib/hbqt/qtgui/hbqt_init.cpp
- Deleted: deleting the QApplication object.
It was breaking such code:
oWnd:connect( QEvent_Close, {|| QApplication():quit() } )
QApplication():exec()
the reason was any code executed after
QApplication():quit() was rendered unexcutable because
appln was forced to stop execution.
* contrib/hbqt/qtcore/hbqt_hbqevents.cpp
+ Reintroduced: QEvent_Close's return value to true.
It is necessary to intercept this event at appln level.
* contrib/hbqt/qtcore/qth/QLibraryInfo.qth
* contrib/hbqt/qtgui/qth/QDesktopServices.qth
+ Reworked: constructors.
Previous implementation was wrong.
Applied Francesco's thought and it worked, thanks.
* contrib/hbqt/qtgui/qth/QSound.qth
+ Added: two slot methods.
This commit is contained in:
@@ -16,6 +16,42 @@
|
||||
The license applies to all entries newer than 2009-04-28.
|
||||
*/
|
||||
|
||||
2012-06-22 12:47 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
|
||||
* contrib/hbqt/hbmk2_qt.hb
|
||||
* contrib/hbqt/qtcore/hbqt.h
|
||||
* contrib/hbqt/qtcore/hbqt_init.cpp
|
||||
- Removed: a hack introduced some months back where
|
||||
C++ static items were held in a list them released
|
||||
at exit of an application. This was double work and
|
||||
now is not needed at all.
|
||||
|
||||
* contrib/hbqt/qtcore/hbqt_bind.cpp
|
||||
- Reverted: last fix where <qtObject> was compared against
|
||||
a numeric, which, BTW was a stupid implementation.
|
||||
A pointer casted to a numeric is always true.
|
||||
|
||||
* contrib/hbqt/qtgui/hbqt_init.cpp
|
||||
- Deleted: deleting the QApplication object.
|
||||
It was breaking such code:
|
||||
oWnd:connect( QEvent_Close, {|| QApplication():quit() } )
|
||||
QApplication():exec()
|
||||
the reason was any code executed after
|
||||
QApplication():quit() was rendered unexcutable because
|
||||
appln was forced to stop execution.
|
||||
|
||||
* contrib/hbqt/qtcore/hbqt_hbqevents.cpp
|
||||
+ Reintroduced: QEvent_Close's return value to true.
|
||||
It is necessary to intercept this event at appln level.
|
||||
|
||||
* contrib/hbqt/qtcore/qth/QLibraryInfo.qth
|
||||
* contrib/hbqt/qtgui/qth/QDesktopServices.qth
|
||||
+ Reworked: constructors.
|
||||
Previous implementation was wrong.
|
||||
Applied Francesco's thought and it worked, thanks.
|
||||
|
||||
* contrib/hbqt/qtgui/qth/QSound.qth
|
||||
+ Added: two slot methods.
|
||||
|
||||
2012-06-22 19:39 UTC+0200 Viktor Szakats (harbour syenar.net)
|
||||
* utils/hbmk2/hbmk2.prg
|
||||
* minor cleanup (var renamed)
|
||||
|
||||
@@ -1499,7 +1499,6 @@ METHOD HbQtSource:build()
|
||||
AAdd( aLine, " if( s_oClass == NULL )" )
|
||||
AAdd( aLine, " {" )
|
||||
AAdd( aLine, " s_oClass = hb_itemNew( NULL );" )
|
||||
AAdd( aLine, " hbqt_addDeleteList( s_oClass );" )
|
||||
FOR EACH k IN hb_aTokens( s, "," )
|
||||
k := lower( AllTrim( k ) )
|
||||
IF k == "hbqtobjecthandler"
|
||||
|
||||
@@ -101,7 +101,6 @@ HB_EXPORT void * hbqt_get_ptr( PHB_ITEM pObj );
|
||||
HB_EXPORT void hbqt_errRT_ARG( void );
|
||||
HB_EXPORT PHB_ITEM hbqt_defineClassBegin( const char * pszClsName, PHB_ITEM s_oClass, const char * pszParentClsStr );
|
||||
HB_EXPORT void hbqt_defineClassEnd( PHB_ITEM s_oClass, PHB_ITEM oClass );
|
||||
HB_EXPORT void hbqt_addDeleteList( PHB_ITEM item ); /* populate a list of PHB_ITEM to delete at exit time */
|
||||
|
||||
HB_EXPORT PHB_ITEM hbqt_bindGetHbObject( PHB_ITEM pItem, void * qtObject, const char * szClassFunc, PHBQT_DEL_FUNC pDelete, int iFlags );
|
||||
HB_EXPORT PHB_ITEM hbqt_bindSetHbObject( PHB_ITEM pItem, void * qtObject, const char * szClassName, PHBQT_DEL_FUNC pDelFunc, int iFlags );
|
||||
|
||||
@@ -240,9 +240,8 @@ PHB_ITEM hbqt_bindGetHbObject( PHB_ITEM pItem, void * qtObject, const char * szC
|
||||
|
||||
PHB_ITEM pObject = NULL;
|
||||
|
||||
if( ! HB_IS_NUMERIC( ( PHB_ITEM ) qtObject ) )
|
||||
if( qtObject == NULL )
|
||||
return pObject;
|
||||
if( qtObject == NULL )
|
||||
return pObject;
|
||||
|
||||
PHB_SYMB pClassFunc = hb_dynsymGetSymbol( szClassName );
|
||||
if( pClassFunc == NULL )
|
||||
|
||||
@@ -183,12 +183,10 @@ bool HBQEvents::eventFilter( QObject * object, QEvent * event )
|
||||
hb_itemRelease( pArray );
|
||||
}
|
||||
}
|
||||
#if 0
|
||||
if( eventtype == QEvent::Close )
|
||||
{
|
||||
stopTheEventChain = true;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
hb_vmRequestRestore();
|
||||
|
||||
@@ -494,26 +494,9 @@ static void hbqt_lib_init( void * cargo )
|
||||
hbqt_registerCallbacks();
|
||||
}
|
||||
|
||||
void hbqt_addDeleteList( PHB_ITEM item )
|
||||
{
|
||||
HB_TRACE( HB_TR_DEBUG, ( "-------------------------hbqt_addDeleteList # %d", s_PHB_ITEM_tobedeleted.size() ) );
|
||||
s_PHB_ITEM_tobedeleted << item;
|
||||
}
|
||||
|
||||
static void hbqt_lib_exit( void * cargo )
|
||||
{
|
||||
HB_SYMBOL_UNUSED( cargo );
|
||||
|
||||
while( ! s_PHB_ITEM_tobedeleted.isEmpty() )
|
||||
{
|
||||
int i = s_PHB_ITEM_tobedeleted.size() - 1;
|
||||
if( s_PHB_ITEM_tobedeleted.at( i ) != NULL )
|
||||
{
|
||||
void * ptr = ( void * ) s_PHB_ITEM_tobedeleted.at( i );
|
||||
s_PHB_ITEM_tobedeleted.removeAt( i );
|
||||
hb_itemRelease( ptr );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
HB_CALL_ON_STARTUP_BEGIN( _hbqtcore_init_ )
|
||||
|
||||
@@ -36,9 +36,7 @@ Constructor =
|
||||
*/
|
||||
HB_FUNC( QT_QLIBRARYINFO )
|
||||
{
|
||||
PHB_ITEM pItem = hb_itemPutNI( NULL, 0 );
|
||||
hb_itemReturnRelease( hbqt_bindGetHbObject( NULL, pItem, "HB_QLIBRARYINFO", NULL, HBQT_BIT_NONE ) );
|
||||
hb_itemRelease( pItem );
|
||||
HB_FUNC_EXEC( HB_QLIBRARYINFO );
|
||||
}
|
||||
</CODE>
|
||||
|
||||
|
||||
@@ -831,8 +831,6 @@ static void hbqt_lib_exit( void * cargo )
|
||||
{
|
||||
HB_SYMBOL_UNUSED( cargo );
|
||||
fIsQuitting = HB_TRUE;
|
||||
s_app->exit( 0 );
|
||||
delete s_app;
|
||||
}
|
||||
|
||||
HB_FUNC( HBQT_ISACTIVEAPPLICATION )
|
||||
|
||||
@@ -35,9 +35,7 @@ Constructor = no
|
||||
*/
|
||||
HB_FUNC( QT_QDESKTOPSERVICES )
|
||||
{
|
||||
PHB_ITEM pItem = hb_itemPutNI( NULL, 0 );
|
||||
hb_itemReturnRelease( hbqt_bindGetHbObject( NULL, pItem, "HB_QDESKTOPSERVICES", NULL, HBQT_BIT_NONE ) );
|
||||
hb_itemRelease( pItem );
|
||||
HB_FUNC_EXEC( HB_QDESKTOPSERVICES );
|
||||
}
|
||||
</CODE>
|
||||
|
||||
|
||||
@@ -61,6 +61,8 @@ void play ( const QString & filename )
|
||||
</PROTOS>
|
||||
|
||||
<SLOTS>
|
||||
void play ()
|
||||
void stop ()
|
||||
</SLOTS>
|
||||
|
||||
<SIGNALS>
|
||||
|
||||
Reference in New Issue
Block a user