2012-06-04 23:24 UTC+0200 Viktor Szakats (harbour syenar.net)

* contrib\gtwvg\wvgwing.c
    ! fixed 64-bit warning (do not use NULL for numeric parameters)

  * contrib\hbqt\gtqtc\gtqtc.cpp
  * contrib\hbqt\hbmk2_qt.hb
  * contrib\hbqt\qtcore\hbqt_bind.cpp
  * contrib\hbqt\qtcore\hbqt_pointer.cpp
  * contrib\hbqt\qtgui\hbqt_errorsys.prg
  * contrib\hbqt\tests\demoqt.prg
  * contrib\hbqt\tests\testbrow.prg
    ! killed HB_TR_ALWAYS _again_. Do not readd them.
    + added TOFIX for .qth information embedded into plugin
    % minor opt in .prg code

  * include\harbour.hbx
  * src\rtl\hbdef.c
    + added __DEFAULTNIL() which is fully compatible with DEFAULT ... TO ...

  * src\debug\dbghelp.prg
  * src\debug\dbgtarr.prg
  * src\debug\dbgthsh.prg
  * src\debug\dbgtmitm.prg
  * src\debug\dbgtobj.prg
  * src\debug\dbgtwin.prg
  * src\debug\debugger.prg
  * src\rdd\usrrdd\rdds\arrayrdd.prg
  * src\rtl\achoice.prg
  * src\rtl\radiogrp.prg
  * src\rtl\tbrowse.prg
  * src\rtl\tclass.prg
  * src\rtl\tget.prg
  * src\rtl\tlabel.prg
  * src\rtl\treport.prg
    * using HB_DEFAULT() instead of DEFAULT ... TO ...
    % deleted '#include "common.ch"' where possible
This commit is contained in:
Viktor Szakats
2012-06-04 21:28:37 +00:00
parent 80e1f2399a
commit d67c95e1bb
26 changed files with 258 additions and 221 deletions

View File

@@ -16,9 +16,46 @@
The license applies to all entries newer than 2009-04-28.
*/
2012-06-04 23:24 UTC+0200 Viktor Szakats (harbour syenar.net)
* contrib\gtwvg\wvgwing.c
! fixed 64-bit warning (do not use NULL for numeric parameters)
* contrib\hbqt\gtqtc\gtqtc.cpp
* contrib\hbqt\hbmk2_qt.hb
* contrib\hbqt\qtcore\hbqt_bind.cpp
* contrib\hbqt\qtcore\hbqt_pointer.cpp
* contrib\hbqt\qtgui\hbqt_errorsys.prg
* contrib\hbqt\tests\demoqt.prg
* contrib\hbqt\tests\testbrow.prg
! killed HB_TR_ALWAYS _again_. Do not readd them.
+ added TOFIX for .qth information embedded into plugin
% minor opt in .prg code
* include\harbour.hbx
* src\rtl\hbdef.c
+ added __DEFAULTNIL() which is fully compatible with DEFAULT ... TO ...
* src\debug\dbghelp.prg
* src\debug\dbgtarr.prg
* src\debug\dbgthsh.prg
* src\debug\dbgtmitm.prg
* src\debug\dbgtobj.prg
* src\debug\dbgtwin.prg
* src\debug\debugger.prg
* src\rdd\usrrdd\rdds\arrayrdd.prg
* src\rtl\achoice.prg
* src\rtl\radiogrp.prg
* src\rtl\tbrowse.prg
* src\rtl\tclass.prg
* src\rtl\tget.prg
* src\rtl\tlabel.prg
* src\rtl\treport.prg
* using HB_DEFAULT() instead of DEFAULT ... TO ...
% deleted '#include "common.ch"' where possible
2012-06-04 14:11 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbqt/qscintilla/qth/QsciStyledText.qth
! Fixed: ( residual ) usage of hbqt_par_QString().
! Fixed: ( residual ) usage of hbqt_par_QString().
2012-06-04 14:02 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbide/hbqreportsmanager.prg
@@ -39,7 +76,7 @@
* contrib/hbide/idetools.prg
* contrib/hbide/ideuisrcmanager.prg
! Changed: QIcon() specific calls respecting latest changes in hbQT.
* Optimized some code to respond to old and __HBQT_REVAMP__ proto.
* Optimized some code to respond to old and __HBQT_REVAMP__ proto.
2012-06-04 14:00 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbqt/tests/demoqt.prg
@@ -63,16 +100,16 @@
2012-06-04 13:34 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbqt/hbmk2_qt.hb
! Guarded: qth_is_QObject() function under __HBQT_REVAMP__.
This facilitates to change how we would like to use this
construct in the future. Also there is a lot which may be
This facilitates to change how we would like to use this
construct in the future. Also there is a lot which may be
added to this protocol, apart from only detecting if a class
is QObject() derived, and hence is subject to change.
We will do what is proposed after all is settled on new
We will do what is proposed after all is settled on new
protocol.
- Removed: QIcon() hack which was exploiting hbqt_par_Qstring()
usage. Also it was not per Qt documantation. Now anywhere
an icon is needed, it has to be constructed explicitily
usage. Also it was not per Qt documantation. Now anywhere
an icon is needed, it has to be constructed explicitily
with a call to QIcon( cFileName ). Earlier QIcon() was passed
as only a <cFileName>
@@ -106,14 +143,14 @@
; NOTE: hbIDE is almost running under __HBQT_REVAMP__ methodoly
with signal/slots/events catched anfired properly.
This implementation is subject to a lot of improvements
but at of current shows up a good promise to achieve
This implementation is subject to a lot of improvements
but at of current shows up a good promise to achieve
the end-results soon.
2012-06-04 13:30 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbqt/qscintilla/qth/QsciStyle.qth
* contrib/hbqt/qscintilla/qth/QsciStyledText.qth
! Fixed: usage of hbqt_par_QString().
! Fixed: usage of hbqt_par_QString().
2012-06-04 13:27 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/gtwvg/wvgwing.c

View File

@@ -1228,13 +1228,14 @@ HB_FUNC( WVG_CREATETOOLTIPWINDOW )
HWND hwndTip;
TOOLINFO toolInfo;
hwndTip = CreateWindowEx( ( DWORD ) NULL, TOOLTIPS_CLASS, NULL,
WS_POPUP | TTS_ALWAYSTIP, // | TTS_BALLOON,
CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT,
wvg_parhwnd( 1 ), ( HMENU ) NULL,
( HINSTANCE ) wvg_hInstance(),
( LPVOID ) NULL);
hwndTip = CreateWindowEx( 0, TOOLTIPS_CLASS, 0,
WS_POPUP | TTS_ALWAYSTIP, // | TTS_BALLOON,
CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT,
wvg_parhwnd( 1 ),
NULL,
wvg_hInstance(),
NULL );
if( ! hwndTip )
return;
@@ -1271,4 +1272,3 @@ HB_FUNC( WVG_SETTOOLTIPTEXT )
}
/*----------------------------------------------------------------------*/

View File

