diff options
author | Marc Mutz <marc.mutz@qt.io> | 2023-02-09 09:03:17 +0100 |
---|---|---|
committer | Marc Mutz <marc.mutz@qt.io> | 2023-02-15 16:21:53 +0100 |
commit | c889ffed9f4d59c8f7c5849d7b5c8ece729520d0 (patch) | |
tree | c0d9e391c3b0691fb2ca203b4bbb86fe8731247f /src/widgets/doc/snippets/code | |
parent | 545400addd7935c87ec79596ac3010b4f9016a84 (diff) | |
download | qtbase-c889ffed9f4d59c8f7c5849d7b5c8ece729520d0.tar.gz |
QTextStream: make dtor non-virtual come Qt 7
There's no reason to treat QTextStream polymorphically: it has no
virtual functions other than the dtor. So don't.
Removing the vtable is BiC, so we can only do it come Qt 7, but let's
warn already, and "deprecate" the virtual'ness (indirectly) by marking
the class final as an opt-in.
The extra macro beside the class name throws off syncqt, so add a
#pragma qt_class.
[ChangeLog][Deprecation Notice] Inheriting QTextStream is
deprecated. QTextStream will no longer have a virtual destructor in
Qt 7. If your code inherits QTextStream, port to a design that doesn't
require a polymorphic QTextStream. You may define the macro
QT_NO_INHERITABLE_TEXT_STREAM to mark QTextStream as final to assist
you in checking for such code. This is the default if you're compiling
with QT_DISABLE_DEPRECATED_UP_TO set to Qt 6.9.
Fixes: QTBUG-111051
Change-Id: Ib32b8c0e49990d791cdc502bf40cb250f034404b
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/widgets/doc/snippets/code')
0 files changed, 0 insertions, 0 deletions