diff options
author | Liang Qi <liang.qi@theqtcompany.com> | 2016-02-02 15:57:44 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@theqtcompany.com> | 2016-02-02 15:57:44 +0100 |
commit | d3e6e732c70ebc2340d6376d727b3c623be23810 (patch) | |
tree | 18d469f02ac36edd04b87a9bfa4886ceef0490f0 /util/glgen | |
parent | fdfd63053ae6b10af06553be3c1b15de274bebf7 (diff) | |
parent | ba8d3430029d8c4342e9a47c110ee8c9879818f4 (diff) | |
download | qtbase-d3e6e732c70ebc2340d6376d727b3c623be23810.tar.gz |
Merge remote-tracking branch 'origin/5.6' into dev
Conflicts:
config.tests/unix/compile.test
src/plugins/platforms/cocoa/qcocoahelpers.mm
src/tools/qlalr/cppgenerator.cpp
Change-Id: I0103ca076a9aca7118b2fd99f0fdaf81055998c3
Diffstat (limited to 'util/glgen')
-rw-r--r-- | util/glgen/codegenerator.cpp | 8 | ||||
-rw-r--r-- | util/glgen/legacyspecparser.cpp | 20 |
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"); } |