GLSLEditor: Compile with QT_NO_CAST_FROM_ASCII

Change-Id: I88114509d972c498c3891c45d5e1f9b7fc9d3f3f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
This commit is contained in:
Orgad Shaneh
2012-11-26 20:58:49 +02:00
committed by Friedemann Kleint
parent 9be874ba25
commit 2ea3b2343d
5 changed files with 28 additions and 25 deletions

View File

@@ -270,48 +270,48 @@ bool Highlighter::isPPKeyword(const QStringRef &text) const
switch (text.length())
{
case 2:
if (text.at(0) == 'i' && text.at(1) == 'f')
if (text.at(0) == QLatin1Char('i') && text.at(1) == QLatin1Char('f'))
return true;
break;
case 4:
if (text.at(0) == 'e' && text == QLatin1String("elif"))
if (text.at(0) == QLatin1Char('e') && text == QLatin1String("elif"))
return true;
else if (text.at(0) == 'e' && text == QLatin1String("else"))
else if (text.at(0) == QLatin1Char('e') && text == QLatin1String("else"))
return true;
break;
case 5:
if (text.at(0) == 'i' && text == QLatin1String("ifdef"))
if (text.at(0) == QLatin1Char('i') && text == QLatin1String("ifdef"))
return true;
else if (text.at(0) == 'u' && text == QLatin1String("undef"))
else if (text.at(0) == QLatin1Char('u') && text == QLatin1String("undef"))
return true;
else if (text.at(0) == 'e' && text == QLatin1String("endif"))
else if (text.at(0) == QLatin1Char('e') && text == QLatin1String("endif"))
return true;
else if (text.at(0) == 'e' && text == QLatin1String("error"))
else if (text.at(0) == QLatin1Char('e') && text == QLatin1String("error"))
return true;
break;
case 6:
if (text.at(0) == 'i' && text == QLatin1String("ifndef"))
if (text.at(0) == QLatin1Char('i') && text == QLatin1String("ifndef"))
return true;
if (text.at(0) == 'i' && text == QLatin1String("import"))
if (text.at(0) == QLatin1Char('i') && text == QLatin1String("import"))
return true;
else if (text.at(0) == 'd' && text == QLatin1String("define"))
else if (text.at(0) == QLatin1Char('d') && text == QLatin1String("define"))
return true;
else if (text.at(0) == 'p' && text == QLatin1String("pragma"))
else if (text.at(0) == QLatin1Char('p') && text == QLatin1String("pragma"))
return true;
break;
case 7:
if (text.at(0) == 'i' && text == QLatin1String("include"))
if (text.at(0) == QLatin1Char('i') && text == QLatin1String("include"))
return true;
else if (text.at(0) == 'w' && text == QLatin1String("warning"))
else if (text.at(0) == QLatin1Char('w') && text == QLatin1String("warning"))
return true;
break;
case 12:
if (text.at(0) == 'i' && text == QLatin1String("include_next"))
if (text.at(0) == QLatin1Char('i') && text == QLatin1String("include_next"))
return true;
break;