From 70f9fed9c3cf96fa4a6a8f67c626acc71b600295 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Fri, 23 Jun 2023 16:58:04 +0200 Subject: DocumentImpl: use override instead of virtual Virtual functions should have exactly one of virtual, override or final: virtual is for new virtual functions, override and final for overrides. DocumentImpl has a virtual dtor due to NodeImpl's being virtual, therefore ovrride is apt. Pick-to: 6.6 6.5 Change-Id: Ib5395b92133b403deb9342b4c3f35d638df94561 Reviewed-by: Ulf Hermann --- src/qml/qml/qqmlxmlhttprequest.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qml/qml/qqmlxmlhttprequest.cpp b/src/qml/qml/qqmlxmlhttprequest.cpp index 3d0a87ffcb..979cc76e59 100644 --- a/src/qml/qml/qqmlxmlhttprequest.cpp +++ b/src/qml/qml/qqmlxmlhttprequest.cpp @@ -120,7 +120,7 @@ class DocumentImpl : public QQmlRefCount, public NodeImpl { public: DocumentImpl() : root(nullptr) { type = Document; } - virtual ~DocumentImpl() { + ~DocumentImpl() override { delete root; } -- cgit v1.2.3