QCop Messages (was Re: [PyKDE] ANN: SIP/PyQt v3.5 & QScintilla v0.3
Released)
Michael Lauer
mickey at tm.informatik.uni-frankfurt.de
Sun Dec 15 11:31:01 GMT 2002
Hi,
In order to further investigate why the taskbar is showing trash,
I did the following addition to TaskBar::receive():
void TaskBar::receive( const QCString &msg, const QByteArray &data )
{
int size = data.size();
qDebug( "TaskBar::receive - bytearray size %d", size );
for ( int i = 0; i < size; ++i )
qDebug( "TaskBar::receive - byte %d - value %02x", i, data[i] );
[...]
Then I used the command line tool provided with Qtopia to send the
taskbar
the message "Hallo" and this is what I got:
TaskBar::receive - bytearray size 14
TaskBar::receive - byte 0 - value 00
TaskBar::receive - byte 1 - value 00
TaskBar::receive - byte 2 - value 00
TaskBar::receive - byte 3 - value 0a
TaskBar::receive - byte 4 - value 00
TaskBar::receive - byte 5 - value 48
TaskBar::receive - byte 6 - value 00
TaskBar::receive - byte 7 - value 61
TaskBar::receive - byte 8 - value 00
TaskBar::receive - byte 9 - value 6c
TaskBar::receive - byte 10 - value 00
TaskBar::receive - byte 11 - value 6c
TaskBar::receive - byte 12 - value 00
TaskBar::receive - byte 13 - value 6f
Looks pretty much like unicode for me... which, if I had thought more
carefully,
should have been obvious... because QString internally handles
everything as unicode, it is also marshalled as unicode... utf16,
to be specific. This conclusion is also supported by
http://doc.trolltech.com/2.3/qdatastreamformat.html :)
Just for the records, compare this to the output when I send the same
with Python:
TaskBar::receive - bytearray size 9
TaskBar::receive - byte 0 - value 00
TaskBar::receive - byte 1 - value 00
TaskBar::receive - byte 2 - value 00
TaskBar::receive - byte 3 - value 05
TaskBar::receive - byte 4 - value 48
TaskBar::receive - byte 5 - value 61
TaskBar::receive - byte 6 - value 6c
TaskBar::receive - byte 7 - value 6c
TaskBar::receive - byte 8 - value 6f
Cheers,
Mickey.
--
:M:
--------------------------------------------------------------------------
Dipl.-Inf. Michael 'Mickey' Lauer
mickey at tm.informatik.uni-frankfurt.de
Raum 10b - ++49 69 798 28358 Fachbereich Informatik und Biologie
--------------------------------------------------------------------------
More information about the PyQt
mailing list