diff options
author | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2019-06-11 19:38:28 +0200 |
---|---|---|
committer | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2019-06-11 19:39:01 +0200 |
commit | df779e0e743020d53c4bf629d781851714e26552 (patch) | |
tree | a18d97306366d767b4984831c1a20b1674510d97 /src/quick3d/quick3drender/items | |
parent | 0d740567cac4b3be17f1f3facaddc2974dfba3e7 (diff) |
Replace QLatin1Literal with QLatin1String
QLatin1Literal is an undocumented and deprecated typedef
for QLatin1String, just use the original.
Change-Id: Id6a813ed5c0a457f003dbd118b64f77d9d82cb13
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'src/quick3d/quick3drender/items')
-rw-r--r-- | src/quick3d/quick3drender/items/quick3draycaster.cpp | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/src/quick3d/quick3drender/items/quick3draycaster.cpp b/src/quick3d/quick3drender/items/quick3draycaster.cpp index 55c08a806..b8f086983 100644 --- a/src/quick3d/quick3drender/items/quick3draycaster.cpp +++ b/src/quick3d/quick3drender/items/quick3draycaster.cpp @@ -73,38 +73,38 @@ QJSValue Quick3DRayCasterPrivate::convertHits(const QAbstractRayCaster::Hits &hi auto jsHits = engine->newArray(hits.length()); for (int i=0; i<hits.size(); i++) { QJSValue v = engine->newObject(); - v.setProperty(QLatin1Literal("type"), hits[i].type()); - v.setProperty(QLatin1Literal("entity"), engine->newQObject(hits[i].entity())); - v.setProperty(QLatin1Literal("distance"), hits[i].distance()); + v.setProperty(QLatin1String("type"), hits[i].type()); + v.setProperty(QLatin1String("entity"), engine->newQObject(hits[i].entity())); + v.setProperty(QLatin1String("distance"), hits[i].distance()); { QJSValue p = engine->newObject(); - p.setProperty(QLatin1Literal("x"), hits[i].localIntersection().x()); - p.setProperty(QLatin1Literal("y"), hits[i].localIntersection().y()); - p.setProperty(QLatin1Literal("z"), hits[i].localIntersection().z()); - v.setProperty(QLatin1Literal("localIntersection"), p); + p.setProperty(QLatin1String("x"), hits[i].localIntersection().x()); + p.setProperty(QLatin1String("y"), hits[i].localIntersection().y()); + p.setProperty(QLatin1String("z"), hits[i].localIntersection().z()); + v.setProperty(QLatin1String("localIntersection"), p); } { QJSValue p = engine->newObject(); - p.setProperty(QLatin1Literal("x"), hits[i].worldIntersection().x()); - p.setProperty(QLatin1Literal("y"), hits[i].worldIntersection().y()); - p.setProperty(QLatin1Literal("z"), hits[i].worldIntersection().z()); - v.setProperty(QLatin1Literal("worldIntersection"), p); + p.setProperty(QLatin1String("x"), hits[i].worldIntersection().x()); + p.setProperty(QLatin1String("y"), hits[i].worldIntersection().y()); + p.setProperty(QLatin1String("z"), hits[i].worldIntersection().z()); + v.setProperty(QLatin1String("worldIntersection"), p); } switch (hits[i].type()) { case Qt3DRender::QRayCasterHit::TriangleHit: - v.setProperty(QLatin1Literal("primitiveIndex"), hits[i].primitiveIndex()); - v.setProperty(QLatin1Literal("vertex1Index"), hits[i].vertex1Index()); - v.setProperty(QLatin1Literal("vertex2Index"), hits[i].vertex2Index()); - v.setProperty(QLatin1Literal("vertex3Index"), hits[i].vertex3Index()); + v.setProperty(QLatin1String("primitiveIndex"), hits[i].primitiveIndex()); + v.setProperty(QLatin1String("vertex1Index"), hits[i].vertex1Index()); + v.setProperty(QLatin1String("vertex2Index"), hits[i].vertex2Index()); + v.setProperty(QLatin1String("vertex3Index"), hits[i].vertex3Index()); break; case Qt3DRender::QRayCasterHit::LineHit: - v.setProperty(QLatin1Literal("primitiveIndex"), hits[i].primitiveIndex()); - v.setProperty(QLatin1Literal("vertex1Index"), hits[i].vertex1Index()); - v.setProperty(QLatin1Literal("vertex2Index"), hits[i].vertex2Index()); + v.setProperty(QLatin1String("primitiveIndex"), hits[i].primitiveIndex()); + v.setProperty(QLatin1String("vertex1Index"), hits[i].vertex1Index()); + v.setProperty(QLatin1String("vertex2Index"), hits[i].vertex2Index()); break; case Qt3DRender::QRayCasterHit::PointHit: - v.setProperty(QLatin1Literal("primitiveIndex"), hits[i].primitiveIndex()); + v.setProperty(QLatin1String("primitiveIndex"), hits[i].primitiveIndex()); break; default: break; } |