QIODeviceBase: make dtor protected
Base class dtors should be virtual and public or else protected and non-virtual. This one was neither of these. [ChangeLog][Potentially Source-Incompatible Changes][QtCore] The QIODeviceBase destructor is now protected to avoid deleting objects of classes derived from it through a QIODeviceBase pointer, which would be undefined behavior. Change-Id: Id390ace75d5b64f746d9b1865b8800c9f0590977 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
0e245c158f
commit
dca63b6ef6
@ -46,6 +46,8 @@ QT_BEGIN_NAMESPACE
|
||||
|
||||
class QIODeviceBase
|
||||
{
|
||||
protected:
|
||||
~QIODeviceBase() = default;
|
||||
public:
|
||||
enum OpenModeFlag {
|
||||
NotOpen = 0x0000,
|
||||
|
Loading…
x
Reference in New Issue
Block a user