From 66fabff2530f2080c07bcf89a47474daea4c7c38 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Mon, 19 Aug 2019 11:04:30 +0200 Subject: Reference Examples: Use auto for results of new and component.create() Change-Id: Ibfd92fbc5a99b38cf8b31a11c0adfdfa69e2bb36 Reviewed-by: Fabian Kosmale Reviewed-by: Simon Hausmann --- examples/qml/referenceexamples/default/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples/qml/referenceexamples/default/main.cpp') 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(component.create()); + auto *party = qobject_cast(component.create()); if (party && party->host()) { qWarning() << party->host()->name() << "is having a birthday!"; -- cgit v1.2.1