diff options
author | Laurent Montel <laurent.montel@kdab.com> | 2017-12-21 09:19:44 +0100 |
---|---|---|
committer | Paul Lemire <paul.lemire@kdab.com> | 2018-01-16 10:38:57 +0000 |
commit | e9594f27ccad5667ebc27451f87184296c5cd297 (patch) | |
tree | 1d7734ee082c4a2a9909438c0fb0d56c845e9376 /examples/qt3d | |
parent | 84fae3b0faf2d3a31dc47a9c243a6f7545be9abf (diff) |
Fix 3d example apps
Remove extra QString(...) it's already a QString here. And use const'ref
Change-Id: Ia58cd3046b3b13ec52e196d93cba00fc2384a083
Reviewed-by: Andy Maloney <asmaloney@gmail.com>
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'examples/qt3d')
-rw-r--r-- | examples/qt3d/3d-text/main.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/qt3d/3d-text/main.cpp b/examples/qt3d/3d-text/main.cpp index 17d749f94..f480f8a2e 100644 --- a/examples/qt3d/3d-text/main.cpp +++ b/examples/qt3d/3d-text/main.cpp @@ -79,9 +79,9 @@ int main(int argc, char *argv[]) auto *textMaterial = new Qt3DExtras::QPhongMaterial(root); { // text int i = 0; - QStringList fonts = QFontDatabase().families(); + const QStringList fonts = QFontDatabase().families(); - for (QString family : fonts) + for (const QString &family : fonts) { auto *text = new Qt3DCore::QEntity(root); auto *textMesh = new Qt3DExtras::QExtrudedTextMesh(); @@ -92,7 +92,7 @@ int main(int argc, char *argv[]) textTransform->setScale(.2f); textMesh->setDepth(.45f); textMesh->setFont(font); - textMesh->setText(QString(family)); + textMesh->setText(family); textMaterial->setDiffuse(QColor(111, 150, 255)); text->addComponent(textMaterial); |