summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qclipboard.cpp
diff options
context:
space:
mode:
authorJørgen Lind <jorgen.lind@nokia.com>2009-10-27 09:53:17 (GMT)
committerJørgen Lind <jorgen.lind@nokia.com>2009-10-29 16:00:13 (GMT)
commitc0c9940b371215eea294ae83ed6586a6414957ab (patch)
treedb1dae21fa00de1f7d203c5a66f8df509f877551 /src/gui/kernel/qclipboard.cpp
parenta733f087467c5f8361a7765a38e45037549c019f (diff)
downloadQt-c0c9940b371215eea294ae83ed6586a6414957ab.zip
Qt-c0c9940b371215eea294ae83ed6586a6414957ab.tar.gz
Qt-c0c9940b371215eea294ae83ed6586a6414957ab.tar.bz2
Fix TEXTCODEC
Reviewed-by: tom
Diffstat (limited to 'src/gui/kernel/qclipboard.cpp')
-rw-r--r--src/gui/kernel/qclipboard.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gui/kernel/qclipboard.cpp b/src/gui/kernel/qclipboard.cpp
index 5ed4dc9..e43f8b5 100644
--- a/src/gui/kernel/qclipboard.cpp
+++ b/src/gui/kernel/qclipboard.cpp
@@ -296,12 +296,16 @@ QString QClipboard::text(QString &subtype, Mode mode) const
const QByteArray rawData = data->data(QLatin1String("text/") + subtype);
+#ifndef QT_NO_TEXTCODEC
QTextCodec* codec = QTextCodec::codecForMib(106); // utf-8 is default
if (subtype == QLatin1String("html"))
codec = QTextCodec::codecForHtml(rawData, codec);
else
codec = QTextCodec::codecForUtfText(rawData, codec);
return codec->toUnicode(rawData);
+#else //QT_NO_TEXTCODEC
+ return rawData;
+#endif //QT_NO_TEXTCODEC
}
/*!