2012-05-15 00:01 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbqt/hbmk2_qt.hb
* contrib/hbqt/qtcore/hbqtcore.h
* contrib/hbqt/qtgui/hbqt_hbqabstractitemmodel.cpp
* contrib/hbqt/qtgui/hbqtgui.h
- Removed: the usage of HBQT_TYPE_xxxx constants.
It was a hack to identify a few type of objects Qt had
not provided the mechanism to retrieve.
NOTE: there should be improvement in build speed of hbQT.
* contrib/hbqt/qtgui/hbqt_hbqplaintextedit.cpp
- Added: deletion of child widget of HBQPlainTextEdit.
This commit is contained in:
@@ -16,6 +16,19 @@
|
||||
The license applies to all entries newer than 2009-04-28.
|
||||
*/
|
||||
|
||||
2012-05-15 00:01 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
|
||||
* contrib/hbqt/hbmk2_qt.hb
|
||||
* contrib/hbqt/qtcore/hbqtcore.h
|
||||
* contrib/hbqt/qtgui/hbqt_hbqabstractitemmodel.cpp
|
||||
* contrib/hbqt/qtgui/hbqtgui.h
|
||||
- Removed: the usage of HBQT_TYPE_xxxx constants.
|
||||
It was a hack to identify a few type of objects Qt had
|
||||
not provided the mechanism to retrieve.
|
||||
NOTE: there should be improvement in build speed of hbQT.
|
||||
|
||||
* contrib/hbqt/qtgui/hbqt_hbqplaintextedit.cpp
|
||||
- Added: deletion of child widget of HBQPlainTextEdit.
|
||||
|
||||
2012-05-13 16:46 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
|
||||
* contrib/hbqt/hbmk2_qt.hb
|
||||
- Removed: #define __GCMARK__
|
||||
|
||||
@@ -1463,10 +1463,6 @@ METHOD HbQtSource:build()
|
||||
AAdd( aLine, "#endif" )
|
||||
ENDIF
|
||||
AAdd( aLine, "" )
|
||||
FOR EACH s IN ::hRef
|
||||
AAdd( aLine, PadR( "#define HBQT_TYPE_" + s:__enumKey(), 64 ) + "( ( HB_U32 ) 0x" + hb_NumToHex( hb_crc32( "HBQT_TYPE_" + s:__enumKey() ), 8 ) + " )" )
|
||||
NEXT
|
||||
AAdd( aLine, "" )
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
/* Insert user defined code - INCLUDEs */
|
||||
@@ -1507,7 +1503,6 @@ METHOD HbQtSource:build()
|
||||
ENDIF
|
||||
AAdd( aLine, " bool bNew;" )
|
||||
AAdd( aLine, " PHBQT_GC_FUNC func;" )
|
||||
AAdd( aLine, " HB_U32 type;" )
|
||||
AAdd( aLine, " PHBQT_GC_FUNC mark;" )
|
||||
AAdd( aLine, "} HBQT_GC_T_" + ::cQtObject + ";" )
|
||||
AAdd( aLine, " " )
|
||||
@@ -1634,7 +1629,6 @@ METHOD HbQtSource:build()
|
||||
ENDIF
|
||||
AAdd( aLine, " p->bNew = bNew;" )
|
||||
AAdd( aLine, " p->func = hbqt_gcRelease_" + ::cQtObject + ";" )
|
||||
AAdd( aLine, " p->type = HBQT_TYPE_" + ::cQtObject + ";" )
|
||||
if n > 0
|
||||
AAdd( aLine, " p->mark = hbqt_gcMark_" + ::cQtObject + ";" )
|
||||
else
|
||||
|
||||
@@ -23,6 +23,4 @@ HB_EXTERN_END
|
||||
#define hbqt_par_HBQSlots( n ) ( ( HBQSlots * ) hbqt_par_ptr( n ) )
|
||||
#define hbqt_par_HBQString( n ) ( ( HBQString * ) hbqt_par_ptr( n ) )
|
||||
|
||||
#define HBQT_TYPE_QSize ( ( HB_U32 ) 0xD1575132 )
|
||||
|
||||
#endif /* __HBQTCORE_H */
|
||||
|
||||
@@ -55,6 +55,7 @@
|
||||
|
||||
#include "hbapiitm.h"
|
||||
#include "hbvm.h"
|
||||
#include "hbapicls.h"
|
||||
|
||||
#if QT_VERSION >= 0x040500
|
||||
|
||||
@@ -78,7 +79,7 @@ QVariant hbqt_fetchData( PHB_ITEM block, int type, int role, int par1, int par2
|
||||
PHB_ITEM p2 = hb_itemPutNI( NULL, par1 );
|
||||
PHB_ITEM p3 = hb_itemPutNI( NULL, par2 );
|
||||
|
||||
PHB_ITEM ret = hb_vmEvalBlockV( block, 4, p0, p1, p2, p3 );
|
||||
PHB_ITEM ret = hb_itemNew( hb_vmEvalBlockV( block, 4, p0, p1, p2, p3 ) );
|
||||
|
||||
hb_itemRelease( p0 );
|
||||
hb_itemRelease( p1 );
|
||||
@@ -109,26 +110,23 @@ QVariant hbqt_fetchData( PHB_ITEM block, int type, int role, int par1, int par2
|
||||
}
|
||||
else if( hb_itemType( ret ) & HB_IT_OBJECT )
|
||||
{
|
||||
hb_vmPushSymbol( hb_dynsymSymbol( hb_dynsymFindName( "PPTR" ) ) );
|
||||
hb_vmPush( ret );
|
||||
hb_vmSend( 0 );
|
||||
void * p = hbqt_get_ptr( ret );
|
||||
|
||||
HBQT_GC_T * p = ( HBQT_GC_T * ) hb_parptrGC( hbqt_gcFuncs(), -1 );
|
||||
|
||||
if( p->type == HBQT_TYPE_QBrush )
|
||||
vv = * ( ( QBrush * ) ( p->ph ) );
|
||||
else if( p->type == HBQT_TYPE_QColor )
|
||||
vv = * ( ( QColor * ) ( p->ph ) );
|
||||
else if( p->type == HBQT_TYPE_QSize )
|
||||
vv = * ( ( QSize * ) ( p->ph ) );
|
||||
else if( p->type == HBQT_TYPE_QIcon )
|
||||
vv = * ( ( QIcon * ) ( p->ph ) );
|
||||
else if( p->type == HBQT_TYPE_QPixmap )
|
||||
vv = * ( ( QPixmap * ) ( p->ph ) );
|
||||
else if( p->type == HBQT_TYPE_QFont )
|
||||
vv = * ( ( QFont * ) ( p->ph ) );
|
||||
if( hbqt_obj_isDerivedFrom( ret, "QBRUSH" ) )
|
||||
vv = * ( ( QBrush * ) ( p ) );
|
||||
else if( hbqt_obj_isDerivedFrom( ret, "QCOLOR" ) )
|
||||
vv = * ( ( QColor * ) ( p ) );
|
||||
else if( hbqt_obj_isDerivedFrom( ret, "QICON" ) )
|
||||
vv = * ( ( QIcon * ) ( p ) );
|
||||
else if( hbqt_obj_isDerivedFrom( ret, "QSIZE" ) )
|
||||
vv = * ( ( QSize * ) ( p ) );
|
||||
else if( hbqt_obj_isDerivedFrom( ret, "QFONT" ) )
|
||||
vv = * ( ( QFont * ) ( p ) );
|
||||
else if( hbqt_obj_isDerivedFrom( ret, "QPIXMAP" ) )
|
||||
vv = * ( ( QPixmap * ) ( p ) );
|
||||
}
|
||||
|
||||
hb_itemRelease( ret );
|
||||
hb_vmRequestRestore();
|
||||
}
|
||||
|
||||
|
||||
@@ -192,6 +192,22 @@ HBQPlainTextEdit::HBQPlainTextEdit( QWidget * parent ) : QPlainTextEdit( parent
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
HBQPlainTextEdit::~HBQPlainTextEdit()
|
||||
{
|
||||
#if 0
|
||||
if( timer )
|
||||
timer->stop();
|
||||
#endif
|
||||
|
||||
delete lineNumberArea;
|
||||
delete horzRuler;
|
||||
|
||||
if( block )
|
||||
hb_itemRelease( block );
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
void HBQPlainTextEdit::hbShowPrototype( const QString & tip, int rows, int cols )
|
||||
{
|
||||
if( ! isCompletionTipsActive ){
|
||||
@@ -250,25 +266,6 @@ void HBQPlainTextEdit::hbShowPrototype( const QString & tip, int rows, int cols
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
HBQPlainTextEdit::~HBQPlainTextEdit()
|
||||
{
|
||||
#if 0
|
||||
if( timer )
|
||||
timer->stop();
|
||||
#endif
|
||||
#if 0
|
||||
disconnect( this, SIGNAL( blockCountChanged( int ) ) );
|
||||
disconnect( this, SIGNAL( updateRequest( const QRect &, int ) ) );
|
||||
disconnect( this, SIGNAL( cursorPositionChanged() ) );
|
||||
#endif
|
||||
delete lineNumberArea;
|
||||
|
||||
if( block )
|
||||
hb_itemRelease( block );
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
void HBQPlainTextEdit::hbSetEventBlock( PHB_ITEM pBlock )
|
||||
{
|
||||
if( pBlock )
|
||||
|
||||
@@ -29,20 +29,4 @@ HB_EXTERN_END
|
||||
#define hbqt_par_QPrinter( n ) ( ( QPrinter * ) hbqt_par_ptr( n ) )
|
||||
#define hbqt_par_QWidget( n ) ( ( QWidget * ) hbqt_par_ptr( n ) )
|
||||
|
||||
#define HBQT_TYPE_QBrush ( ( HB_U32 ) 0x94319C70 )
|
||||
#define HBQT_TYPE_QColor ( ( HB_U32 ) 0x03C0065A )
|
||||
#define HBQT_TYPE_QFont ( ( HB_U32 ) 0xF6037D8A )
|
||||
#define HBQT_TYPE_QGradient ( ( HB_U32 ) 0x7F4BEC23 )
|
||||
#define HBQT_TYPE_QMatrix ( ( HB_U32 ) 0xAA3E35B7 )
|
||||
#define HBQT_TYPE_QImage ( ( HB_U32 ) 0xA0AB4AEC )
|
||||
#define HBQT_TYPE_QBitmap ( ( HB_U32 ) 0xBA602AD4 )
|
||||
#define HBQT_TYPE_QBoxLayout ( ( HB_U32 ) 0xA184A755 )
|
||||
|
||||
#ifndef HBQT_TYPE_QIcon
|
||||
#define HBQT_TYPE_QIcon ( ( HB_U32 ) 0x43035C83 )
|
||||
#endif
|
||||
#ifndef HBQT_TYPE_QPixmap
|
||||
#define HBQT_TYPE_QPixmap ( ( HB_U32 ) 0xBEA836FC )
|
||||
#endif
|
||||
|
||||
#endif /* __HBQTGUI_H */
|
||||
|
||||
Reference in New Issue
Block a user