forked from qt-creator/qt-creator
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:
@@ -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'));
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user