Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 6

Qt-interest Archive, June 2007
qFromBigEndian problems


Message 1 in thread

Hey,

recently I someone on this list pointed me to the
qToBigEndian/qFromBigEndian/...
functions.

It looks like I can't use qFromBigEndian with floats and doubles!?

Jens

-- 
 [ signature omitted ] 

Message 2 in thread

Aye, it seems they are missing.

you should be able to get a quint32 instead, and cast it to float
afterwards (or get a quint64 and cast it to double).

Cheers,
Peter

> -----Original Message-----
> From: Jens Luedicke [mailto:jens.luedicke@xxxxxxxxx]
> Sent: Wednesday, June 27, 2007 9:19 AM
> To: qt-interest@xxxxxxxxxxxxx
> Subject: qFromBigEndian problems
> 
> Hey,
> 
> recently I someone on this list pointed me to the
> qToBigEndian/qFromBigEndian/...
> functions.
> 
> It looks like I can't use qFromBigEndian with floats and doubles!?
> 
> Jens

--
 [ signature omitted ] 

Message 3 in thread

On 27 jun 2007, at 13.06, Peter Prade wrote:

> Aye, it seems they are missing.
>
> you should be able to get a quint32 instead, and cast it to float
> afterwards (or get a quint64 and cast it to double).
>
> Cheers,
> Peter
>

	Be careful with the casts. Only reinterpret_cast will work correctly  
here.

>> -----Original Message-----
>> From: Jens Luedicke [mailto:jens.luedicke@xxxxxxxxx]
>> Sent: Wednesday, June 27, 2007 9:19 AM
>> To: qt-interest@xxxxxxxxxxxxx
>> Subject: qFromBigEndian problems
>>
>> Hey,
>>
>> recently I someone on this list pointed me to the
>> qToBigEndian/qFromBigEndian/...
>> functions.
>>
>> It looks like I can't use qFromBigEndian with floats and doubles!?
>>
>> Jens
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx  
> with "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/
>

-------------------------------------
This sig is dedicated to the advancement of Nuclear Power
Tommy Nordgren
tommy.nordgren@xxxxxxxxx



--
 [ signature omitted ]