Pritpal, thanks
I need a basic code sample to test hbqt, without use of QInputContext,
QWidget, just to know if hbqt-qt461 for OS/2 will run
Something as minidemoqt.prg :-)
This is not possible without QWidget class.
QWidget is the parent of all GUI classes.
This is the object tree :
QObject, QPaintDevice
QWidget
All Other GUI Widgets - menus, buttons, etc
So I need to resolve it in base class first,
then probably everything will built properly.
Please do the following:
0. QApplication.cpp -> HB_FUNC( QT_QWIDGET_INPUTCONTEXT )
Comment it out.
Done
1. QWidget.cpp -> HB_FUNC( QT_QWIDGET_INPUTCONTEXT )
Comment it out.
Done
2. Also commentout corresponding methods in
TQApplication and TQWidget.
Done
3. Drop QInputContext.cpp and TQInputContext.prg from filelist.mk
Done
Compile hbQT. Do it compiles then ? If yes, we have the solution
already,
Compiling hbqtgui fail with QWidget.cpp, as expected, with:
----------------------
gcc -I. -I../../../../../../include -Zomf -Wall -W -O3
-DHB_LEGACY_TYPES_OFF -IE:\qt4\include -IE:\qt4\include/QtCore
-IE:\qt4\include/QtGui -DHB_FM_STATISTICS_OFF -oQWidget.o -c
../../../QWidget.cpp
../../../QWidget.cpp: In function 'void
HB_FUN_QT_QWIDGET_ACCESSIBLEDESCRIPTION()':
../../../QWidget.cpp:196: error: 'class QWidget' has no member named
'accessibleDescription'
../../../QWidget.cpp: In function 'void HB_FUN_QT_QWIDGET_ACCESSIBLENAME()':
../../../QWidget.cpp:204: error: 'class QWidget' has no member named
'accessibleName'
../../../QWidget.cpp: In function 'void
HB_FUN_QT_QWIDGET_SETACCESSIBLEDESCRIPTION()':
../../../QWidget.cpp:968: error: 'class QWidget' has no member named
'setAccessibleDescription'
../../../QWidget.cpp: In function 'void
HB_FUN_QT_QWIDGET_SETACCESSIBLENAME()':
../../../QWidget.cpp:976: error: 'class QWidget' has no member named
'setAccessibleName'
make[1]: *** [QWidget.o] Error 1
----------------------
So I used:
QWidget.cpp
===========
/*DAVID:
HB_FUNC( QT_QWIDGET_ACCESSIBLEDESCRIPTION )
{
hb_retc( hbqt_par_QWidget( 1
)->accessibleDescription().toAscii().data() );
}
*/
/*DAVID:
HB_FUNC( QT_QWIDGET_ACCESSIBLENAME )
{
hb_retc( hbqt_par_QWidget( 1 )->accessibleName().toAscii().data() );
}
*/
/*DAVID:
HB_FUNC( QT_QWIDGET_SETACCESSIBLEDESCRIPTION )
{
hbqt_par_QWidget( 1 )->setAccessibleDescription( QWidget::tr(
hb_parc( 2 ) ) );
}
*/
/*DAVID:
HB_FUNC( QT_QWIDGET_SETACCESSIBLENAME )
{
hbqt_par_QWidget( 1 )->setAccessibleName( QWidget::tr( hb_parc( 2 ) ) );
}
*/
TQWidget.prg
===========
//DAVID: METHOD accessibleDescription()
//DAVID: METHOD accessibleName()
//DAVID: METHOD setAccessibleDescription( cDescription )
//DAVID: METHOD setAccessibleName( cName )
/*DAVID:
METHOD QWidget:accessibleDescription()
RETURN Qt_QWidget_accessibleDescription( ::pPtr )
*/
/*DAVID:
METHOD QWidget:accessibleName()
RETURN Qt_QWidget_accessibleName( ::pPtr )
*/
/*DAVID:
METHOD QWidget:setAccessibleDescription( cDescription )
RETURN Qt_QWidget_setAccessibleDescription( ::pPtr, cDescription )
*/
/*DAVID:
METHOD QWidget:setAccessibleName( cName )
RETURN Qt_QWidget_setAccessibleName( ::pPtr, cName )
*/
and hbqtgui.lib build entirely
link demos. Those must then link properly.
If all goes fine, I will drop QInputContext alltogether.
Without above exercise, it is difficult to isolate other matters.
Logs of demos are useless as QWidget is not linked and all other
Qt world resolves around it.
So you can:
- drop QInputContext alltogether.
- Guard *Accessible* methods for OS/2 and
#ifndef QT_NO_ACCESSIBILITY / #endif
while "dummy QAccessible implementation in 4.6.1" can be completed
Trying to use hbqt* libs with samples/projects:
( All tests with Harbour 13976 )
demoqt.prg
==========
- It build fine
- Running it, create a small window with a three colors icon on it and
crash with (output is mixed 1,2):
----------------------
demoqt.prg:127:MAIN(): HB_TR_ALWAYS
demoqt.prg:128:MAIN(): HB_TR_ALWAYS -----------------b-----------------
Exception c0000005 at address 0x1e8af6f8
Exception Code:C0000005
Exception Address:1E8AF6F8
EAX:0000002B EBX:0050F2A0 ECX:0000002A EDX:00000358
ESI:029B0D64 EDI:02B5BFC0 EBP:002FED10
CS:EIP:005B:1E8AF6F8 SS:ESP:0053:002FE7D8
DS:0053 ES:0053 FS:150B GS:0000
Flags:00010202
Called from QT_QWIDGET_RESIZE(0)
Called from QMAINWINDOW:RESIZE(0) in ../../../TQWidget.prg
Called from MAIN(141) in demoqt.prg
Killed by SIGSEGV
pid=0x142b ppid=0x005e tid=0x0001 slot=0x00a2 pri=0x0200 mc=0x0001
E:\HARBOUR102\HARBOUR\CONTRIB\HBQT\TESTS\DEMOQT.EXE
PMMERGE 3:0007f6f8
cs:eip=005b:1e8af6f8 ss:esp=0053:002fe7d8 ebp=002fed10
ds=0053 es=0053 fs=150b gs=0000 efl=00010202
eax=0000002b ebx=0050f2a0 ecx=0000002a edx=00000358 edi=02b5bfc0
esi=029b0d64
Process dumping was disabled, use DUMPPROC / PROCDUMP to enable it.
----------------------
demoxbp.prg
==========
- It build fine
- Running it, create a big window with a three colors icon on it and
crash with (output is mixed 1,2):
----------------------
Exception c0000005 at address 0x1ddd69ca
Exception Code:C0000005
Exception Address:1DDD69CA
EAX:00000001 EBX:02A9CE84 ECX:02A9CE8C EDX:00000001
ESI:00000000 EDI:02A9CE74 EBP:0039F728
CS:EIP:005B:1DDD69CA SS:ESP:0053:0039F710
DS:0053 ES:0053 FS:150B GS:0000
Flags:00010246
Called from QPIXMAP:SCALED(0) in ../../../TQPixmap.prg
Called from XBPSTATUSBAR:SETPOINTER(0) in ../../../xbpwindow.prg
Called from BUILD_STATUSBAR(531) in demoxbp.prg
Called from BUILDADIALOG(168) in demoxbp.prg
Called from _BUILDADIALOG(107) in demoxbp.prg
Called from MAIN(98) in demoxbp.prg
Killed by SIGSEGV
pid=0x1459 ppid=0x142e tid=0x0001 slot=0x00a8 pri=0x0200 mc=0x0001
E:\HARBOUR102\HARBOUR\CONTRIB\HBXBP\TESTS\DEMOXBP.EXE
LIBC063 0:000669ca
cs:eip=005b:1ddd69ca ss:esp=0053:0039f710 ebp=0039f728
ds=0053 es=0053 fs=150b gs=0000 efl=00010246
eax=00000001 ebx=02a9ce84 ecx=02a9ce8c edx=00000001 edi=02a9ce74
esi=00000000
Process dumping was disabled, use DUMPPROC / PROCDUMP to enable it.
----------------------
demoqt.prg
==========
- Build fine
- Open a window with content
- Maximize beyond of desktop size
- Fx keys seem to work
- Output from 1,2 are:
----------------------
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::begin: Paint device returned engine == 0, type: 1
QFont::setPointSize: Point size <= 0 (0), must be greater than 0
QPainter::begin: Paint device returned engine == 0, type: 1
QFont::setPointSize: Point size <= 0 (0), must be greater than 0
QPainter::begin: Paint device returned engine == 0, type: 1
QFont::setPointSize: Point size <= 0 (0), must be greater than 0
QPainter::begin: Paint device returned engine == 0, type: 1
QFont::setPointSize: Point size <= 0 (0), must be greater than 0
----------------------
hbide project ( the BIG one ! )
===============================
- Build fine
- Open a window with content, with a lot of icons, menus, ...
- Windows resize, max, min, move, ... work fine
- Many checkboxs, actions work fine
- Many actions fails, for example "Open"
Log file is around 800 lines, here are the bottom (1,2 mixed):
----------------------
THbQtUI.prg:0:HBQ_DBG(): HB_TR_ALWAYS DialogFind {|o,v|
o[v]:setWindowTitle(q__tr("DialogFind", "Find and Replace", 0, "UTF8"))}
THbQtUI.prg:0:HBQ_DBG(): HB_TR_ALWAYS groupBox_2 {|o,v|
o[v]:setTitle("")}
THbQtUI.prg:0:HBQ_DBG(): HB_TR_ALWAYS groupBox_3 {|o,v|
o[v]:setTitle("")}
idemisc.prg:897:HBIDE_DBG(): HB_TR_ALWAYS C:\dev_sources\vouch\abc.prg
idemisc.prg:897:HBIDE_DBG(): HB_TR_ALWAYS
C:\harbour\contrib\hbide\projects\vouch\abc.prg
Exception c0000005 at address 0x1ddd69ca
Exception Code:C0000005
Exception Address:1DDD69CA
EAX:00000001 EBX:02BF9B64 ECX:02BF9B6C EDX:00000001
ESI:00000000 EDI:02BF9B6C EBP:0058DB6C
CS:EIP:005B:1DDD69CA SS:ESP:0053:0058DB54
DS:0053 ES:0053 FS:150B GS:0000
Flags:00010246
Called from QT_QDIALOG_EXEC(0)
Called from QFILEDIALOG:EXEC(0) in ../../../TQDialog.prg
Called from XBPFILEDIALOG:OPEN(0) in ../../../xbpfiledialog.prg
Called from IDESOURCESMANAGER:SELECTSOURCE(442) in idesources.prg
Called from IDESOURCESMANAGER:OPENSOURCE(411) in idesources.prg
Called from HBIDE:EXECSOURCEACTION(720) in hbide.prg
Called from HBIDE:EXECACTION(499) in hbide.prg
Called from (b)IDEACTIONS_BUILDMAINMENU(411) in ideactions.prg
Called from XBPMENU:EXEBLOCK(0) in ../../../xbpmenubar.prg
Called from (b)XBPMENUBAR_PLACEITEM(0) in ../../../xbpmenubar.prg
Called from QT_QEVENTLOOP_PROCESSEVENTS(0)
Called from QEVENTLOOP:PROCESSEVENTS(0) in ../../../TQEventLoop.prg
Called from APPEVENT(0) in ../../../xbpgeneric.prg
Called from HBIDE:CREATE(417) in hbide.prg
Called from MAIN(110) in hbide.prg
Killed by SIGSEGV
pid=0x1439 ppid=0x142e tid=0x0001 slot=0x00a8 pri=0x0200 mc=0x0001
E:\HARBOUR102\HARBOUR\CONTRIB\HBIDE\HBIDE.EXE
LIBC063 0:000669ca
cs:eip=005b:1ddd69ca ss:esp=0053:0058db54 ebp=0058db6c
ds=0053 es=0053 fs=150b gs=0000 efl=00010246
eax=00000001 ebx=02bf9b64 ecx=02bf9b6c edx=00000001 edi=02bf9b6c
esi=00000000
Process dumping was disabled, use DUMPPROC / PROCDUMP to enable it.
----------------------
So we have our firsts Harbour+os2gcc442+hbqt+qt461 applications running,
but with failures still
We are advancing :-)
David Macias
_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour