QmlJs: fix compile-time condition

The update of the qmljs parser changed the 'ifndef QT_NO_TEXT_CODEC'
condition to 'if QT_CONFIG(textcodec)' that causes a compilation
failure on some platforms.  Since QtCreator does not support development
against a Qt version without the feature, the condition is removed.

Change-Id: I18e69eee2b6996233562fbfcf7f29ad619911d8b
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
This commit is contained in:
Marco Benelli
2017-03-23 12:30:06 +01:00
parent 61d30a20ce
commit 24ff3a2cbd

View File

@@ -315,9 +315,7 @@ QDebug operator<<(QDebug debug, const QmlError &error)
if (f.open(QIODevice::ReadOnly)) { if (f.open(QIODevice::ReadOnly)) {
QByteArray data = f.readAll(); QByteArray data = f.readAll();
QTextStream stream(data, QIODevice::ReadOnly); QTextStream stream(data, QIODevice::ReadOnly);
#if QT_CONFIG(textcodec)
stream.setCodec("UTF-8"); stream.setCodec("UTF-8");
#endif
const QString code = stream.readAll(); const QString code = stream.readAll();
const auto lines = code.splitRef(QLatin1Char('\n')); const auto lines = code.splitRef(QLatin1Char('\n'));