2011-02-26 10:58 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* contrib/hbqt/qtgui/hbqt_hbqplaintextedit.cpp
* contrib/hbqt/qtgui/hbqt_hbqgraphicsscene.cpp
* contrib/hbqt/qtgui/hbqt_hbqgraphicsitem.cpp
* contrib/hbqt/qtgui/hbqt_hbqtableview.cpp
* Changed to use hbqt_create_objectFromEventType2()
instead of hbqt_create_objectFromEventType().
; Please test, it's likely the new function doesn't work
properly yet and should be fixed.
This commit is contained in:
@@ -16,6 +16,16 @@
|
||||
The license applies to all entries newer than 2009-04-28.
|
||||
*/
|
||||
|
||||
2011-02-26 10:58 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* contrib/hbqt/qtgui/hbqt_hbqplaintextedit.cpp
|
||||
* contrib/hbqt/qtgui/hbqt_hbqgraphicsscene.cpp
|
||||
* contrib/hbqt/qtgui/hbqt_hbqgraphicsitem.cpp
|
||||
* contrib/hbqt/qtgui/hbqt_hbqtableview.cpp
|
||||
* Changed to use hbqt_create_objectFromEventType2()
|
||||
instead of hbqt_create_objectFromEventType().
|
||||
; Please test, it's likely the new function doesn't work
|
||||
properly yet and should be fixed.
|
||||
|
||||
2011-02-26 10:50 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* contrib/hbqt/qtgui/hbqtgui.ch
|
||||
* contrib/hbqt/qtgui/hbqt_init.cpp
|
||||
@@ -46,7 +56,7 @@
|
||||
these anyway)
|
||||
We should move to full C++ wrappers to solve this
|
||||
cleanly.
|
||||
; TOFIX: Clean code to never use the unsafe hbqt_create_objectFromEventType().
|
||||
; TOFIX: Clean code to never use the unsafe hbqt_create_objectFromEventType(). [DONE]
|
||||
; TOFIX: Just a note: Raw pointers are still used in QLIST f.e.,
|
||||
so even the raw pointer problem is not fully solved yet.
|
||||
|
||||
|
||||
@@ -487,7 +487,7 @@ void HBQGraphicsItem::contextMenuEvent( QGraphicsSceneContextMenuEvent * event )
|
||||
{
|
||||
if( block ){
|
||||
PHB_ITEM p1 = hb_itemPutNI( NULL, QEvent::GraphicsSceneContextMenu );
|
||||
PHB_ITEM p2 = hbqt_create_objectFromEventType( event, QEvent::GraphicsSceneContextMenu );
|
||||
PHB_ITEM p2 = hbqt_create_objectFromEventType2( event, "hb_QGraphicsSceneContextMenuEvent" );
|
||||
PHB_ITEM p3 = hb_itemPutC( NULL, objectName().toLatin1().data() );
|
||||
hb_vmEvalBlockV( block, 3, p1, p2, p3 );
|
||||
hb_itemRelease( p1 );
|
||||
|
||||
@@ -407,7 +407,7 @@ void HBQGraphicsScene::contextMenuEvent( QGraphicsSceneContextMenuEvent * event
|
||||
if( ! item ){
|
||||
if( block ){
|
||||
PHB_ITEM p1 = hb_itemPutNI( NULL, QEvent::GraphicsSceneContextMenu );
|
||||
PHB_ITEM p2 = hbqt_create_objectFromEventType( event, QEvent::GraphicsSceneContextMenu );
|
||||
PHB_ITEM p2 = hbqt_create_objectFromEventType2( event, "hb_QGraphicsSceneContextMenuEvent" );
|
||||
hb_vmEvalBlockV( block, 2, p1, p2 );
|
||||
hb_itemRelease( p1 );
|
||||
hb_itemRelease( p2 );
|
||||
@@ -421,7 +421,7 @@ void HBQGraphicsScene::dragEnterEvent( QGraphicsSceneDragDropEvent * event )
|
||||
if( block )
|
||||
{
|
||||
PHB_ITEM p1 = hb_itemPutNI( NULL, ( int ) QEvent::GraphicsSceneDragEnter );
|
||||
PHB_ITEM p2 = hbqt_create_objectFromEventType( event, QEvent::GraphicsSceneDragEnter );
|
||||
PHB_ITEM p2 = hbqt_create_objectFromEventType2( event, "hb_QGraphicsSceneDragDropEvent" );
|
||||
hb_vmEvalBlockV( block, 2, p1, p2 );
|
||||
hb_itemRelease( p1 );
|
||||
hb_itemRelease( p2 );
|
||||
@@ -436,7 +436,7 @@ void HBQGraphicsScene::dragLeaveEvent( QGraphicsSceneDragDropEvent * event )
|
||||
if( block )
|
||||
{
|
||||
PHB_ITEM p1 = hb_itemPutNI( NULL, ( int ) QEvent::GraphicsSceneDragLeave );
|
||||
PHB_ITEM p2 = hbqt_create_objectFromEventType( event, QEvent::GraphicsSceneDragLeave );
|
||||
PHB_ITEM p2 = hbqt_create_objectFromEventType2( event, "hb_QGraphicsSceneDragDropEvent" );
|
||||
hb_vmEvalBlockV( block, 2, p1, p2 );
|
||||
hb_itemRelease( p1 );
|
||||
hb_itemRelease( p2 );
|
||||
@@ -451,7 +451,7 @@ void HBQGraphicsScene::dragMoveEvent( QGraphicsSceneDragDropEvent * event )
|
||||
if( block )
|
||||
{
|
||||
PHB_ITEM p1 = hb_itemPutNI( NULL, ( int ) QEvent::GraphicsSceneDragMove );
|
||||
PHB_ITEM p2 = hbqt_create_objectFromEventType( event, QEvent::GraphicsSceneDragMove );
|
||||
PHB_ITEM p2 = hbqt_create_objectFromEventType2( event, "hb_QGraphicsSceneDragDropEvent" );
|
||||
hb_vmEvalBlockV( block, 2, p1, p2 );
|
||||
hb_itemRelease( p1 );
|
||||
hb_itemRelease( p2 );
|
||||
@@ -470,7 +470,7 @@ void HBQGraphicsScene::dropEvent( QGraphicsSceneDragDropEvent * event )
|
||||
if( mime->hasFormat( ( QString ) "application/x-qabstractitemmodeldatalist" ) )
|
||||
{
|
||||
PHB_ITEM p1 = hb_itemPutNI( NULL, ( int ) QEvent::GraphicsSceneDrop );
|
||||
PHB_ITEM p2 = hbqt_create_objectFromEventType( event, QEvent::GraphicsSceneDrop );
|
||||
PHB_ITEM p2 = hbqt_create_objectFromEventType2( event, "hb_QGraphicsSceneDragDropEvent" );
|
||||
PHB_ITEM p3 = hb_itemNew( NULL );
|
||||
|
||||
QTreeWidget * tree = dynamic_cast< QTreeWidget * >( event->source() );
|
||||
@@ -498,7 +498,7 @@ void HBQGraphicsScene::dropEvent( QGraphicsSceneDragDropEvent * event )
|
||||
else
|
||||
{
|
||||
PHB_ITEM p1 = hb_itemPutNI( NULL, ( int ) QEvent::GraphicsSceneDrop );
|
||||
PHB_ITEM p2 = hbqt_create_objectFromEventType( event, QEvent::GraphicsSceneDrop );
|
||||
PHB_ITEM p2 = hbqt_create_objectFromEventType2( event, "hb_QGraphicsSceneDragDropEvent" );
|
||||
hb_vmEvalBlockV( block, 2, p1, p2 );
|
||||
hb_itemRelease( p1 );
|
||||
hb_itemRelease( p2 );
|
||||
@@ -739,6 +739,3 @@ void HBQGraphicsScene::drawMagnets( HBQGraphicsItem * item )
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1246,7 +1246,7 @@ bool HBQPlainTextEdit::hbKeyPressSelection( QKeyEvent * event )
|
||||
hb_arraySetNI( p2, 4, columnEnds );
|
||||
hb_arraySetNI( p2, 5, selectionMode );
|
||||
hb_arraySetNI( p2, 6, selectionState );
|
||||
hb_arraySet( p2, 7, hbqt_create_objectFromEventType( event, QEvent::KeyPress ) );
|
||||
hb_arraySet( p2, 7, hbqt_create_objectFromEventType2( event, "hb_QKeyEvent" ) );
|
||||
hb_vmEvalBlockV( block, 2, p1, p2 );
|
||||
hb_itemRelease( p1 );
|
||||
hb_itemRelease( p2 );
|
||||
|
||||
@@ -91,8 +91,8 @@ void HBQTableView::mousePressEvent( QMouseEvent * event )
|
||||
{
|
||||
if( block )
|
||||
{
|
||||
PHB_ITEM p0 = hb_itemPutNI( NULL, QEvent::MouseButtonPress );
|
||||
PHB_ITEM p1 = hbqt_create_objectFromEventType( event, QEvent::MouseButtonPress );
|
||||
PHB_ITEM p0 = hb_itemPutNI( NULL, QEvent::MouseButtonPress );
|
||||
PHB_ITEM p1 = hbqt_create_objectFromEventType2( event, "hb_QMouseEvent" );
|
||||
hb_vmEvalBlockV( block, 2, p0, p1 );
|
||||
hb_itemRelease( p0 );
|
||||
hb_itemRelease( p1 );
|
||||
@@ -104,8 +104,8 @@ void HBQTableView::mouseDoubleClickEvent( QMouseEvent * event )
|
||||
{
|
||||
if( block )
|
||||
{
|
||||
PHB_ITEM p0 = hb_itemPutNI( NULL, QEvent::MouseButtonDblClick );
|
||||
PHB_ITEM p1 = hbqt_create_objectFromEventType( event, QEvent::MouseButtonDblClick );
|
||||
PHB_ITEM p0 = hb_itemPutNI( NULL, QEvent::MouseButtonDblClick );
|
||||
PHB_ITEM p1 = hbqt_create_objectFromEventType2( event, "hb_QMouseEvent" );
|
||||
hb_vmEvalBlockV( block, 2, p0, p1 );
|
||||
hb_itemRelease( p0 );
|
||||
hb_itemRelease( p1 );
|
||||
@@ -117,8 +117,8 @@ void HBQTableView::wheelEvent( QWheelEvent * event )
|
||||
{
|
||||
if( block )
|
||||
{
|
||||
PHB_ITEM p0 = hb_itemPutNI( NULL, QEvent::Wheel );
|
||||
PHB_ITEM p1 = hbqt_create_objectFromEventType( event, QEvent::Wheel );
|
||||
PHB_ITEM p0 = hb_itemPutNI( NULL, QEvent::Wheel );
|
||||
PHB_ITEM p1 = hbqt_create_objectFromEventType2( event, "hb_QWheelEvent" );
|
||||
hb_vmEvalBlockV( block, 2, p0, p1 );
|
||||
hb_itemRelease( p0 );
|
||||
hb_itemRelease( p1 );
|
||||
@@ -130,9 +130,9 @@ void HBQTableView::scrollContentsBy( int x, int y )
|
||||
{
|
||||
if( block )
|
||||
{
|
||||
PHB_ITEM p0 = hb_itemPutNI( NULL, HBQT_HBQTABLEVIEW_scrollContentsBy );
|
||||
PHB_ITEM p1 = hb_itemPutNI( NULL, x );
|
||||
PHB_ITEM p2 = hb_itemPutNI( NULL, y );
|
||||
PHB_ITEM p0 = hb_itemPutNI( NULL, HBQT_HBQTABLEVIEW_scrollContentsBy );
|
||||
PHB_ITEM p1 = hb_itemPutNI( NULL, x );
|
||||
PHB_ITEM p2 = hb_itemPutNI( NULL, y );
|
||||
hb_vmEvalBlockV( block, 3, p0, p1, p2 );
|
||||
hb_itemRelease( p0 );
|
||||
hb_itemRelease( p1 );
|
||||
|
||||
Reference in New Issue
Block a user