summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/corelib/codecs/qtextcodec.cpp11
-rw-r--r--src/corelib/codecs/qtextcodec.h5
-rw-r--r--src/gui/text/qtextdocument.cpp16
-rw-r--r--src/gui/text/qtextdocument.h5
4 files changed, 16 insertions, 21 deletions
diff --git a/src/corelib/codecs/qtextcodec.cpp b/src/corelib/codecs/qtextcodec.cpp
index 06fd88da90..72c7844561 100644
--- a/src/corelib/codecs/qtextcodec.cpp
+++ b/src/corelib/codecs/qtextcodec.cpp
@@ -1275,4 +1275,15 @@ bool QTextDecoder::needsMoreData() const
return state.remainingChars;
}
+/*!
+ \fn QTextCodec *Qt::codecForHtml(const QByteArray &ba)
+ \internal
+
+ This function is defined in the \c <QTextCodec> header file.
+*/
+QTextCodec *Qt::codecForHtml(const QByteArray &ba)
+{
+ return QTextCodec::codecForHtml(ba);
+}
+
QT_END_NAMESPACE
diff --git a/src/corelib/codecs/qtextcodec.h b/src/corelib/codecs/qtextcodec.h
index 3010a2714e..885518d17f 100644
--- a/src/corelib/codecs/qtextcodec.h
+++ b/src/corelib/codecs/qtextcodec.h
@@ -167,6 +167,11 @@ private:
QTextCodec::ConverterState state;
};
+namespace Qt
+{
+ Q_CORE_EXPORT QTextCodec *codecForHtml(const QByteArray &ba);
+}
+
QT_END_NAMESPACE
#endif // QTEXTCODEC_H
diff --git a/src/gui/text/qtextdocument.cpp b/src/gui/text/qtextdocument.cpp
index 9cc1ba6c1c..04350bcda5 100644
--- a/src/gui/text/qtextdocument.cpp
+++ b/src/gui/text/qtextdocument.cpp
@@ -51,9 +51,6 @@
#include <qregularexpression.h>
#endif
#include <qvarlengtharray.h>
-#if QT_CONFIG(textcodec)
-#include <qtextcodec.h>
-#endif
#include <qthread.h>
#include <qcoreapplication.h>
#include <qmetaobject.h>
@@ -212,19 +209,6 @@ QString Qt::convertFromPlainText(const QString &plain, Qt::WhiteSpaceMode mode)
}
/*!
- \fn QTextCodec *Qt::codecForHtml(const QByteArray &ba)
- \internal
-
- This function is defined in the \c <QTextDocument> header file.
-*/
-#if QT_CONFIG(textcodec)
-QTextCodec *Qt::codecForHtml(const QByteArray &ba)
-{
- return QTextCodec::codecForHtml(ba);
-}
-#endif
-
-/*!
\class QTextDocument
\reentrant
\inmodule QtGui
diff --git a/src/gui/text/qtextdocument.h b/src/gui/text/qtextdocument.h
index 369851ceea..b34175994d 100644
--- a/src/gui/text/qtextdocument.h
+++ b/src/gui/text/qtextdocument.h
@@ -62,7 +62,6 @@ class QTextObject;
class QTextFormat;
class QTextFrame;
class QTextBlock;
-class QTextCodec;
class QVariant;
class QRectF;
class QTextOption;
@@ -74,10 +73,6 @@ namespace Qt
{
Q_GUI_EXPORT bool mightBeRichText(const QString&);
Q_GUI_EXPORT QString convertFromPlainText(const QString &plain, WhiteSpaceMode mode = WhiteSpacePre);
-
-#if QT_CONFIG(textcodec) || defined(Q_CLANG_QDOC)
- Q_GUI_EXPORT QTextCodec *codecForHtml(const QByteArray &ba);
-#endif
}
class Q_GUI_EXPORT QAbstractUndoItem