aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2021-01-26 08:44:28 +0100
committerUlf Hermann <ulf.hermann@qt.io>2021-01-26 08:55:55 +0100
commit5ee6f64a89f80776f6c359e241dfae1186ee8a35 (patch)
treeca556f6df2ea458878e8960d39244d4e9f3115ef /src
parentd77c16639ce68d95a22640d8fb7cc9b846a1ed05 (diff)
Avoid string/ascii conversion warnings in qwavefrontmesh.cpp
Change-Id: I49bf672bf22c5ad9cc53c865e9aac4c5e7cec7f7 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/labs/wavefrontmesh/qwavefrontmesh.cpp38
1 files changed, 27 insertions, 11 deletions
diff --git a/src/labs/wavefrontmesh/qwavefrontmesh.cpp b/src/labs/wavefrontmesh/qwavefrontmesh.cpp
index b2a1edf1a7..472b663509 100644
--- a/src/labs/wavefrontmesh/qwavefrontmesh.cpp
+++ b/src/labs/wavefrontmesh/qwavefrontmesh.cpp
@@ -440,17 +440,33 @@ QString QWavefrontMesh::log() const
{
Q_D(const QWavefrontMesh);
switch (d->lastError) {
- case NoError: return QStringLiteral("No error");
- case InvalidSourceError: return QStringLiteral("Error: Invalid source");
- case UnsupportedFaceShapeError: return QStringLiteral("Error: Unsupported face shape in source");
- case UnsupportedIndexSizeError: return QStringLiteral("Error: Unsupported index size in source");
- case FileNotFoundError: return QStringLiteral("Error: File not found");
- case MissingPositionAttributeError: return QStringLiteral("Error: Missing '%1' attribute").arg(qtPositionAttributeName());
- case MissingTextureCoordinateAttributeError: return QStringLiteral("Error: Missing '%1' attribute").arg(qtTexCoordAttributeName());
- case MissingPositionAndTextureCoordinateAttributesError: return QStringLiteral("Error: Missing '%1' and '%2' attributes").arg(qtPositionAttributeName()).arg(qtTexCoordAttributeName());
- case TooManyAttributesError: return QStringLiteral("Error: Too many attributes");
- case InvalidPlaneDefinitionError: return QStringLiteral("Error: Invalid plane. V and W must be non-null and cannot be parallel");
- default: return QStringLiteral("Unknown error");
+ case NoError:
+ return QStringLiteral("No error");
+ case InvalidSourceError:
+ return QStringLiteral("Error: Invalid source");
+ case UnsupportedFaceShapeError:
+ return QStringLiteral("Error: Unsupported face shape in source");
+ case UnsupportedIndexSizeError:
+ return QStringLiteral("Error: Unsupported index size in source");
+ case FileNotFoundError:
+ return QStringLiteral("Error: File not found");
+ case MissingPositionAttributeError:
+ return QStringLiteral("Error: Missing '%1' attribute").arg(
+ QLatin1String(qtPositionAttributeName()));
+ case MissingTextureCoordinateAttributeError:
+ return QStringLiteral("Error: Missing '%1' attribute").arg(
+ QLatin1String(qtTexCoordAttributeName()));
+ case MissingPositionAndTextureCoordinateAttributesError:
+ return QStringLiteral("Error: Missing '%1' and '%2' attributes").arg(
+ QLatin1String(qtPositionAttributeName()),
+ QLatin1String(qtTexCoordAttributeName()));
+ case TooManyAttributesError:
+ return QStringLiteral("Error: Too many attributes");
+ case InvalidPlaneDefinitionError:
+ return QStringLiteral("Error: Invalid plane. "
+ "V and W must be non-null and cannot be parallel");
+ default:
+ return QStringLiteral("Unknown error");
};
}