summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2019-05-29 12:16:19 +0200
committerGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2019-05-29 10:54:31 +0000
commit0574d5dc8a10cb4281c6f53c3d2d3e49f2109a6a (patch)
tree203ee5238266c610cbca20cd2a00a9fc31f780ce /src
parentf5bfb7a8db8e9ac5b37783aa2714f54e88b2ee87 (diff)
Make QCoreApplicationPrivate's destructor virtual in bootstrapped builds
In a bootstrapped build QCAP does not inherit from QObjectPrivate, meaning it won't get a polymorphic destructor, causing compile errors. This is necessary in preparation to add virtuals to QCAP. The "virtual" keyword is protected to avoid further warnings by compilers or linters telling that it's unnecessary because the base class' dtor is already virtual. Change-Id: Ifbd218154f74b4f1d2f2c5a3ef1fc31970f1c24b Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/kernel/qcoreapplication_p.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/corelib/kernel/qcoreapplication_p.h b/src/corelib/kernel/qcoreapplication_p.h
index 14ca3efd7f..6ede5d1bc0 100644
--- a/src/corelib/kernel/qcoreapplication_p.h
+++ b/src/corelib/kernel/qcoreapplication_p.h
@@ -84,6 +84,11 @@ public:
};
QCoreApplicationPrivate(int &aargc, char **aargv, uint flags);
+
+ // If not inheriting from QObjectPrivate: force this class to be polymorphic
+#ifdef QT_NO_QOBJECT
+ virtual
+#endif
~QCoreApplicationPrivate();
void init();