2009-12-10 22:22 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)

* contrib/hbqt/hbqt_hbqmainwindow.cpp
  * contrib/hbxbp/xbpgeneric.prg
    + Replaced HB_MUTEXCREATE() and HB_MUTEXDESTROY() with 
      automatic initialization and deinitialization.
    ; NOTE: From now on HBQT needs to be requested by apps 
            willing to use HBQT, with:
               REQUEST HB_QT
            This will ensure in the future that all init and 
            deinit procedure are done correctly. It also makes it 
            safe to use QT even from INIT and EXIT PROCECUREs.

  * contrib/hbqt/tests/demoqt.prg
  * contrib/hbxbp/tests/demoxbp.prg
  * contrib/hbide/hbide.prg
    + Added REQUEST HB_QT.
This commit is contained in:
Viktor Szakats
2009-12-10 21:23:25 +00:00
parent b308f56ac2
commit b8e8be71ec
6 changed files with 44 additions and 7 deletions

View File

@@ -17,6 +17,23 @@
past entries belonging to author(s): Viktor Szakats.
*/
2009-12-10 22:22 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* contrib/hbqt/hbqt_hbqmainwindow.cpp
* contrib/hbxbp/xbpgeneric.prg
+ Replaced HB_MUTEXCREATE() and HB_MUTEXDESTROY() with
automatic initialization and deinitialization.
; NOTE: From now on HBQT needs to be requested by apps
willing to use HBQT, with:
REQUEST HB_QT
This will ensure in the future that all init and
deinit procedure are done correctly. It also makes it
safe to use QT even from INIT and EXIT PROCECUREs.
* contrib/hbqt/tests/demoqt.prg
* contrib/hbxbp/tests/demoxbp.prg
* contrib/hbide/hbide.prg
+ Added REQUEST HB_QT.
2009-12-10 21:49 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbatomic.h
* removed 'static inline' from OpenWatcom ASM functions defined

View File

@@ -78,6 +78,8 @@
/*----------------------------------------------------------------------*/
REQUEST HB_QT
STATIC s_resPath
STATIC s_pathSep

View File

@@ -57,6 +57,7 @@
#include "hbapiitm.h"
#include "hbthread.h"
#include "hbvm.h"
#include "hbinit.h"
#include "hbqt.h"
@@ -293,14 +294,18 @@ HB_FUNC( QT_HBQMAINWINDOW_DESTROY )
hbqt_par_HBQMainWindow( 1 )->~HBQMainWindow();
}
HB_FUNC( QT_MUTEXCREATE )
static void hbqt_hbqmainwindow_init( void * cargo )
{
HB_SYMBOL_UNUSED( cargo );
if( s_mutex == NULL )
s_mutex = hb_threadMutexCreate();
}
HB_FUNC( QT_MUTEXDESTROY )
static void hbqt_hbqmainwindow_exit( void * cargo )
{
HB_SYMBOL_UNUSED( cargo );
if( s_mutex != NULL )
{
hb_itemRelease( s_mutex );
@@ -308,4 +313,18 @@ HB_FUNC( QT_MUTEXDESTROY )
}
}
HB_FUNC( HB_QT ) {;}
HB_CALL_ON_STARTUP_BEGIN( _hbqt_hbqmainwindow_initialize_ )
hb_vmAtInit( hbqt_hbqmainwindow_init, NULL );
hb_vmAtExit( hbqt_hbqmainwindow_exit, NULL );
HB_CALL_ON_STARTUP_END( _hbqt_hbqmainwindow_initialize_ )
#if defined( HB_PRAGMA_STARTUP )
#pragma startup _hbqt_hbqmainwindow_initialize_
#elif defined( HB_DATASEG_STARTUP )
#define HB_DATASEG_BODY HB_DATASEG_FUNC( _hbqt_hbqmainwindow_initialize_ )
#include "hbiniseg.h"
#endif
#endif

View File

@@ -87,6 +87,8 @@
STATIC qApp
REQUEST HB_QT
/*----------------------------------------------------------------------*/
INIT PROCEDURE Qt_Start()

View File

@@ -69,6 +69,8 @@
/*----------------------------------------------------------------------*/
REQUEST HB_QT
REQUEST DbfCdx
#define TAB_1 1

View File

@@ -97,10 +97,7 @@ THREAD STATIC t_oEventLoop
INIT PROCEDURE hbxbp_Start()
Qt_MutexCreate()
t_oDummy := XbpObject():new()
s_oApp := QApplication():new()
RETURN
@@ -121,8 +118,6 @@ EXIT PROCEDURE hbxbp_End()
s_oApp:oWidget:pPtr := 0
#endif
Qt_MutexDestroy()
RETURN
/*----------------------------------------------------------------------*/