diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2019-08-19 11:04:30 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2019-08-20 08:42:16 +0200 |
commit | 66fabff2530f2080c07bcf89a47474daea4c7c38 (patch) | |
tree | 0ba776e0f62cec2059223fd661098a48deae8801 /examples/qml/referenceexamples/default | |
parent | 73a9c52fedf25196ed17d55cd1c6b1c1c9fd991d (diff) |
Reference Examples: Use auto for results of new and component.create()
Change-Id: Ibfd92fbc5a99b38cf8b31a11c0adfdfa69e2bb36
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'examples/qml/referenceexamples/default')
-rw-r--r-- | examples/qml/referenceexamples/default/main.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/qml/referenceexamples/default/main.cpp b/examples/qml/referenceexamples/default/main.cpp index d8c3e466ce..017d6495cd 100644 --- a/examples/qml/referenceexamples/default/main.cpp +++ b/examples/qml/referenceexamples/default/main.cpp @@ -65,7 +65,7 @@ int main(int argc, char ** argv) QQmlEngine engine; QQmlComponent component(&engine, QUrl("qrc:example.qml")); - BirthdayParty *party = qobject_cast<BirthdayParty *>(component.create()); + auto *party = qobject_cast<BirthdayParty *>(component.create()); if (party && party->host()) { qWarning() << party->host()->name() << "is having a birthday!"; |