diff options
author | Liang Qi <liang.qi@qt.io> | 2018-10-02 12:59:24 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2018-11-07 13:19:54 +0000 |
commit | 825f98815683faea06144ab0262129b0367798ee (patch) | |
tree | 48b10de0d86c6312d07700eb4e690dbd87ab8db0 /src/gui/text/qtextdocument.cpp | |
parent | b5d249f9538bf3dc44f11879c2244deb5a37bf97 (diff) |
Modernize the "textcodec" feature
Also clean up QTextCodec usage in qmake build and some includes
of qtextcodec.h.
Change-Id: I0475b82690024054add4e85a8724c8ea3adcf62a
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Diffstat (limited to 'src/gui/text/qtextdocument.cpp')
-rw-r--r-- | src/gui/text/qtextdocument.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/text/qtextdocument.cpp b/src/gui/text/qtextdocument.cpp index 44d1b2f201..613ac8fa6c 100644 --- a/src/gui/text/qtextdocument.cpp +++ b/src/gui/text/qtextdocument.cpp @@ -51,7 +51,9 @@ #include <qregularexpression.h> #endif #include <qvarlengtharray.h> +#if QT_CONFIG(textcodec) #include <qtextcodec.h> +#endif #include <qthread.h> #include <qcoreapplication.h> #include <qmetaobject.h> @@ -181,7 +183,7 @@ QString Qt::convertFromPlainText(const QString &plain, Qt::WhiteSpaceMode mode) return rich; } -#ifndef QT_NO_TEXTCODEC +#if QT_CONFIG(textcodec) QTextCodec *Qt::codecForHtml(const QByteArray &ba) { return QTextCodec::codecForHtml(ba); |