What happened to the profile?

Thiago Macieira thiago at macieira.org
Mon Oct 7 10:59:38 UTC 2013


On segunda-feira, 7 de outubro de 2013 07:34:34, Dirk Hohndel wrote:
> Thiago - I'm sure there is this brilliant easy to use Qt function that
> will solve all our problems, correct?

I'm sure there is.

The front-end API would be QByteArray::toDouble. So:

	double x = QByteArray(ptr, optional_size).toDouble();

There's a private API that avoids memory allocation:

Q_CORE_EXPORT double qstrtod(const char *s00, char const **se, bool *ok);

	double x = qstrtod(ptr, NULL, NULL);

This is the warning found in the header that declares that function:

//
//  W A R N I N G
//  -------------
//
// This file is not part of the Qt API.  It exists for the convenience
// of internal files.  This header file may change from version to version
// without notice, or even be removed.
//
// We mean it.
//

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.hohndel.org/pipermail/subsurface/attachments/20131007/1c1eff98/attachment.sig>


More information about the subsurface mailing list