diff options
author | Jørgen Lind <jorgen.lind@nokia.com> | 2009-10-27 10:53:17 +0100 |
---|---|---|
committer | Jørgen Lind <jorgen.lind@nokia.com> | 2009-10-29 17:00:13 +0100 |
commit | c0c9940b371215eea294ae83ed6586a6414957ab (patch) | |
tree | db1dae21fa00de1f7d203c5a66f8df509f877551 /src/gui/kernel/qclipboard.cpp | |
parent | a733f087467c5f8361a7765a38e45037549c019f (diff) | |
download | qt4-tools-c0c9940b371215eea294ae83ed6586a6414957ab.tar.gz |
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 5ed4dc9953..e43f8b5f16 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 } /*! |