diff options
Diffstat (limited to 'examples/qml/referenceexamples/methods/main.cpp')
-rw-r--r-- | examples/qml/referenceexamples/methods/main.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/examples/qml/referenceexamples/methods/main.cpp b/examples/qml/referenceexamples/methods/main.cpp index e30e1d9fb1..32eb4831cc 100644 --- a/examples/qml/referenceexamples/methods/main.cpp +++ b/examples/qml/referenceexamples/methods/main.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2017 The Qt Company Ltd. +** Copyright (C) 2021 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the examples of the Qt Toolkit. @@ -47,6 +47,7 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ + #include <QCoreApplication> #include <QQmlEngine> #include <QQmlComponent> @@ -63,10 +64,10 @@ int main(int argc, char ** argv) auto *party = qobject_cast<BirthdayParty *>(component.create()); if (party && party->host()) { - qWarning() << party->host()->name() << "is having a birthday!"; - qWarning() << "They are inviting:"; - for (int ii = 0; ii < party->guestCount(); ++ii) - qWarning() << " " << party->guest(ii)->name(); + qInfo() << party->host()->name() << "is having a birthday!" + << "\nThey are inviting:"; + for (qsizetype ii = 0; ii < party->guestCount(); ++ii) + qInfo() << " " << party->guest(ii)->name(); return EXIT_SUCCESS; } |