PDA

View Full Version : what include for qFromLittleEndian



Vanir
9th January 2008, 09:58
I am trying to use qFromLittleEndian which is documented in the <QtGlobal> - Global Qt Declarations. I have this in my source:

#include <QtGlobal>

but the VS2005 IDE setup I am using reports
error C3861: 'qFromLittleEndian': identifier not found.

What file do I have to include? This file?
C:\Qt\4.3.3\src\corelib\global\qendian.h

Thanks,

Vanir

wysota
9th January 2008, 12:22
How do you use the function? It's a template function, are you aware of that?

Vanir
10th January 2008, 10:01
Wysota,

yes I am aware it is a template function having looked at the "<QtGlobal> - Global Qt Declarations" in Qt Assisant document and the "/src/corelib/global/qendian.h" file.

I have ascertained that you need to include <QtEndian> to bring in to scope / make visible the qFromLittleEndian identifier.

So the answer to my question is:
The header to include to use qFromLittleEndian is QtEndian ie.
#include <QtEndian>

The documentation is misleading, incorrect and incomplete with respect to the qFromLittleEndian.

Vanir