diff options
author | Nedim Hadzic <nhadzic@blackberry.com> | 2014-02-28 12:00:18 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-02-28 16:19:41 +0100 |
commit | 55e1d153fab9ceb198ab73f2e4d58fc8bc720bd7 (patch) | |
tree | f5ee7bccb79bf4fa1a507aa77cff83fcdacc4712 /src/bluetooth | |
parent | b03495fd43b0ffb402fe076773569ca67186d685 (diff) |
QNX compile error fix
QNX compile was broken after stdint.h was removed.
Some warnings resolved.
Change-Id: I04d5f30ec79f35bc489ed5f11b0f8bee930f204d
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
Diffstat (limited to 'src/bluetooth')
-rw-r--r-- | src/bluetooth/qlowenergycharacteristicinfo_qnx.cpp | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/src/bluetooth/qlowenergycharacteristicinfo_qnx.cpp b/src/bluetooth/qlowenergycharacteristicinfo_qnx.cpp index 5abe6296..50f1d5ae 100644 --- a/src/bluetooth/qlowenergycharacteristicinfo_qnx.cpp +++ b/src/bluetooth/qlowenergycharacteristicinfo_qnx.cpp @@ -55,20 +55,16 @@ QT_BEGIN_NAMESPACE Q_DECLARE_LOGGING_CATEGORY(QT_BT_QNX) -int hexValue(char inChar) +int hexValue(QChar inChar) { - if (isxdigit(inChar)) { - if (isdigit(inChar)) { - return (inChar - '0'); - } else { - return (toupper(inChar) - 'A' + 10); - } - } else { - return -1; - } + if (inChar.isDigit()) + return (inChar.unicode() - '0'); + else + return (inChar.toUpper().unicode() - 'A' + 10); + return -1; } -int stringToBuffer(const QString &stringData, uint8_t *buffer, int bufferLength) +int stringToBuffer(const QString &stringData, quint8 *buffer, int bufferLength) { int consumed = 0; for (int i = 0; i < bufferLength; i++) { @@ -92,7 +88,7 @@ int stringToBuffer(const QString &stringData, uint8_t *buffer, int bufferLength) } QLowEnergyCharacteristicInfoPrivate::QLowEnergyCharacteristicInfoPrivate(): - name(QString()), value(QByteArray()), permission(0), instance(-1), handle(QStringLiteral("0x0000")), properties(QVariantMap()), errorString("") + permission(0), handle(QStringLiteral("0x0000")), instance(-1) { } |