From 2cfcd6e3f52f2eb949f11a8416131519c1bd6d8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Sun, 23 Sep 2012 19:21:03 +0200 Subject: Fixed missing virtual destructors in qtdeclarative. Change-Id: I0b0e63b572617a56874e27361479de2690644aa3 Reviewed-by: Marc Mutz Reviewed-by: Thiago Macieira --- src/qml/animations/qabstractanimationjob.cpp | 4 ++++ src/qml/animations/qabstractanimationjob_p.h | 3 ++- src/qml/qml/qqmlglobal.cpp | 7 ++++++- src/qml/qml/qqmlglobal_p.h | 3 +++ src/qml/qml/qqmltypeloader.cpp | 3 +++ src/qml/qml/qqmltypeloader_p.h | 2 +- src/qml/qml/v4/qv4ir_p.h | 2 +- src/quick/items/qquickvisualadaptormodel.cpp | 4 ++++ src/quick/items/qquickvisualadaptormodel_p.h | 1 + 9 files changed, 25 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/qml/animations/qabstractanimationjob.cpp b/src/qml/animations/qabstractanimationjob.cpp index a12ab39267..20b8b4bf57 100644 --- a/src/qml/animations/qabstractanimationjob.cpp +++ b/src/qml/animations/qabstractanimationjob.cpp @@ -53,6 +53,10 @@ QT_BEGIN_NAMESPACE Q_GLOBAL_STATIC(QThreadStorage, animationTimer) #endif +QAnimationJobChangeListener::~QAnimationJobChangeListener() +{ +} + QQmlAnimationTimer::QQmlAnimationTimer() : QAbstractAnimationTimer(), lastTick(0), lastDelta(0), currentAnimationIdx(0), insideTick(false), diff --git a/src/qml/animations/qabstractanimationjob_p.h b/src/qml/animations/qabstractanimationjob_p.h index 1e932aeae7..12582a2986 100644 --- a/src/qml/animations/qabstractanimationjob_p.h +++ b/src/qml/animations/qabstractanimationjob_p.h @@ -166,9 +166,10 @@ protected: friend class QAnimationGroupJob; }; -class Q_AUTOTEST_EXPORT QAnimationJobChangeListener +class Q_QML_PRIVATE_EXPORT QAnimationJobChangeListener { public: + virtual ~QAnimationJobChangeListener(); virtual void animationFinished(QAbstractAnimationJob *) {} virtual void animationStateChanged(QAbstractAnimationJob *, QAbstractAnimationJob::State, QAbstractAnimationJob::State) {} virtual void animationCurrentLoopChanged(QAbstractAnimationJob *) {} diff --git a/src/qml/qml/qqmlglobal.cpp b/src/qml/qml/qqmlglobal.cpp index 6d6def879b..c9ab2fa16d 100644 --- a/src/qml/qml/qqmlglobal.cpp +++ b/src/qml/qml/qqmlglobal.cpp @@ -52,6 +52,10 @@ QQmlValueTypeProvider::QQmlValueTypeProvider() { } +QQmlValueTypeProvider::~QQmlValueTypeProvider() +{ +} + QQmlValueType *QQmlValueTypeProvider::createValueType(int type) { QQmlValueType *value = 0; @@ -287,7 +291,7 @@ Q_AUTOTEST_EXPORT QQmlValueTypeProvider *QQml_valueTypeProvider(void) return *providerPtr; } - +QQmlColorProvider::~QQmlColorProvider() {} QVariant QQmlColorProvider::colorFromString(const QString &, bool *ok) { if (ok) *ok = false; return QVariant(); } unsigned QQmlColorProvider::rgbaFromString(const QString &, bool *ok) { if (ok) *ok = false; return 0; } QVariant QQmlColorProvider::fromRgbF(double, double, double, double) { return QVariant(); } @@ -323,6 +327,7 @@ Q_AUTOTEST_EXPORT QQmlColorProvider *QQml_colorProvider(void) } +QQmlGuiProvider::~QQmlGuiProvider() {} QObject *QQmlGuiProvider::application(QObject *) { return 0; } QStringList QQmlGuiProvider::fontFamilies() { return QStringList(); } bool QQmlGuiProvider::openUrlExternally(QUrl &) { return false; } diff --git a/src/qml/qml/qqmlglobal_p.h b/src/qml/qml/qqmlglobal_p.h index 33e5d5692e..2777488e26 100644 --- a/src/qml/qml/qqmlglobal_p.h +++ b/src/qml/qml/qqmlglobal_p.h @@ -224,6 +224,7 @@ class Q_QML_PRIVATE_EXPORT QQmlValueTypeProvider { public: QQmlValueTypeProvider(); + virtual ~QQmlValueTypeProvider(); QQmlValueType *createValueType(int); @@ -276,6 +277,7 @@ Q_AUTOTEST_EXPORT QQmlValueTypeProvider *QQml_valueTypeProvider(); class Q_QML_PRIVATE_EXPORT QQmlColorProvider { public: + virtual ~QQmlColorProvider(); virtual QVariant colorFromString(const QString &, bool *); virtual unsigned rgbaFromString(const QString &, bool *); @@ -293,6 +295,7 @@ Q_QML_PRIVATE_EXPORT QQmlColorProvider *QQml_colorProvider(); class Q_QML_PRIVATE_EXPORT QQmlGuiProvider { public: + virtual ~QQmlGuiProvider(); virtual QObject *application(QObject *parent); virtual QObject *inputMethod(); virtual QStringList fontFamilies(); diff --git a/src/qml/qml/qqmltypeloader.cpp b/src/qml/qml/qqmltypeloader.cpp index ba137f8d78..933190547d 100644 --- a/src/qml/qml/qqmltypeloader.cpp +++ b/src/qml/qml/qqmltypeloader.cpp @@ -1880,6 +1880,9 @@ bool QQmlTypeLoader::isScriptLoaded(const QUrl &url) const return m_scriptCache.contains(url); } +QQmlTypeData::TypeDataCallback::~TypeDataCallback() +{ +} QQmlTypeData::QQmlTypeData(const QUrl &url, QQmlTypeLoader::Options options, QQmlTypeLoader *manager) diff --git a/src/qml/qml/qqmltypeloader_p.h b/src/qml/qml/qqmltypeloader_p.h index 4cbfc282c1..bb2f29fd78 100644 --- a/src/qml/qml/qqmltypeloader_p.h +++ b/src/qml/qml/qqmltypeloader_p.h @@ -429,7 +429,7 @@ public: // Used by QQmlComponent to get notifications struct TypeDataCallback { - ~TypeDataCallback() {} + virtual ~TypeDataCallback(); virtual void typeDataProgress(QQmlTypeData *, qreal) {} virtual void typeDataReady(QQmlTypeData *) {} }; diff --git a/src/qml/qml/v4/qv4ir_p.h b/src/qml/qml/v4/qv4ir_p.h index da7bb79f67..714cf59cf2 100644 --- a/src/qml/qml/v4/qv4ir_p.h +++ b/src/qml/qml/v4/qv4ir_p.h @@ -499,7 +499,7 @@ struct Function { Function(QQmlPool *pool) : pool(pool), tempCount(0) {} - ~Function(); + virtual ~Function(); BasicBlock *newBasicBlock(); QString *newString(const QString &text); diff --git a/src/quick/items/qquickvisualadaptormodel.cpp b/src/quick/items/qquickvisualadaptormodel.cpp index da331161ec..6d045c8759 100644 --- a/src/quick/items/qquickvisualadaptormodel.cpp +++ b/src/quick/items/qquickvisualadaptormodel.cpp @@ -876,6 +876,10 @@ QQuickVDMObjectData::QQuickVDMObjectData( static const QQuickVisualAdaptorModel::Accessors qt_vdm_null_accessors; static const VDMListDelegateDataType qt_vdm_list_accessors; +QQuickVisualAdaptorModel::Accessors::~Accessors() +{ +} + QQuickVisualAdaptorModel::QQuickVisualAdaptorModel() : accessors(&qt_vdm_null_accessors) { diff --git a/src/quick/items/qquickvisualadaptormodel_p.h b/src/quick/items/qquickvisualadaptormodel_p.h index 9c81d1e88b..1ce2aa2fa5 100644 --- a/src/quick/items/qquickvisualadaptormodel_p.h +++ b/src/quick/items/qquickvisualadaptormodel_p.h @@ -65,6 +65,7 @@ public: { public: inline Accessors() {} + virtual ~Accessors(); virtual int count(const QQuickVisualAdaptorModel &) const { return 0; } virtual void cleanup(QQuickVisualAdaptorModel &, QQuickVisualDataModel * = 0) const {} -- cgit v1.2.3