summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qstringbuilder.cpp
diff options
context:
space:
mode:
authoraxis <qt-info@nokia.com>2009-11-09 08:28:40 (GMT)
committeraxis <qt-info@nokia.com>2009-11-09 08:28:40 (GMT)
commit7fdfa58b958b658feb7b20dd7a7322d235fe4bea (patch)
tree6c38ed48f7c234ad480aa8ce178b9a00b14d2440 /src/corelib/tools/qstringbuilder.cpp
parent7ea04bf5c065a037b2db667572e1947f1a1b8b2e (diff)
parent68409c24211b4639832ce86113c33a247bb68950 (diff)
downloadQt-7fdfa58b958b658feb7b20dd7a7322d235fe4bea.zip
Qt-7fdfa58b958b658feb7b20dd7a7322d235fe4bea.tar.gz
Qt-7fdfa58b958b658feb7b20dd7a7322d235fe4bea.tar.bz2
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6-s60
Conflicts: src/gui/painting/qblendfunctions.cpp
Diffstat (limited to 'src/corelib/tools/qstringbuilder.cpp')
-rw-r--r--src/corelib/tools/qstringbuilder.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/corelib/tools/qstringbuilder.cpp b/src/corelib/tools/qstringbuilder.cpp
index 0a13218..4a16488 100644
--- a/src/corelib/tools/qstringbuilder.cpp
+++ b/src/corelib/tools/qstringbuilder.cpp
@@ -41,6 +41,8 @@
#include "qstringbuilder.h"
+QT_BEGIN_NAMESPACE
+
/*!
\class QLatin1Literal
\internal
@@ -143,3 +145,25 @@
Converts the \c QLatin1Literal into a \c QString object.
*/
+
+/*! \internal */
+void QAbstractConcatenable::convertFromAscii(const char *a, int len, QChar *&out)
+{
+#ifndef QT_NO_TEXTCODEC
+ if (QString::codecForCStrings) {
+ QString tmp = QString::fromAscii(a);
+ memcpy(out, reinterpret_cast<const char *>(tmp.constData()), sizeof(QChar) * tmp.size());
+ out += tmp.length();
+ return;
+ }
+#endif
+ if (len == -1) {
+ while (*a)
+ *out++ = QLatin1Char(*a++);
+ } else {
+ for (int i = 0; i < len - 1; ++i)
+ *out++ = QLatin1Char(a[i]);
+ }
+}
+
+QT_END_NAMESPACE