summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rw-r--r--util/glgen/codegenerator.cpp8
-rw-r--r--util/glgen/legacyspecparser.cpp20
2 files changed, 14 insertions, 14 deletions
diff --git a/util/glgen/codegenerator.cpp b/util/glgen/codegenerator.cpp
index e06fe7e2f2..70cd3a7931 100644
--- a/util/glgen/codegenerator.cpp
+++ b/util/glgen/codegenerator.cpp
@@ -384,11 +384,11 @@ QString CodeGenerator::passByType(const Argument &arg) const
QString CodeGenerator::safeArgumentName(const QString& arg) const
{
- if (arg == QStringLiteral("near")) // MS Windows defines near and far
+ if (arg == QLatin1String("near")) // MS Windows defines near and far
return QStringLiteral("nearVal");
- else if (arg == QStringLiteral("far"))
+ else if (arg == QLatin1String("far"))
return QStringLiteral("farVal");
- else if (arg == QStringLiteral("d"))
+ else if (arg == QLatin1String("d"))
return QStringLiteral("dd"); // Don't shadow d pointer
else
return arg;
@@ -805,7 +805,7 @@ void CodeGenerator::writeInlineFunction(QTextStream &stream, const QString &clas
argumentNames.append(safeArgumentName(arg.name));
QString argNames = argumentNames.join(", ");
- if (f.returnType == QStringLiteral("void"))
+ if (f.returnType == QLatin1String("void"))
stream << QString(QStringLiteral(" %1->%2(%3);")).arg(backendVar).arg(f.name).arg(argNames) << endl;
else
stream << QString(QStringLiteral(" return %1->%2(%3);")).arg(backendVar).arg(f.name).arg(argNames) << endl;
diff --git a/util/glgen/legacyspecparser.cpp b/util/glgen/legacyspecparser.cpp
index af8ceffd7f..0f4d085bba 100644
--- a/util/glgen/legacyspecparser.cpp
+++ b/util/glgen/legacyspecparser.cpp
@@ -75,7 +75,7 @@ bool LegacySpecParser::parseTypeMap()
while (!stream.atEnd()) {
QString line = stream.readLine();
- if (line.startsWith(QStringLiteral("#")))
+ if (line.startsWith(QLatin1Char('#')))
continue;
if (typeMapRegExp.indexIn(line) != -1) {
@@ -83,7 +83,7 @@ bool LegacySpecParser::parseTypeMap()
QString value = typeMapRegExp.cap(2).simplified();
// Special case for void
- if (value == QStringLiteral("*"))
+ if (value == QLatin1String("*"))
value = QStringLiteral("void");
m_typeMap.insert(key, value);
@@ -139,7 +139,7 @@ void LegacySpecParser::parseFunctions(QTextStream &stream)
// extension. These functions should be added to the DSA extension rather
// than the core functionality. The core will already contain non-DSA
// versions of these functions.
- if (acceptCurrentFunctionInCore && currentFunction.name.endsWith(QStringLiteral("EXT"))) {
+ if (acceptCurrentFunctionInCore && currentFunction.name.endsWith(QLatin1String("EXT"))) {
acceptCurrentFunctionInCore = false;
acceptCurrentFunctionInExtension = true;
currentCategory = QStringLiteral("EXT_direct_state_access");
@@ -186,9 +186,9 @@ void LegacySpecParser::parseFunctions(QTextStream &stream)
arg.type = m_typeMap.value(type);
QString direction = argumentRegExp.cap(3);
- if (direction == QStringLiteral("in")) {
+ if (direction == QLatin1String("in")) {
arg.direction = Argument::In;
- } else if (direction == QStringLiteral("out")) {
+ } else if (direction == QLatin1String("out")) {
arg.direction = Argument::Out;
} else {
qWarning() << "Invalid argument direction found:" << direction;
@@ -196,11 +196,11 @@ void LegacySpecParser::parseFunctions(QTextStream &stream)
}
QString mode = argumentRegExp.cap(4);
- if (mode == QStringLiteral("value")) {
+ if (mode == QLatin1String("value")) {
arg.mode = Argument::Value;
- } else if (mode == QStringLiteral("array")) {
+ } else if (mode == QLatin1String("array")) {
arg.mode = Argument::Array;
- } else if (mode == QStringLiteral("reference")) {
+ } else if (mode == QLatin1String("reference")) {
arg.mode = Argument::Reference;
} else {
qWarning() << "Invalid argument mode found:" << mode;
@@ -241,7 +241,7 @@ void LegacySpecParser::parseFunctions(QTextStream &stream)
// Extract the OpenGL version in which this function was deprecated.
// If it is OpenGL 3.1 then it must be a compatibility profile function
QString deprecatedVersion = deprecatedRegExp.cap(1).simplified();
- if (deprecatedVersion == QStringLiteral("3.1") && !inDeprecationException(currentFunction.name))
+ if (deprecatedVersion == QLatin1String("3.1") && !inDeprecationException(currentFunction.name))
currentVersionProfile.profile = VersionProfile::CompatibilityProfile;
} else if (categoryRegExp.indexIn(line) != -1) {
@@ -296,5 +296,5 @@ void LegacySpecParser::parseFunctions(QTextStream &stream)
bool LegacySpecParser::inDeprecationException(const QString &functionName) const
{
- return (functionName == QStringLiteral("TexImage3D"));
+ return functionName == QLatin1String("TexImage3D");
}