summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qdebug.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/io/qdebug.cpp')
-rw-r--r--src/corelib/io/qdebug.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/corelib/io/qdebug.cpp b/src/corelib/io/qdebug.cpp
index 22f2c0ce8b1..0a72696a372 100644
--- a/src/corelib/io/qdebug.cpp
+++ b/src/corelib/io/qdebug.cpp
@@ -14,13 +14,10 @@
#include "qmetaobject.h"
#include <private/qtextstream_p.h>
#include <private/qtools_p.h>
-#include <ctype.h>
QT_BEGIN_NAMESPACE
-using QtMiscUtils::toHexUpper;
-using QtMiscUtils::toHexLower;
-using QtMiscUtils::fromHex;
+using namespace QtMiscUtils;
/*
Returns a human readable representation of the first \a maxSize
@@ -35,7 +32,7 @@ QByteArray QtDebugUtils::toPrintable(const char *data, qint64 len, qsizetype max
QByteArray out;
for (qsizetype i = 0; i < qMin(len, maxSize); ++i) {
char c = data[i];
- if (isprint(c)) {
+ if (isAsciiPrintable(c)) {
out += c;
} else {
switch (c) {
@@ -198,7 +195,7 @@ void QDebug::putUcs4(uint ucs4)
static inline bool isPrintable(char32_t ucs4) { return QChar::isPrint(ucs4); }
static inline bool isPrintable(char16_t uc) { return QChar::isPrint(uc); }
static inline bool isPrintable(uchar c)
-{ return c >= ' ' && c < 0x7f; }
+{ return isAsciiPrintable(c); }
template <typename Char>
static inline void putEscapedString(QTextStreamPrivate *d, const Char *begin, size_t length, bool isUnicode = true)