diff options
Diffstat (limited to 'examples/qml/referenceexamples/extended')
-rw-r--r-- | examples/qml/referenceexamples/extended/lineedit.cpp | 2 | ||||
-rw-r--r-- | examples/qml/referenceexamples/extended/main.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/examples/qml/referenceexamples/extended/lineedit.cpp b/examples/qml/referenceexamples/extended/lineedit.cpp index 777e15db07..feb1a08585 100644 --- a/examples/qml/referenceexamples/extended/lineedit.cpp +++ b/examples/qml/referenceexamples/extended/lineedit.cpp @@ -51,7 +51,7 @@ #include <qqml.h> LineEditExtension::LineEditExtension(QObject *object) -: QObject(object), m_lineedit(static_cast<QLineEdit *>(object)) +: QObject(object), m_lineedit(qobject_cast<QLineEdit *>(object)) { } diff --git a/examples/qml/referenceexamples/extended/main.cpp b/examples/qml/referenceexamples/extended/main.cpp index c99e052ae5..f91cec76b1 100644 --- a/examples/qml/referenceexamples/extended/main.cpp +++ b/examples/qml/referenceexamples/extended/main.cpp @@ -65,7 +65,7 @@ int main(int argc, char ** argv) // ![1] QQmlEngine engine; QQmlComponent component(&engine, QUrl("qrc:example.qml")); - QLineEdit *edit = qobject_cast<QLineEdit *>(component.create()); + auto *edit = qobject_cast<QLineEdit *>(component.create()); // ![1] if (edit) { |