diff --git a/harbour/ChangeLog b/harbour/ChangeLog index d098682e88..b191e312db 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,12 @@ The license applies to all entries newer than 2009-04-28. */ +2011-02-24 18:40 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) + * contrib/hbqt/tests/testbrow.prg + * contrib/hbqt/tests/testqaim.prg + * contrib/hbqt/tests/testres.prg + ! Adopted: to latest hbQT changes. + 2011-02-24 18:03 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) * contrib/hbqt/hbmk2_qt.hbs diff --git a/harbour/contrib/hbqt/tests/testbrow.prg b/harbour/contrib/hbqt/tests/testbrow.prg index 122b6f26f7..c38a7168b6 100644 --- a/harbour/contrib/hbqt/tests/testbrow.prg +++ b/harbour/contrib/hbqt/tests/testbrow.prg @@ -31,14 +31,6 @@ STATIC oColorD STATIC oColorLY STATIC oColorLN -INIT PROCEDURE Qt_Start() - qApp := QApplication() - RETURN - -EXIT PROCEDURE Qt_End() - qApp:quit() - RETURN - PROCEDURE Main() LOCAL tb1, mo1, lay1, lay2, bt1, bt2, bt3, hd1, i @@ -65,7 +57,7 @@ PROCEDURE Main() mo1 := HBQAbstractItemModel( {| t, r, x, y| my_browse( 1, aStru1, t, r, x, y ) } ) tb1:setModel( mo1 ) - tb1:itemDelegate():connect( "commitData(QWidget)", {| w | my_save( w, 1, aStru1, @nCX1, @nCY1 ) } ) + tb1:itemDelegate():connect( "commitData(QWidget*)", {| w | my_save( w, 1, aStru1, @nCX1, @nCY1 ) } ) tb1:selectionModel():connect( "currentChanged(QModelIndex,QModelIndex)", {| n | my_select( n, @nCX1, @nCY1 ) } ) hd1 := tb1:horizontalHeader() @@ -91,12 +83,12 @@ PROCEDURE Main() lay2:addWidget( bt3 ) oWnd:Show() - qApp:exec() + QApplication():exec() RETURN -STATIC PROCEDURE my_save( pWidget, nArea, aStru, nCX, nCY ) - LOCAL cData := QLineEditFromPointer( pWidget ):text() +STATIC PROCEDURE my_save( qWidget, nArea, aStru, nCX, nCY ) + LOCAL cData := qWidget:text() DBSelectArea( nArea ) DBGoto( nCY + 1 ) @@ -117,8 +109,7 @@ STATIC PROCEDURE my_save( pWidget, nArea, aStru, nCX, nCY ) ENDSWITCH RETURN -STATIC PROCEDURE my_select( pModelIndex, nCX, nCY ) - LOCAL qModelIndex := QModelIndexFromPointer( pModelIndex ) +STATIC PROCEDURE my_select( qModelIndex, nCX, nCY ) nCX := qModelIndex:column() nCY := qModelIndex:row() diff --git a/harbour/contrib/hbqt/tests/testqaim.prg b/harbour/contrib/hbqt/tests/testqaim.prg index 4d8bb435e7..0f68d86ca6 100644 --- a/harbour/contrib/hbqt/tests/testqaim.prg +++ b/harbour/contrib/hbqt/tests/testqaim.prg @@ -16,20 +16,11 @@ #include "common.ch" -STATIC qApp STATIC oWnd STATIC oDA, oForeColor, oAlphaColor, oBackBrush, oSize, oPixmap, oIcon, oFont -INIT PROCEDURE Qt_Start() - qApp := QApplication() - RETURN - -EXIT PROCEDURE Qt_End() - qApp:quit() - RETURN - PROCEDURE Main() LOCAL tb1, mo1, lay1, lay2, bt1, bt2, bt3 @@ -73,7 +64,7 @@ PROCEDURE Main() lay2:addWidget( bt3 ) oWnd:Show() - qApp:exec() + QApplication():exec() RETURN diff --git a/harbour/contrib/hbqt/tests/testres.prg b/harbour/contrib/hbqt/tests/testres.prg index 13f708a2b0..c85b67fab6 100644 --- a/harbour/contrib/hbqt/tests/testres.prg +++ b/harbour/contrib/hbqt/tests/testres.prg @@ -27,7 +27,6 @@ INIT PROCEDURE Qt_Start() EXIT PROCEDURE Qt_End() s_re1:unregisterResource_1( HBQTRES_TESTRES() ) - s_qApp:quit() RETURN PROCEDURE Main()