summaryrefslogtreecommitdiffstats
path: root/qtools
diff options
context:
space:
mode:
authordimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2010-06-25 11:31:51 (GMT)
committerdimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2010-06-25 11:31:51 (GMT)
commitd0412f05557d55f465407a9337553c0a6ee0396f (patch)
treefa51c4ac8c1fe241b2d6c4af9d2f9a1297ce8e0a /qtools
parent1cbd7d2faa8d543f521b144a8120c3a1ba2f832f (diff)
downloadDoxygen-d0412f05557d55f465407a9337553c0a6ee0396f.zip
Doxygen-d0412f05557d55f465407a9337553c0a6ee0396f.tar.gz
Doxygen-d0412f05557d55f465407a9337553c0a6ee0396f.tar.bz2
Release-1.7.1
Diffstat (limited to 'qtools')
-rw-r--r--qtools/qcstring.h10
-rw-r--r--qtools/qtextstream.cpp2
-rw-r--r--qtools/qutfcodec.cpp4
3 files changed, 13 insertions, 3 deletions
diff --git a/qtools/qcstring.h b/qtools/qcstring.h
index 032d731..1e5f6f8 100644
--- a/qtools/qcstring.h
+++ b/qtools/qcstring.h
@@ -450,5 +450,15 @@ Q_EXPORT inline QCString operator+( char c1, const QCString &s2 )
return tmp;
}
+inline const char *qPrint(const char *s)
+{
+ if (s) return s; else return "";
+}
+
+inline const char *qPrint(const QCString &s)
+{
+ if (!s.isEmpty()) return s.data(); else return "";
+}
+
#endif // QCSTRING_H
diff --git a/qtools/qtextstream.cpp b/qtools/qtextstream.cpp
index 6686f81..b12f86d 100644
--- a/qtools/qtextstream.cpp
+++ b/qtools/qtextstream.cpp
@@ -553,7 +553,7 @@ QTextStream::QTextStream( QByteArray a, int mode )
dev = new QBuffer( a );
((QBuffer *)dev)->open( mode );
owndev = TRUE;
- setEncoding( Latin1 ); //### Locale???
+ setEncoding( Locale ); //### Locale???
reset();
d->sourceType = QTextStreamPrivate::ByteArray;
}
diff --git a/qtools/qutfcodec.cpp b/qtools/qutfcodec.cpp
index f64812c..b0caa76 100644
--- a/qtools/qutfcodec.cpp
+++ b/qtools/qutfcodec.cpp
@@ -181,8 +181,8 @@ const char* QUtf16Codec::name() const
int QUtf16Codec::heuristicContentMatch(const char* chars, int len) const
{
uchar* uchars = (uchar*)chars;
- if ( len >= 2 && (uchars[0] == 0xff && uchars[1] == 0xfe ||
- uchars[1] == 0xff && uchars[0] == 0xfe) )
+ if ( len >= 2 && ((uchars[0] == 0xff && uchars[1] == 0xfe) ||
+ (uchars[1] == 0xff && uchars[0] == 0xfe)) )
return len;
else
return 0;