Commit 9181e06e authored by Fawzi Mohamed's avatar Fawzi Mohamed Committed by Fawzi Mohamed
Browse files

qmljs: avoid warnings for empty qmltypes files



Change-Id: I5cd29540afa5c7ec1a7031d6e698e873003b3f0a
Task-number: QTCREATORBUG-13354
Reviewed-by: default avatarFawzi Mohamed <fawzi.mohamed@theqtcompany.com>
parent 7ca545a1
......@@ -1388,17 +1388,17 @@ void CppQmlTypesLoader::parseQmlTypeDescriptions(const QByteArray &contents,
QString *errorMessage,
QString *warningMessage, const QString &fileName)
{
if (!contents.isEmpty()) {
unsigned char c = contents.at(0);
switch (c) {
case 0xfe:
case 0xef:
case 0xff:
case 0xee:
case 0x00:
qWarning() << fileName << "seems not to be encoded in UTF8 or has a BOM.";
default: break;
}
if (contents.isEmpty())
return;
unsigned char c = contents.at(0);
switch (c) {
case 0xfe:
case 0xef:
case 0xff:
case 0xee:
case 0x00:
qWarning() << fileName << "seems not to be encoded in UTF8 or has a BOM.";
default: break;
}
errorMessage->clear();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment