summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qipaddress.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2014-11-18 13:46:21 -0800
committerThiago Macieira <thiago.macieira@intel.com>2014-12-13 05:10:20 +0100
commitcfe12f716b0e138b51e3d8f5e481c4d9624459dc (patch)
tree26232a23b4985ba8984a139e03ac30403a38089d /src/corelib/io/qipaddress.cpp
parent0bc6c4f7ecfa332de57500fe722872eff4009b9b (diff)
Merge the different implementations of toHex in one central place
It's a simple enough function, but we don't need to duplicate those 17 bytes all over the place. Now they'll be duplicated at most once per library. Change-Id: Ic995e2a934b005e7e996e70f2ee644bfa948eb38 Reviewed-by: Jason McDonald <macadder1@gmail.com>
Diffstat (limited to 'src/corelib/io/qipaddress.cpp')
-rw-r--r--src/corelib/io/qipaddress.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/corelib/io/qipaddress.cpp b/src/corelib/io/qipaddress.cpp
index 44da22489d..d436cd2dd6 100644
--- a/src/corelib/io/qipaddress.cpp
+++ b/src/corelib/io/qipaddress.cpp
@@ -33,6 +33,7 @@
#include "qipaddress_p.h"
#include "private/qlocale_tools_p.h"
+#include "private/qtools_p.h"
#include "qvarlengtharray.h"
QT_BEGIN_NAMESPACE
@@ -240,7 +241,7 @@ const QChar *parseIp6(IPv6Address &address, const QChar *begin, const QChar *end
static inline QChar toHex(uchar c)
{
- return ushort(c > 9 ? c + 'a' - 0xA : c + '0');
+ return QtMiscUtils::toHexLower(c);
}
void toString(QString &appendTo, IPv6Address address)