Changeset 902 for trunk/src/corelib/io/qprocess_os2.cpp
- Timestamp:
- Jul 20, 2011, 11:48:57 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/corelib/io/qprocess_os2.cpp
r761 r902 57 57 #include <qthread.h> 58 58 59 /*60 Returns a human readable representation of the first \a len61 characters in \a data.62 */63 59 QT_BEGIN_NAMESPACE 64 static QByteArray qt_prettyDebug(const char *data, int len, int maxSize) 65 { 66 if (!data) return "(null)"; 67 QByteArray out; 68 for (int i = 0; i < len; ++i) { 69 char c = data[i]; 70 if (isprint(c)) { 71 out += c; 72 } else switch (c) { 73 case '\n': out += "\\n"; break; 74 case '\r': out += "\\r"; break; 75 case '\t': out += "\\t"; break; 76 default: 77 QString tmp; 78 tmp.sprintf("\\%o", c); 79 out += tmp.toLatin1(); 80 } 81 } 82 83 if (len < maxSize) 84 out += "..."; 85 86 return out; 87 } 60 61 // defined in qprocess.cpp 62 extern QByteArray qt_prettyDebug(const char *data, int len, int maxSize); 88 63 89 64 // redirect qDebug output to a file in the root directory of the current drive
Note:
See TracChangeset
for help on using the changeset viewer.