forked from qt-creator/qt-creator
		
	qmljs: avoid warnings for empty qmltypes files
Change-Id: I5cd29540afa5c7ec1a7031d6e698e873003b3f0a Task-number: QTCREATORBUG-13354 Reviewed-by: Fawzi Mohamed <fawzi.mohamed@theqtcompany.com>
This commit is contained in:
		
				
					committed by
					
						
						Fawzi Mohamed
					
				
			
			
				
	
			
			
			
						parent
						
							7ca545a102
						
					
				
				
					commit
					9181e06ef2
				
			@@ -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();
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user