diff options
author | Ulf Hermann <[email protected]> | 2019-08-19 11:04:30 +0200 |
---|---|---|
committer | Ulf Hermann <[email protected]> | 2019-08-20 08:42:16 +0200 |
commit | 66fabff2530f2080c07bcf89a47474daea4c7c38 (patch) | |
tree | 0ba776e0f62cec2059223fd661098a48deae8801 /examples/qml/referenceexamples/adding/main.cpp | |
parent | 73a9c52fedf25196ed17d55cd1c6b1c1c9fd991d (diff) |
Reference Examples: Use auto for results of new and component.create()
Change-Id: Ibfd92fbc5a99b38cf8b31a11c0adfdfa69e2bb36
Reviewed-by: Fabian Kosmale <[email protected]>
Reviewed-by: Simon Hausmann <[email protected]>
Diffstat (limited to 'examples/qml/referenceexamples/adding/main.cpp')
-rw-r--r-- | examples/qml/referenceexamples/adding/main.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/qml/referenceexamples/adding/main.cpp b/examples/qml/referenceexamples/adding/main.cpp index 5c3c891130..e312149da1 100644 --- a/examples/qml/referenceexamples/adding/main.cpp +++ b/examples/qml/referenceexamples/adding/main.cpp @@ -62,7 +62,7 @@ int main(int argc, char ** argv) QQmlEngine engine; QQmlComponent component(&engine, QUrl("qrc:example.qml")); - Person *person = qobject_cast<Person *>(component.create()); + auto *person = qobject_cast<Person *>(component.create()); if (person) { qWarning() << "The person's name is" << person->name(); qWarning() << "They wear a" << person->shoeSize() << "sized shoe"; |