diff options
author | Jørgen Lind <jorgen.lind@nokia.com> | 2009-10-27 09:53:17 (GMT) |
---|---|---|
committer | Jørgen Lind <jorgen.lind@nokia.com> | 2009-10-29 16:00:13 (GMT) |
commit | c0c9940b371215eea294ae83ed6586a6414957ab (patch) | |
tree | db1dae21fa00de1f7d203c5a66f8df509f877551 /src/gui/kernel/qclipboard.cpp | |
parent | a733f087467c5f8361a7765a38e45037549c019f (diff) | |
download | Qt-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.cpp | 4 |
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 } /*! |