aboutsummaryrefslogtreecommitdiffstats
path: root/examples/qml/referenceexamples/methods/main.cpp
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2019-08-19 11:04:30 +0200
committerUlf Hermann <ulf.hermann@qt.io>2019-08-20 08:42:16 +0200
commit66fabff2530f2080c07bcf89a47474daea4c7c38 (patch)
tree0ba776e0f62cec2059223fd661098a48deae8801 /examples/qml/referenceexamples/methods/main.cpp
parent73a9c52fedf25196ed17d55cd1c6b1c1c9fd991d (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/methods/main.cpp')
-rw-r--r--examples/qml/referenceexamples/methods/main.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/qml/referenceexamples/methods/main.cpp b/examples/qml/referenceexamples/methods/main.cpp
index 974cc26338..89404ec822 100644
--- a/examples/qml/referenceexamples/methods/main.cpp
+++ b/examples/qml/referenceexamples/methods/main.cpp
@@ -63,7 +63,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!";