@@ -1415,7 +1415,7 @@ bool DrawingArea::createCaret( int iWidth, int iHeight )
{
_crtWidth = iWidth;
_crtHeight = iHeight;
//HB_TRACE( HB_TR_ALWAYS, ( "bool DrawingArea::createCaret() %i %i %i %i", _crtLastRow, _crtLastCol, iWidth, iHeight ) );
//HB_TRACE( HB_TR_DEBUG, ( "bool DrawingArea::createCaret() %i %i %i %i", _crtLastRow, _crtLastCol, iWidth, iHeight ) );
_bCaretOn = HB_TRUE;
_bBlinking = HB_FALSE;
displayCell( _crtLastRow, _crtLastCol );
@@ -1428,13 +1428,13 @@ bool DrawingArea::createCaret( int iWidth, int iHeight )
}
void DrawingArea::hideCaret( void )
{
//HB_TRACE( HB_TR_ALWAYS, ( "bool DrawingArea::hideCaret() %i %i", _crtLastRow, _crtLastCol ) );
//HB_TRACE( HB_TR_DEBUG, ( "bool DrawingArea::hideCaret() %i %i", _crtLastRow, _crtLastCol ) );
_bCaretOn = HB_FALSE;
displayCell( _crtLastRow, _crtLastCol );
}
void DrawingArea::showCaret( void )
{
//HB_TRACE( HB_TR_ALWAYS, ( "bool DrawingArea::showCaret() %i %i", _crtLastRow, _crtLastCol ) );
//HB_TRACE( HB_TR_DEBUG, ( "bool DrawingArea::showCaret() %i %i", _crtLastRow, _crtLastCol ) );
if( ! _basicTimer->isActive() )
{
_basicTimer->start( 500, this );
@@ -1447,7 +1447,7 @@ void DrawingArea::destroyCaret( void )
_basicTimer->stop();
_bCaretOn = HB_FALSE;
displayCell( _crtLastRow, _crtLastCol );
//HB_TRACE( HB_TR_ALWAYS, ( "void DrawingArea::destroyCaret( void )" ) );
//HB_TRACE( HB_TR_DEBUG, ( "void DrawingArea::destroyCaret( void )" ) );
}
void DrawingArea::setCaretPos( int iCol, int iRow )
{
@@ -1650,7 +1650,7 @@ void DrawingArea::focusInEvent( QFocusEvent *event )
void DrawingArea::focusOutEvent( QFocusEvent *event )
{
//HB_TRACE( HB_TR_ALWAYS, ( "void DrawingArea::focusOutEvent( QFocusEvent *event )" ) );
//HB_TRACE( HB_TR_DEBUG, ( "void DrawingArea::focusOutEvent( QFocusEvent *event )" ) );
// this->hideCaret(); /* Disableing for the time being */
HB_SYMBOL_UNUSED( event );
/* Either of IN or OUT messagess */

View File

@@ -1241,7 +1241,7 @@ METHOD HbQtSource:new( cQtModule, cQtVer, cQTHFileName, cCPPFileName, cDOCFileNa
::isObject := qth_is_QObject( ::cQtObject )
#else
::isObject := AScan( ::cls_, {| e_ | Lower( e_[ 1 ] ) == "qobject" .AND. Lower( e_[ 2 ] ) == "no" } ) == 0
#endif
#endif
::areMethodsClubbed := AScan( ::cls_, {| e_ | Lower( e_[ 1 ] ) == "clubmethods" .AND. Lower( e_[ 2 ] ) == "no" } ) == 0
/* Determine Constructor - but this is hacky a bit. What could be easiest ? */
IF ! ::isConstructor
@@ -1413,7 +1413,7 @@ METHOD HbQtSource:build()
FOR EACH s IN ::hRef
AAdd( aLine, "extern HB_EXPORT void * hbqt_gcAllocate_" + s:__enumKey() + "( void * pObj, bool bNew );" )
NEXT
#ifdef __HBQT_REVAMP__
AAdd( aLine, '' )
AAdd( aLine, "/*.............. HBQT2 SPECIFIC DECLARATIONS ...............*/" )
@@ -1424,7 +1424,7 @@ METHOD HbQtSource:build()
AAdd( aLine, '' )
AAdd( aLine, "/*..........................................................*/" )
AAdd( aLine, '' )
#endif
#endif
n := AScan( ::cls_, {| e_ | Left( Lower( e_[ 1 ] ), 7 ) == "inherit" .and. ! Empty( e_[ 2 ] ) } )
IF n > 0
@@ -1432,21 +1432,21 @@ METHOD HbQtSource:build()
ELSE
s := "HBQTOBJECTHANDLER"
ENDIF
AAdd( aLine, "" )
AAdd( aLine, "extern HB_EXPORT void hbqt_register_" + lower( uQtObject ) + "();" )
AAdd( aLine, "" )
AAdd( aLine, "" )
AAdd( aLine, "extern HB_EXPORT void hbqt_register_" + lower( uQtObject ) + "();" )
AAdd( aLine, "" )
FOR EACH k IN hb_aTokens( s, "," )
k := lower( AllTrim( k ) )
IF k == "hbqtobjecthandler"
AAdd( aLine, "HB_FUNC_EXTERN( " + Upper( k ) + " );" )
ELSE
ELSE
AAdd( aLine, "extern HB_EXPORT void hbqt_register_" + substr( k,4 ) + "();" )
ENDIF
ENDIF
NEXT
AAdd( aLine, "" )
IF ::cQtVer > "0x040500"
AAdd( aLine, "#endif" )
ENDIF
@@ -1502,7 +1502,7 @@ METHOD HbQtSource:build()
ENDIF
#define __GCMARK__
::buildExtendedSource( aLine ) /* Insert protected functions */
IF ::cQtVer > "0x040500"
@@ -1652,7 +1652,7 @@ METHOD HbQtSource:build()
else
AAdd( aLine, " p->mark = NULL;" )
ENDIF
AAdd( aLine, "" )
#ifdef _GEN_TRACE_
AAdd( aLine, " if( bNew )" )
@@ -1670,7 +1670,7 @@ METHOD HbQtSource:build()
AAdd( aLine, "#endif" )
ENDIF
AAdd( aLine, "" )
AAdd( aLine, 'static PHB_ITEM s_oClass = NULL;' )
AAdd( aLine, "" )
@@ -1694,17 +1694,17 @@ METHOD HbQtSource:build()
AAdd( aLine, " }" )
AAdd( aLine, " }" )
AAdd( aLine, " delete ( ( " + ::cQtObject + "< void * >" + " * ) pObj );" )
ELSE
ELSE
IF ::isConstructor .and. ::isDestructor
AAdd( aLine, ' delete ( ' + ::cQtObject + ' * ) pObj;' )
ENDIF
ENDIF
ENDIF
ENDIF
AAdd( aLine, ' pObj = NULL;' )
AAdd( aLine, ' }' )
AAdd( aLine, ' }' )
AAdd( aLine, '}' )
AAdd( aLine, "/*..........................................................*/" )
AAdd( aLine, '' )
#endif
#endif
AAdd( aLine, 'void hbqt_register_' + lower( uQtObject ) + '()' )
AAdd( aLine, "{" )
@@ -1718,9 +1718,9 @@ METHOD HbQtSource:build()
k := lower( AllTrim( k ) )
IF k == "hbqtobjecthandler"
AAdd( aLine, " HB_FUNC_EXEC( " + Upper( k ) + " );" )
ELSE
ELSE
AAdd( aLine, " hbqt_register_" + substr( k, 4 ) + "();" )
ENDIF
ENDIF
NEXT
AAdd( aLine, ' PHB_ITEM oClass = hbqt_defineClassBegin( "' + uQtObject + '", s_oClass, "' + s + '" );' )
AAdd( aLine, " if( oClass )" )
@@ -1732,17 +1732,17 @@ METHOD HbQtSource:build()
AAdd( aLine, " HB_HBQT_UNLOCK" )
AAdd( aLine, "}" )
AAdd( aLine, "" )
AAdd( aLine, "HB_FUNC( HB_" + uQtObject + " )" )
AAdd( aLine, "{" )
AAdd( aLine, ' HB_TRACE( HB_TR_DEBUG, ( "HB_' + uQtObject + '" ) );' )
AAdd( aLine, " if( s_oClass == NULL )" )
AAdd( aLine, "{" )
AAdd( aLine, ' HB_TRACE( HB_TR_DEBUG, ( "HB_' + uQtObject + '" ) );' )
AAdd( aLine, " if( s_oClass == NULL )" )
AAdd( aLine, " {" )
AAdd( aLine, " hbqt_register_" + lower( uQtObject ) + "();" )
AAdd( aLine, " }" )
AAdd( aLine, ' hb_objSendMsg( s_oClass, "INSTANCE", 0 );' )
AAdd( aLine, "}" )
AAdd( aLine, "" )
AAdd( aLine, " }" )
AAdd( aLine, ' hb_objSendMsg( s_oClass, "INSTANCE", 0 );' )
AAdd( aLine, "}" )
AAdd( aLine, "" )
/* Build PRG level constructor */
AAdd( aLine, ::newW_[ 1 ] ) // Func definition
@@ -2001,9 +2001,9 @@ METHOD HbQtSource:getConstructor()
AAdd( aLine, " " )
#ifdef __HBQT_REVAMP__
AAdd( aLine, ' hb_itemReturnRelease( hbqt_bindGetHbObject( NULL, pObj, hb_dynsymGetSymbol( "' + 'HB_' + upper( ::cQtObject ) +'" ), hbqt_del_' + ::cQtObject + ', ' + qth_get_bits( ::cQtObject, .t. ) + ' ) );' )
#else
#else
AAdd( aLine, " hbqt_itemPushReturn( hbqt_gcAllocate_" + ::cQtObject + "( ( void * ) pObj, " + iif( ::isDetached, "false", "true" ) + " ), hb_stackSelfItem() );" )
#endif
#endif
ELSE
FOR i := 3 TO Len( ::new_ ) - 1
AAdd( aLine, ::new_[ i ] )
@@ -2407,9 +2407,9 @@ STATIC FUNCTION hbqtgen_paramCheckStrCpp( cType, nArg, cCast, lObj )
CASE "O"
IF lObj
RETURN "HB_ISOBJECT( " + hb_ntos( nArg ) + " )"
ELSE
ELSE
RETURN "hbqt_par_isDerivedFrom( " + hb_ntos( nArg ) + ', "' + upper( cCast ) +'" )'
ENDIF
ENDIF
CASE "N*"
RETURN "HB_ISBYREF( " + hb_ntos( nArg ) + " )"
CASE "N"
@@ -2573,7 +2573,7 @@ METHOD HbQtSource:parseProto( cProto, fBody_ )
EXIT
CASE "R"
oMtd:nDetachRet := val( cVal )
EXIT
EXIT
CASE "xxx"
EXIT
ENDSWITCH
@@ -2980,9 +2980,9 @@ METHOD HbQtSource:buildCppCode( oMtd )
cRef := oRet:cCast
#ifdef __HBQT_REVAMP__
oMtd:cCmd := 'hb_itemReturn( hbqt_bindGetHbObject( NULL, ' + "( void * ) " + oMtd:cCmn + ', hb_dynsymGetSymbol( "' + 'HB_' + Upper( ::cQtObject ) + '" ), hbqt_del_' + ::cQtObject + ', ' + qth_get_bits( ::cQtObject, .f. ) + ' ) )'
#else
#else
oMtd:cCmd := "hbqt_create_objectGC( hbqt_gcAllocate_" + oRet:cCast + "( ( void * ) " + oMtd:cCmn + ", false ) " + ', "HB_' + Upper( ::cQtObject ) + '" )'
#endif
#endif
oMtd:cPrgRet := "o" + oMtd:cDocNMRet
CASE hbqtgen_isAqtObject( oRet:cCast ) .AND. ;
@@ -2992,9 +2992,9 @@ METHOD HbQtSource:buildCppCode( oMtd )
cRef := oRet:cCast
#ifdef __HBQT_REVAMP__
oMtd:cCmd := 'hb_itemReturn( hbqt_bindGetHbObject( NULL, ' + "( void * ) " + oMtd:cCmn + ', hb_dynsymGetSymbol( "' + 'HB_' + Upper( ::cQtObject ) + '" ), hbqt_del_' + ::cQtObject + ', ' + qth_get_bits( ::cQtObject, .f. ) + ' ) )'
#else
#else
oMtd:cCmd := "hbqt_create_objectGC( hbqt_gcAllocate_" + oRet:cCast + "( ( void * ) " + oMtd:cCmn + ", false ) " + ', "HB_' + Upper( ::cQtObject ) + '" )'
#endif
#endif
oMtd:cPrgRet := "o" + oMtd:cDocNMRet
CASE hbqtgen_isAqtObject( oRet:cCast ) .AND. ;
@@ -3218,7 +3218,7 @@ METHOD HbqtArgument:new( cTxt, cQtObject, enum_, lConstL, lIsRetArg )
STATIC FUNCTION hbqtgen_Get_Command_1( cWgt, cCmn )
#ifdef __HBQT_REVAMP__
RETURN 'hb_itemReturn( hbqt_bindGetHbObject( NULL, ' + 'new ' + cWgt + '( *( ' + cCmn + ' ) )' + ', hb_dynsymGetSymbol( "' + 'HB_' + Upper( cWgt ) + '" ), hbqt_del_' + cWgt + ', ' + qth_get_bits( cWgt, .t. ) + ' ) )'
#else
#else
RETURN "hbqt_create_objectGC( hbqt_gcAllocate_" + cWgt + "( new " + cWgt + "( *( " + cCmn + " ) ), true ), " + '"HB_' + Upper( cWgt ) + '")'
#endif
/*----------------------------------------------------------------------*/
@@ -3235,16 +3235,16 @@ STATIC FUNCTION hbqtgen_Get_Command( cWgt, cCmn, lNew, isRetDetached )
#ifdef __HBQT_REVAMP__
IF lNew
RETURN 'hb_itemReturn( hbqt_bindGetHbObject( NULL, ' + 'new ' + cWgt + '( ' + cCmn + ' )' + ', hb_dynsymGetSymbol( "' + 'HB_' + Upper( cWgt ) + '" ), hbqt_del_' + cWgt + ', ' + qth_get_bits( cWgt, .t. ) + ' ) )'
ELSE
ELSE
RETURN 'hb_itemReturn( hbqt_bindGetHbObject( NULL, ' + cCmn + ', hb_dynsymGetSymbol( "' + 'HB_' + Upper( cWgt ) + '" ), hbqt_del_' + cWgt + ', ' + qth_get_bits( cWgt, isRetDetached ) + ' ) )'
ENDIF
#else
ENDIF
#else
IF lNew
RETURN "hbqt_create_objectGC( hbqt_gcAllocate_" + cWgt + "( new " + cWgt + "( " + cCmn + " ), true ), " + '"HB_' + Upper( cWgt ) +'" )'
ELSE
RETURN "hbqt_create_objectGC( hbqt_gcAllocate_" + cWgt + "( " + cCmn + ", " + iif( isRetDetached, "true", "false" ) + " ), " + '"HB_' + Upper( cWgt ) +'" )'
ENDIF
#endif
#endif
RETURN ""
/*----------------------------------------------------------------------*/
@@ -3418,41 +3418,44 @@ STATIC FUNCTION qth_is_extended( cQTHFileName )
STATIC FUNCTION qth_is_QObject( cWidget )
STATIC aQObjects := {}
IF lower( left( cWidget, 3 ) ) == "hbq"
cWidget := substr( cWidget, 3 )
ENDIF
ENDIF
/* TOFIX: add this information to .qth.
it breaks modularity and split the same king of information between
this plugin and .qth files. */
IF empty( aQObjects )
aadd( aQObjects, "QObject" )
aadd( aQObjects, "QAbstractAnimation" )
aadd( aQObjects, "QObject" )
aadd( aQObjects, "QAbstractAnimation" )
aadd( aQObjects, "QAbstractEventDispatcher" )
aadd( aQObjects, "QAbstractFontEngine" )
aadd( aQObjects, "QAbstractItemDelegate" )
aadd( aQObjects, "QAbstractItemModel" )
aadd( aQObjects, "QAbstractItemDelegate" )
aadd( aQObjects, "QAbstractItemModel" )
aadd( aQObjects, "QAbstractMessageHandler" )
aadd( aQObjects, "QAbstractNetworkCache" )
aadd( aQObjects, "QAbstractState" )
aadd( aQObjects, "QAbstractNetworkCache" )
aadd( aQObjects, "QAbstractState" )
aadd( aQObjects, "QAbstractTextDocumentLayout" )
aadd( aQObjects, "QAbstractTransition" )
aadd( aQObjects, "QAbstractTransition" )
aadd( aQObjects, "QAbstractUriResolver" )
aadd( aQObjects, "QAbstractVideoSurface" )
aadd( aQObjects, "QAccessibleBridgePlugin" )
aadd( aQObjects, "QAccessiblePlugin" )
aadd( aQObjects, "QAction" )
aadd( aQObjects, "QAction" )
aadd( aQObjects, "QActionGroup" )
aadd( aQObjects, "QAudioInput" )
aadd( aQObjects, "QAudioOutput" )
aadd( aQObjects, "QAxFactory" )
aadd( aQObjects, "QAxObject" )
aadd( aQObjects, "QAxObject" )
aadd( aQObjects, "QAxScript" )
aadd( aQObjects, "QAxScriptManager" )
aadd( aQObjects, "QButtonGroup" )
aadd( aQObjects, "QClipboard" )
aadd( aQObjects, "QCompleter" )
aadd( aQObjects, "QCopChannel" )
aadd( aQObjects, "QCoreApplication" )
aadd( aQObjects, "QCoreApplication" )
aadd( aQObjects, "QDataWidgetMapper" )
aadd( aQObjects, "QDBusAbstractAdaptor" )
aadd( aQObjects, "QDBusAbstractInterface" )
@@ -3477,7 +3480,7 @@ STATIC FUNCTION qth_is_QObject( cWidget )
aadd( aQObjects, "QFtp" )
aadd( aQObjects, "QFutureWatcher" )
aadd( aQObjects, "QGenericPlugin" )
aadd( aQObjects, "QGesture" )
aadd( aQObjects, "QGesture" )
aadd( aQObjects, "QGLShader" )
aadd( aQObjects, "QGLShaderProgram" )
aadd( aQObjects, "QGraphicsAnchor" )
@@ -3565,7 +3568,7 @@ STATIC FUNCTION qth_is_QObject( cWidget )
aadd( aQObjects, "QDesignerPropertyEditorInterface" )
aadd( aQObjects, "QDesignerWidgetBoxInterface" )
aadd( aQObjects, "QDesktopWidget" )
aadd( aQObjects, "QDialog" )
aadd( aQObjects, "QDialog" )
aadd( aQObjects, "QDialogButtonBox" )
aadd( aQObjects, "QDockWidget" )
aadd( aQObjects, "QFocusFrame" )
@@ -3599,18 +3602,18 @@ STATIC FUNCTION qth_is_QObject( cWidget )
aadd( aQObjects, "QWSEmbedWidget" )
aadd( aQObjects, "QX11EmbedContainer" )
aadd( aQObjects, "QX11EmbedWidget" )
aadd( aQObjects, "QAnimationGroup" )
aadd( aQObjects, "QPauseAnimation" )
aadd( aQObjects, "QVariantAnimation" )
aadd( aQObjects, "QParallelAnimationGroup" )
aadd( aQObjects, "QSequentialAnimationGroup" )
aadd( aQObjects, "QPropertyAnimation" )
aadd( aQObjects, "QItemDelegate" )
aadd( aQObjects, "QStyledItemDelegate" )
aadd( aQObjects, "QSqlRelationalDelegate" )
aadd( aQObjects, "QSqlRelationalTableModel" )
aadd( aQObjects, "QSqlTableModel" )
aadd( aQObjects, "QSqlQueryModel" )
@@ -3626,54 +3629,54 @@ STATIC FUNCTION qth_is_QObject( cWidget )
aadd( aQObjects, "QHelpContentModel" )
aadd( aQObjects, "QProxyModel" )
aadd( aQObjects, "QStandardItemModel" )
aadd( aQObjects, "QNetworkDiskCache" )
aadd( aQObjects, "QFinalState" )
aadd( aQObjects, "QHistoryState" )
aadd( aQObjects, "QState" )
aadd( aQObjects, "QStateMachine" )
aadd( aQObjects, "QPlainTextDocumentLayout" )
aadd( aQObjects, "QEventTransition" )
aadd( aQObjects, "QSignalTransition" )
aadd( aQObjects, "QKeyEventTransition" )
aadd( aQObjects, "QMouseEventTransition" )
aadd( aQObjects, "QMenuItem" )
aadd( aQObjects, "QWidgetAction" )
aadd( aQObjects, "QAxScriptEngine" )
aadd( aQObjects, "QApplication" )
aadd( aQObjects, "QDBusConnectionInterface" )
aadd( aQObjects, "QDBusInterface" )
aadd( aQObjects, "QPanGesture" )
aadd( aQObjects, "QPinchGesture" )
aadd( aQObjects, "QSwipeGesture" )
aadd( aQObjects, "QTapAndHoldGesture" )
aadd( aQObjects, "QTapGesture" )
aadd( aQObjects, "QGraphicsBlurEffect" )
aadd( aQObjects, "QGraphicsColorizeEffect" )
aadd( aQObjects, "QGraphicsDropShadowEffect" )
aadd( aQObjects, "QGraphicsOpacityEffect" )
aadd( aQObjects, "QDeclarativeItem" )
aadd( aQObjects, "QGraphicsSvgItem" )
aadd( aQObjects, "QGraphicsTextItem" )
aadd( aQObjects, "QGraphicsWidget" )
aadd( aQObjects, "QGraphicsProxyWidget" )
aadd( aQObjects, "QGraphicsWebView" )
aadd( aQObjects, "QGraphicsRotation" )
aadd( aQObjects, "QGraphicsScale" )
aadd( aQObjects, "QHelpEngine" )
aadd( aQObjects, "QAbstractSocket" )
aadd( aQObjects, "QBuffer" )
aadd( aQObjects, "QFile" )
@@ -3684,42 +3687,42 @@ STATIC FUNCTION qth_is_QObject( cWidget )
aadd( aQObjects, "QUdpSocket" )
aadd( aQObjects, "QSslSocket" )
aadd( aQObjects, "QTemporaryFile" )
aadd( aQObjects, "QBoxLayout" )
aadd( aQObjects, "QFormLayout" )
aadd( aQObjects, "QGridLayout" )
aadd( aQObjects, "QStackedLayout" )
aadd( aQObjects, "QHBoxLayout" )
aadd( aQObjects, "QVBoxLayout" )
aadd( aQObjects, "QTextBlockGroup" )
aadd( aQObjects, "QTextFrame" )
aadd( aQObjects, "QTextList" )
aadd( aQObjects, "QTextTable" )
aadd( aQObjects, "QDoubleValidator" )
aadd( aQObjects, "QIntValidator" )
aadd( aQObjects, "QRegExpValidator" )
aadd( aQObjects, "QCheckBox" )
aadd( aQObjects, "QPushButton" )
aadd( aQObjects, "QRadioButton" )
aadd( aQObjects, "Q3Button" )
aadd( aQObjects, "QToolButton" )
aadd( aQObjects, "QCommandLinkButton" )
aadd( aQObjects, "QDial" )
aadd( aQObjects, "QScrollBar" )
aadd( aQObjects, "QSlider" )
aadd( aQObjects, "QDateTimeEdit" )
aadd( aQObjects, "QDoubleSpinBox" )
aadd( aQObjects, "QSpinBox" )
aadd( aQObjects, "QDateEdit" )
aadd( aQObjects, "QTimeEdit" )
aadd( aQObjects, "QFontComboBox" )
aadd( aQObjects, "QAbstractPrintDialog" )
aadd( aQObjects, "QColorDialog" )
aadd( aQObjects, "QErrorMessage" )
@@ -3732,7 +3735,7 @@ STATIC FUNCTION qth_is_QObject( cWidget )
aadd( aQObjects, "QProgressDialog" )
aadd( aQObjects, "QWizard" )
aadd( aQObjects, "QPrintDialog" )
aadd( aQObjects, "QAbstractScrollArea" )
aadd( aQObjects, "QLabel" )
aadd( aQObjects, "QLCDNumber" )
@@ -3758,12 +3761,12 @@ STATIC FUNCTION qth_is_QObject( cWidget )
aadd( aQObjects, "QTreeWidget" )
aadd( aQObjects, "QDeclarativeView" )
aadd( aQObjects, "QTextBrowser" )
ENDIF
ENDIF
RETURN ascan( aQObjects, {|e| e == cWidget } ) > 0
/*----------------------------------------------------------------------*/
#define HBQT_BIT_NONE 0
#define HBQT_BIT_OWNER 1
#define HBQT_BIT_QOBJECT 2
@@ -3773,16 +3776,15 @@ STATIC FUNCTION qth_is_QObject( cWidget )
STATIC FUNCTION qth_get_bits( cWidget, lNew )
LOCAL nBits := HBQT_BIT_NONE
IF lNew
nBits := hb_bitOr( nBits, HBQT_BIT_OWNER )
ENDIF
ENDIF
IF qth_is_QObject( cWidget )
nBits := hb_bitOr( nBits, HBQT_BIT_QOBJECT )
ENDIF
ENDIF
RETURN hb_ntos( nBits )
#endif
/*----------------------------------------------------------------------*/

View File

@@ -96,7 +96,7 @@ HBQT_BIND, * PHBQT_BIND;
static PHBQT_BIND s_hbqt_binds = NULL;
static HBQDestroyer * s_destroyer = NULL;
static PHB_DYNS s_dynsym_NEW = NULL;
static PHB_DYNS s_dynsym___CHILDS = NULL;
static PHB_DYNS s_dynsym___SLOTS = NULL;
@@ -125,16 +125,16 @@ static PHB_ITEM hb_arrayCreateClone( PHB_ITEM pItem,
PHB_ITEM hbqt_bindGetHbObject( PHB_ITEM pItem, void * qtObject, PHB_SYMB pClassFunc, PHBQT_DEL_FUNC pDelFunc, int iFlags )
{
HB_TRACE( HB_TR_DEBUG, ( "hbqt_bindGetHbObject( %p )", qtObject ) );
PHBQT_BIND bind;
PHB_ITEM pObject = NULL;
PHB_ITEM pObject = NULL;
HBQT_BIND_LOCK
bind = s_hbqt_binds;
while( bind )
{
if( bind->qtObject == qtObject )
{
HB_TRACE( HB_TR_ALWAYS, ( "hbqt_bindGetHbObject( %p ):if( bind->qtObject == qtObject )", qtObject ) );
HB_TRACE( HB_TR_DEBUG, ( "hbqt_bindGetHbObject( %p ):if( bind->qtObject == qtObject )", qtObject ) );
pObject = hb_arrayCreateClone( pItem, ( PHB_BASEARRAY ) bind->hbObject );
break;
}
@@ -157,8 +157,8 @@ PHB_ITEM hbqt_bindGetHbObject( PHB_ITEM pItem, void * qtObject, PHB_SYMB pClassF
}
if( bind == NULL )
{
HB_TRACE( HB_TR_ALWAYS, ( "hbqt_bindGetHbObject( %p )", qtObject ) );
HB_TRACE( HB_TR_DEBUG, ( "hbqt_bindGetHbObject( %p )", qtObject ) );
bind = ( PHBQT_BIND ) hb_xgrab( sizeof( HBQT_BIND ) );
memset( bind, 0, sizeof( HBQT_BIND ) );
bind->qtObject = qtObject;
@@ -172,7 +172,7 @@ PHB_ITEM hbqt_bindGetHbObject( PHB_ITEM pItem, void * qtObject, PHB_SYMB pClassF
{
if( s_destroyer == NULL )
s_destroyer = new HBQDestroyer();
QObject::connect( ( QObject * ) qtObject, SIGNAL(destroyed(QObject*)), s_destroyer, SLOT(destroyer()) );
}
}
@@ -185,7 +185,7 @@ PHB_ITEM hbqt_bindGetHbObject( PHB_ITEM pItem, void * qtObject, PHB_SYMB pClassF
void * hbqt_bindGetQtObject( PHB_ITEM pObject )
{
HB_TRACE( HB_TR_DEBUG, ( "hbqt_bindGetQtObject()" ) );
void * hbObject = hb_arrayId( pObject );
void * qtObject = NULL;
@@ -198,7 +198,7 @@ void * hbqt_bindGetQtObject( PHB_ITEM pObject )
while( bind )
{
HB_TRACE( HB_TR_DEBUG, ( "hbqt_bindGetQtObject( %p )", bind->qtObject ) );
if( bind->hbObject == hbObject )
{
qtObject = bind->qtObject;
@@ -404,14 +404,14 @@ void hbqt_bindDestroyHbObject( PHB_ITEM pObject )
QObject * obj = ( QObject * ) bind->qtObject;
if( obj && obj->parent() == NULL )
{
HB_TRACE( HB_TR_ALWAYS, ( "hbqt_bindDestroyHbObject( %p )", bind->qtObject ) );
HB_TRACE( HB_TR_DEBUG, ( "hbqt_bindDestroyHbObject( %p )", bind->qtObject ) );
bind->pDelFunc( bind->qtObject, bind->iFlags );
}
}
}
else
{
{
bind->pDelFunc( bind->qtObject, bind->iFlags );
}
}
}
hb_xfree( bind ); /* By all means we need to clean Harbour ocuupied memory */
break;
@@ -432,7 +432,7 @@ void hbqt_bindDestroyQtObject( void * qtObject )
{
if( bind->qtObject == qtObject )
{
HB_TRACE( HB_TR_ALWAYS, ( "hbqt_bindDestroyQtObject( %p )", bind->qtObject ) );
HB_TRACE( HB_TR_DEBUG, ( "hbqt_bindDestroyQtObject( %p )", bind->qtObject ) );
* bind_ptr = bind->next;
hb_xfree( bind );
break;
@@ -460,7 +460,7 @@ HB_FUNC( __HBQT_DESTROY )
PHB_ITEM pObject = hb_param( 1, HB_IT_OBJECT );
if( pObject )
hbqt_bindDestroyHbObject( pObject );
#endif
#endif
}
HB_CALL_ON_STARTUP_BEGIN( _hbqt_bind_init_ )
@@ -473,4 +473,3 @@ HB_CALL_ON_STARTUP_END( _hbqt_bind_init_ )
#define HB_DATASEG_BODY HB_DATASEG_FUNC( _hbqt_bind_init_ )
#include "hbiniseg.h"
#endif

View File

@@ -122,18 +122,18 @@ void * hbqt_par_ptr( int iParam )
HB_TRACE( HB_TR_DEBUG, ( "hbqt_par_ptr( %d )", iParam ) );
#ifdef __HBQT_REVAMP__
return hbqt_bindGetQtObject( hb_param( iParam, HB_IT_OBJECT ) );
#else
#else
return s_hbqt_GCPointerFromItem( hb_param( iParam, HB_IT_ANY ) );
#endif
#endif
}
void * hbqt_get_ptr( PHB_ITEM pObj )
{
#ifdef __HBQT_REVAMP__
return hbqt_bindGetQtObject( pObj );
#else
#else
return s_hbqt_GCPointerFromItem( pObj );
#endif
#endif
}
static void s_hbqt_set_ptr( PHB_ITEM pSelf, void * ptr )
@@ -273,12 +273,12 @@ HB_FUNC( __HBQT_ISPOINTER )
pObject = hb_param( 1, HB_IT_OBJECT );
if( pObject )
hb_retl( ! ( hbqt_bindGetQtObject( pObject ) == NULL ) );
else
else
hb_retl( HB_FALSE );
#else
HBQT_GC_T * p = ( HBQT_GC_T * ) hb_parptrGC( hbqt_gcFuncs(), 1 );
hb_retl( p && p->ph );
#endif
#endif
}
HB_FUNC( HBQT_ISEQUAL )
@@ -408,7 +408,7 @@ PHB_ITEM hbqt_create_object( void * pObject, const char * pszObjectName )
PHB_ITEM pRetVal;
PHB_ITEM pItem;
HB_TRACE( HB_TR_ALWAYS, ( "create_object %s", pszObjectName ) );
HB_TRACE( HB_TR_DEBUG, ( "create_object %s", pszObjectName ) );
hb_vmPushDynSym( hb_dynsymGet( pszObjectName ) );
hb_vmPushNil();
@@ -427,22 +427,22 @@ PHB_ITEM hbqt_create_objectGC( void * pObject, const char * pszObjectName )
{
PHB_ITEM pItem, pRetVal;
//HB_TRACE( HB_TR_ALWAYS, ( "create_object_GC %s", pszObjectName ) );
//HB_TRACE( HB_TR_DEBUG, ( "create_object_GC %s", pszObjectName ) );
hb_vmPushDynSym( hb_dynsymGet( pszObjectName ) );
hb_vmPushNil();
hb_vmDo( 0 );
pRetVal = hb_itemNew( hb_stackReturnItem() );
pItem = hb_itemPutPtrGC( NULL, pObject );
hb_objSendMsg( pRetVal, "_PPTR", 1, pItem );
hb_itemReturnRelease( pRetVal );
//hb_itemReturn( pRetVal );
hb_itemRelease( pItem );
//HB_TRACE( HB_TR_ALWAYS, ( ".............................create_object_GC %s", pszObjectName ) );
//HB_TRACE( HB_TR_DEBUG, ( ".............................create_object_GC %s", pszObjectName ) );
return hb_stackReturnItem();
}
@@ -465,13 +465,13 @@ HB_BOOL hbqt_par_isDerivedFrom( int iParam, const char * pszClsName )
hb_errRT_BASE( EG_ARG, 9999, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
else
return hbqt_obj_isDerivedFrom( pItem, pszClsName );
#else
#else
if( s_hbqt_GCPointerFromItem( pItem ) == NULL )
hb_errRT_BASE( EG_ARG, 9999, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
else
return hbqt_obj_isDerivedFrom( pItem, pszClsName );
#endif
}
#endif
}
return HB_FALSE;
}
@@ -531,7 +531,7 @@ HB_FUNC( HBQT_CONNECT )
if( hbqt_QtConnect( ( QObject* ) hbqt_par_ptr( 1 ), hb_parstr_utf8( 2, &pText01, NULL ), ( QObject* ) hbqt_par_ptr( 3 ), hb_parstr_utf8( 4, &pText02, NULL ) ) == 0 )
{
ret = HB_TRUE;
}
}
hb_strfree( pText01 );
hb_strfree( pText02 );
}

View File

@@ -57,7 +57,7 @@
PROCEDURE hbqt_ErrorSys()
ErrorBlock( { | oError | DefError( oError ) } )
ErrorBlock( {| oError | DefError( oError ) } )
RETURN
@@ -202,7 +202,7 @@ STATIC FUNCTION ErrorMessage( oError )
/*----------------------------------------------------------------------*/
STATIC FUNCTION hbqt_messageBox( cMsg, cInfo, cTitle, nIcon )
STATIC PROCEDURE hbqt_messageBox( cMsg, cInfo, cTitle, nIcon )
LOCAL oMB
IF hbqt_IsActiveApplication()
@@ -216,15 +216,14 @@ STATIC FUNCTION hbqt_messageBox( cMsg, cInfo, cTitle, nIcon )
ENDIF
oMB:setIcon( nIcon )
oMB:setWindowTitle( cTitle )
oMB:exec()
ELSE
ELSE
#include "hbtrace.ch"
HB_TRACE( HB_TR_ALWAYS, cMsg )
ENDIF
RETURN nil
ENDIF
RETURN
/*----------------------------------------------------------------------*/

View File

@@ -125,7 +125,7 @@ PROCEDURE Main()
QApplication():exec()
HB_TRACE( HB_TR_ALWAYS, ".............. E X I T I N G ...................", valtype( oLabel ) )
HB_TRACE( HB_TR_DEBUG, ".............. E X I T I N G ...................", valtype( oLabel ) )
xReleaseMemory( { oBtn, oLabel, oProg, oSBar, aGrid, aList, aMenu, aTool, aTabs, oDA, oWnd } )
RETURN
@@ -545,7 +545,7 @@ STATIC FUNCTION FileDialog()
oFD:setWindowTitle( "Select a File" )
oFD:exec()
RETURN NIL
RETURN NIL
/*----------------------------------------------------------------------*/
@@ -628,7 +628,7 @@ STATIC FUNCTION MenuRePaint( oPaintEvent, oPainter )
oPainter:drawText( 3, 3, "File" )
oPainter:setPen( QColor( 255,255,255 ) )
oPainter:drawRect( qRect:adjusted( 0,0,-1,-1 ) )
RETURN .T.
/*----------------------------------------------------------------------*/
@@ -681,4 +681,3 @@ STATIC FUNCTION SetButtonColor( qClr )
RETURN l_clr
/*----------------------------------------------------------------------*/

View File

@@ -26,7 +26,7 @@ STATIC oColorLY
STATIC oColorLN
#define _method_local_
PROCEDURE Main()
LOCAL tb1, mo1, lay1, lay2, bt1, bt2, bt3, hd1, i
LOCAL oWnd, oDA
@@ -63,10 +63,10 @@ PROCEDURE Main()
oID := tb1:itemDelegate()
oID:connect( "commitData(QWidget*)", {| w | my_save( w, 1, aStru1, @nCX1, @nCY1 ) } )
oID := NIL
oSM := tb1:selectionModel()
oSM:connect( "currentChanged(QModelIndex,QModelIndex)", {| n | my_select( n, @nCX1, @nCY1 ) } )
#else
#else
connect( tb1, aStru1, @nCX1, @nCY1 )
#endif
@@ -92,14 +92,14 @@ PROCEDURE Main()
lay2:addWidget( bt2 )
lay2:addWidget( bt3 )
HB_TRACE( HB_TR_ALWAYS, "AAAAA" )
HB_TRACE( HB_TR_DEBUG, "AAAAA" )
oWnd:Show()
HB_TRACE( HB_TR_ALWAYS, "BBBBB" )
HB_TRACE( HB_TR_DEBUG, "BBBBB" )
QApplication():exec()
HB_TRACE( HB_TR_ALWAYS, "CCCCC" )
HB_TRACE( HB_TR_DEBUG, "CCCCC" )
HB_TRACE( HB_TR_DEBUG, ( "my_select "+hb_ntos( nCX1 )+ "/"+hb_ntos( nCY1 ) ) )
HB_TRACE( HB_TR_ALWAYS, ( "my_select "+hb_ntos( nCX1 )+ "/"+hb_ntos( nCY1 ) ) )
RETURN
STATIC PROCEDURE my_save( qWidget, nArea, aStru, nCX, nCY )
@@ -225,15 +225,15 @@ STATIC FUNCTION my_browse( nArea, aStru, t, role, x, y )
RETURN NIL
STATIC FUNCTION connect( tb1, aStru1, nCX1, nCY1 )
STATIC FUNCTION connect( tb1, aStru1, nCX1, nCY1 )
LOCAL oID, oSM
oID := tb1:itemDelegate()
oID:connect( "commitData(QWidget*)", {| w | my_save( w, 1, aStru1, @nCX1, @nCY1 ) } )
HB_TRACE( HB_TR_ALWAYS, "00000" )
HB_TRACE( HB_TR_DEBUG, "00000" )
oSM := tb1:selectionModel()
oSM:connect( "currentChanged(QModelIndex,QModelIndex)", {| n | my_select( n, @nCX1, @nCY1 ) } )
HB_TRACE( HB_TR_ALWAYS, "11111" )
RETURN NIL
HB_TRACE( HB_TR_DEBUG, "11111" )
RETURN NIL

View File

@@ -1370,6 +1370,7 @@ DYNAMIC __HBArray
DYNAMIC __HBBlock
DYNAMIC __HBCharacter
DYNAMIC __HBDate
DYNAMIC __defaultNIL
DYNAMIC __hbdoc_FilterOut
DYNAMIC __hbdoc_FromSource
DYNAMIC __hbdoc_LoadDir

View File

@@ -62,7 +62,6 @@
redirection, and is also slower. [vszakats] */
#include "box.ch"
#include "common.ch"
#include "inkey.ch"
PROCEDURE __dbgHelp( nTopic )
@@ -72,7 +71,7 @@ PROCEDURE __dbgHelp( nTopic )
LOCAL oBrw
LOCAL aTopics := GetTopics()
DEFAULT nTopic TO 1
hb_default( @nTopic, 1 )
oDlg := HBDbWindow():New( 2, 2, MaxRow() - 2, MaxCol() - 2, "Help", cColor )

View File

@@ -55,7 +55,6 @@
#define HB_CLS_NOTOBJECT /* do not inherit from HBObject calss */
#include "hbclass.ch"
#include "common.ch"
#include "inkey.ch"
#include "setcurs.ch"
@@ -77,7 +76,7 @@ ENDCLASS
METHOD New( aArray, cVarName, lEditable ) CLASS HBDbArray
DEFAULT lEditable TO .T.
hb_default( @lEditable, .T. )
::arrayName := cVarName
::TheArray := aArray

View File

@@ -55,7 +55,6 @@
#define HB_CLS_NOTOBJECT /* do not inherit from HBObject calss */
#include "hbclass.ch"
#include "common.ch"
#include "inkey.ch"
#include "setcurs.ch"
@@ -77,7 +76,7 @@ ENDCLASS
METHOD New( hHash, cVarName, lEditable ) CLASS HBDbHash
DEFAULT lEditable TO .T.
hb_default( @lEditable, .T. )
::hashName := cVarName
::TheHash := hHash

View File

@@ -59,8 +59,6 @@
#define HB_CLS_NOTOBJECT /* do not inherit from HBObject calss */
#include "hbclass.ch"
#include "common.ch"
CREATE CLASS HBDbMenuItem
VAR nRow
@@ -81,7 +79,7 @@ ENDCLASS
METHOD New( cPrompt, bAction, lChecked, xIdent ) CLASS HBDbMenuItem
DEFAULT lChecked TO .F.
hb_default( @lChecked, .F. )
::cPrompt := cPrompt
::bAction := bAction

View File

@@ -55,7 +55,6 @@
#define HB_CLS_NOTOBJECT /* do not inherit from HBObject calss */
#include "hbclass.ch"
#include "common.ch"
#include "inkey.ch"
#include "setcurs.ch"
@@ -84,7 +83,7 @@ METHOD New( oObject, cVarName, lEditable ) CLASS HBDbObject
LOCAL aMessages, aMethods
LOCAL xValue
DEFAULT lEditable TO .T.
hb_default( @lEditable, .T. )
/* create list of object messages */
aMessages := oObject:classSel()

View File

@@ -73,7 +73,6 @@
#include "hbmemvar.ch"
#include "box.ch"
#include "common.ch"
#include "inkey.ch"
#include "setcurs.ch"
@@ -123,7 +122,7 @@ ENDCLASS
METHOD New( nTop, nLeft, nBottom, nRight, cCaption, cColor ) CLASS HBDbWindow
DEFAULT cColor TO __DbgColors()[ 1 ]
hb_default( @cColor, __DbgColors()[ 1 ] )
::nTop := nTop
::nLeft := nLeft
@@ -157,7 +156,7 @@ METHOD IsOver( nRow, nCol ) CLASS HBDbWindow
METHOD ScrollUp( nLines ) CLASS HBDbWindow
DEFAULT nLines TO 1
hb_default( @nLines, 1 )
SetColor( ::cColor )
Scroll( ::nTop + 1, ::nLeft + 1, ::nBottom - 1, ::nRight - 1, nLines )
@@ -215,7 +214,7 @@ METHOD Show( lFocused ) CLASS HBDbWindow
LOCAL nRow := Row()
LOCAL nCol := Col()
DEFAULT lFocused TO ::lFocused
hb_default( @lFocused, ::lFocused )
::cBackImage := SaveScreen( ::nTop, ::nLeft, ::nBottom + iif( ::lShadow, 1, 0 ),;
::nRight + iif( ::lShadow, 2, 0 ) )

View File

@@ -81,7 +81,6 @@
#include "hbmemvar.ch"
#include "box.ch"
#include "common.ch"
#include "getexit.ch"
#include "inkey.ch"
#include "set.ch"
@@ -1499,7 +1498,7 @@ METHOD InputBox( cMsg, uValue, bValid, lEditable ) CLASS HBDebugger
LOCAL lExit
LOCAL oWndInput := HBDbWindow():New( nTop, nLeft, nBottom, nRight, cMsg,;
::oPullDown:cClrPopup )
DEFAULT lEditable TO .T.
hb_default( @lEditable, .T. )
oWndInput:lShadow := .T.
oWndInput:Show()
@@ -1587,7 +1586,7 @@ METHOD IsValidStopLine( cName, nLine ) CLASS HBDebugger
METHOD LineNumbers( lLineNumbers ) CLASS HBDebugger
DEFAULT lLineNumbers TO !::lLineNumbers
hb_default( @lLineNumbers, !::lLineNumbers )
::lLineNumbers := lLineNumbers
::oPulldown:GetItemByIdent( "LINE" ):checked := ::lLineNumbers
@@ -1798,7 +1797,7 @@ METHOD Locate( nMode, cValue ) CLASS HBDebugger
LOCAL lFound
DEFAULT nMode TO 0
hb_default( @nMode, 0 )
IF Empty( cValue )
::cSearchString := PadR( ::cSearchString, 256 )
@@ -3290,7 +3289,7 @@ STATIC FUNCTION strip_path( cFileName )
LOCAL cName
LOCAL cExt
DEFAULT cFileName TO ""
hb_default( @cFileName, "" )
hb_FNameSplit( cFileName, NIL, @cName, @cExt )

View File

@@ -1620,8 +1620,8 @@ STATIC FUNCTION PutValue( xValue, cType, nLen, nDec )
STATIC FUNCTION EmptyValue( cType, nLen, nDec )
LOCAL xVal
DEFAULT nLen TO 0
DEFAULT nDec TO 0
hb_default( @nLen, 0 )
hb_default( @nDec, 0 )
DO CASE
CASE cType == "C" .OR. cType == "M"

View File

@@ -608,7 +608,7 @@ STATIC PROCEDURE DispPage( acItems, alSelect, nTop, nLeft, nRight, nNumRows, nPo
LOCAL nRow // Screen row
LOCAL nIndex // Array index
DEFAULT nRowsClr TO nNumRows
hb_default( @nRowsClr, nNumRows )
DispBegin()

View File

@@ -55,7 +55,7 @@
HB_FUNC( HB_DEFAULT )
{
if( hb_pcount() == 2 )
if( hb_pcount() >= 2 )
{
PHB_ITEM pDefault = hb_param( 2, HB_IT_ANY );
@@ -63,3 +63,11 @@ HB_FUNC( HB_DEFAULT )
hb_itemParamStore( 1, pDefault );
}
}
/* For compatibility with legacy DEFAULT ... TO ... command.
Not recommended for new code. */
HB_FUNC( __DEFAULTNIL )
{
if( hb_pcount() >= 2 && HB_IS_NIL( hb_param( 1, HB_IT_ANY ) ) )
hb_itemParamStore( 1, hb_param( 2, HB_IT_ANY ) );
}

View File

@@ -427,7 +427,7 @@ METHOD select( xValue ) CLASS RADIOGROUP
FOR nPos := 1 TO nLen
IF ::aItems[ nPos ]:data == xValue
DEFAULT ::xBuffer TO ""
hb_default( @::xBuffer, "" )
::changeButton( ::nValue, nPos )
EXIT
@@ -440,7 +440,7 @@ METHOD select( xValue ) CLASS RADIOGROUP
ELSEIF cType == "N" .AND. xValue >= 1 .AND. xValue <= ::nItemCount
DEFAULT ::xBuffer TO 0
hb_default( @::xBuffer, 0 )
::changeButton( ::nValue, xValue )
ENDIF

View File

@@ -2666,7 +2666,7 @@ METHOD setStyle( nStyle, lNewValue ) CLASS TBROWSE
/* NOTE: CA-Cl*pper 5.3 will initialize this var on the first
:setStyle() method call. [vszakats] */
DEFAULT ::styles TO { .F., .F., .F., .F., .F., NIL }
hb_default( @::styles, { .F., .F., .F., .F., .F., NIL } )
/* NOTE: CA-Cl*pper 5.3 does no checks on the value of nStyle, so in case
it is zero or non-numeric, a regular RTE will happen. [vszakats] */

View File

@@ -170,7 +170,7 @@ STATIC FUNCTION New( cClassName, xSuper, sClassFunc, lModuleFriendly )
LOCAL Self := QSelf()
LOCAL i
DEFAULT lModuleFriendly TO .F.
hb_default( @lModuleFriendly, .F. )
IF HB_ISSYMBOL( xSuper )
::asSuper := { xSuper }
@@ -304,8 +304,8 @@ STATIC FUNCTION Instance()
STATIC PROCEDURE AddData( cData, xInit, cType, nScope, lNoinit )
DEFAULT lNoInit TO .F.
DEFAULT nScope TO HB_OO_CLSTP_EXPORTED
hb_default( @lNoInit, .F. )
hb_default( @nScope, HB_OO_CLSTP_EXPORTED )
/* Default Init for Logical and numeric */
IF ! lNoInit .AND. cType != NIL .AND. xInit == NIL
@@ -349,8 +349,8 @@ STATIC PROCEDURE AddMultiData( cType, xInit, nScope, aData, lNoInit )
STATIC PROCEDURE AddClassData( cData, xInit, cType, nScope, lNoInit )
DEFAULT lNoInit TO .F.
DEFAULT nScope TO HB_OO_CLSTP_EXPORTED
hb_default( @lNoInit, .F. )
hb_default( @nScope, HB_OO_CLSTP_EXPORTED )
nScope := hb_bitOr( nScope, HB_OO_CLSTP_CLASS )
@@ -396,7 +396,7 @@ STATIC PROCEDURE AddMultiClsData( cType, xInit, nScope, aData, lNoInit )
STATIC PROCEDURE AddInline( cMethod, bCode, nScope )
DEFAULT nScope TO HB_OO_CLSTP_EXPORTED
hb_default( @nScope, HB_OO_CLSTP_EXPORTED )
AAdd( QSelf():aInlines, { cMethod, bCode, nScope } )
@@ -404,7 +404,7 @@ STATIC PROCEDURE AddInline( cMethod, bCode, nScope )
STATIC PROCEDURE AddMethod( cMethod, nFuncPtr, nScope )
DEFAULT nScope TO HB_OO_CLSTP_EXPORTED
hb_default( @nScope, HB_OO_CLSTP_EXPORTED )
AAdd( QSelf():aMethods, { cMethod, nFuncPtr, nScope } )
@@ -412,7 +412,7 @@ STATIC PROCEDURE AddMethod( cMethod, nFuncPtr, nScope )
STATIC PROCEDURE AddClsMethod( cMethod, nFuncPtr, nScope )
DEFAULT nScope TO HB_OO_CLSTP_EXPORTED
hb_default( @nScope, HB_OO_CLSTP_EXPORTED )
nScope := hb_bitOr( nScope, HB_OO_CLSTP_CLASS )

View File

@@ -1156,7 +1156,7 @@ METHOD PutMask( xValue, lEdit ) CLASS GET
LOCAL cPicMask := ::cPicMask
LOCAL nFor
DEFAULT lEdit TO ::hasFocus
hb_default( @lEdit, ::hasFocus )
IF !( ValType( xValue ) $ "CNDTL" )
xValue := ""

View File

@@ -466,7 +466,7 @@ FUNCTION __LabelForm( cLBLName, lPrinter, cAltFile, lNoConsole, bFor, ;
STATIC PROCEDURE PrintIt( cString )
DEFAULT cString TO ""
hb_default( @cString, "" )
QQOut( cString )
QOut()
@@ -479,7 +479,7 @@ STATIC FUNCTION ListAsArray( cList, cDelimiter )
LOCAL aList := {} // Define an empty array
LOCAL lDelimLast := .F.
DEFAULT cDelimiter TO ","
hb_default( @cDelimiter, "," )
DO WHILE Len( cList ) != 0

View File

@@ -450,7 +450,7 @@ METHOD New( cFrmName AS STRING,;
METHOD PrintIt( cString AS STRING ) CLASS HBReportForm
DEFAULT cString TO ""
hb_default( @cString, "" )
QQOut( cString )
QOut()
@@ -1207,9 +1207,9 @@ STATIC FUNCTION Occurs( cSearch, cTarget )
STATIC FUNCTION XMLCOUNT( cString, nLineLength, nTabSize, lWrap )
DEFAULT nLineLength TO 79
DEFAULT nTabSize TO 4
DEFAULT lWrap TO .T.
hb_default( @nLineLength, 79 )
hb_default( @nTabSize, 4 )
hb_default( @lWrap, .T. )
IF nTabSize >= nLineLength
nTabSize := nLineLength - 1
@@ -1225,10 +1225,10 @@ STATIC FUNCTION XMLCOUNT( cString, nLineLength, nTabSize, lWrap )
*/
STATIC FUNCTION XMEMOLINE( cString, nLineLength, nLineNumber, nTabSize, lWrap )
DEFAULT nLineLength TO 79
DEFAULT nLineNumber TO 1
DEFAULT nTabSize TO 4
DEFAULT lWrap TO .T.
hb_default( @nLineLength, 79 )
hb_default( @nLineNumber, 1 )
hb_default( @nTabSize, 4 )
hb_default( @lWrap, .T. )
IF nTabSize >= nLineLength
nTabSize := nLineLength - 1
@@ -1362,7 +1362,7 @@ STATIC FUNCTION ListAsArray( cList, cDelimiter )
LOCAL aList := {} // Define an empty array
LOCAL lDelimLast := .F.
DEFAULT cDelimiter TO ","
hb_default( @cDelimiter, "," )
DO WHILE Len( cList ) != 0