diff options
author | Lars Knoll <lars.knoll@qt.io> | 2020-04-29 18:00:13 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2020-05-14 07:51:20 +0200 |
commit | 2b8863a98c912806fd4e47bd2f2a6d81ec1d71b9 (patch) | |
tree | d0d03d309719486805cb81459401fe71aaec45c0 /src/xml/sax | |
parent | ada608d46d7ab99b787e48003f8c94c1a11dab19 (diff) |
Get rid of some QTextCodec leftovers
There's no real dependency to QTextCodec in those files anymore.
Change-Id: Ifaf19ab554fd108fa26095db4e2bd4a3e9ea427f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/xml/sax')
-rw-r--r-- | src/xml/sax/qxml.cpp | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/src/xml/sax/qxml.cpp b/src/xml/sax/qxml.cpp index e98c86979b..1898f4fbe8 100644 --- a/src/xml/sax/qxml.cpp +++ b/src/xml/sax/qxml.cpp @@ -39,10 +39,8 @@ #include "qxml.h" #include "qxml_p.h" -#if QT_CONFIG(textcodec) -#include "qtextcodec.h" -#endif #include "qbuffer.h" +#include "qstringconverter.h" #if QT_CONFIG(regularexpression) #include "qregularexpression.h" #endif @@ -1301,7 +1299,6 @@ void QXmlInputSource::fetchData() } } -#if QT_CONFIG(textcodec) static QString extractEncodingDecl(const QString &text, bool *needMoreText) { *needMoreText = false; @@ -1343,7 +1340,6 @@ static QString extractEncodingDecl(const QString &text, bool *needMoreText) return encoding; } -#endif // textcodec /*! This function reads the XML file from \a data and tries to @@ -1358,10 +1354,6 @@ static QString extractEncodingDecl(const QString &text, bool *needMoreText) */ QString QXmlInputSource::fromRawData(const QByteArray &data, bool beginning) { -#if !QT_CONFIG(textcodec) - Q_UNUSED(beginning); - return QString::fromLatin1(data.constData(), data.size()); -#else if (data.size() == 0) return QString(); if (beginning) { @@ -1443,7 +1435,6 @@ QString QXmlInputSource::fromRawData(const QByteArray &data, bool beginning) } return input; -#endif } |