summaryrefslogtreecommitdiffstats
path: root/src/corelib/animation/qabstractanimation.cpp
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2021-12-30 10:33:34 +0100
committerMarc Mutz <marc.mutz@qt.io>2022-01-05 08:22:00 +0100
commitbf81cd8d923b499f261ce2938faea506d385c639 (patch)
treef0e2c1f2c2dd4189d4ce3a3749b859e471ab470d /src/corelib/animation/qabstractanimation.cpp
parent85c31d976fd4ea611f03b18372f57130c16f9c34 (diff)
De-inline ctors/dtors in qabstractanimation_p.h
Also add explicit, where missing, and use NSDMI to simplify default ctor implementations. For the ctors, this is just about code hygiene. The classes are exported, so de-inlining the ctors prevents them from being duplicated in other libraries. Ditto dtors, except in the case of dtors, being virtual functions, we also avoid duplicating vtables, which has its own set of problems (see bug-report). Task-number: QTBUG-45582 Change-Id: I11536844b751f2e81269a5637153f84c8874ab10 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/animation/qabstractanimation.cpp')
-rw-r--r--src/corelib/animation/qabstractanimation.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/corelib/animation/qabstractanimation.cpp b/src/corelib/animation/qabstractanimation.cpp
index 1e887bfb54..ce9cb70565 100644
--- a/src/corelib/animation/qabstractanimation.cpp
+++ b/src/corelib/animation/qabstractanimation.cpp
@@ -227,6 +227,8 @@ QUnifiedTimer::QUnifiedTimer() :
driver = &defaultDriver;
}
+QUnifiedTimer::~QUnifiedTimer()
+ = default;
QUnifiedTimer *QUnifiedTimer::instance(bool create)
{
@@ -560,6 +562,9 @@ QAnimationTimer::QAnimationTimer() :
{
}
+QAnimationTimer::~QAnimationTimer()
+ = default;
+
QAnimationTimer *QAnimationTimer::instance(bool create)
{
QAnimationTimer *inst;
@@ -896,6 +901,9 @@ QDefaultAnimationDriver::QDefaultAnimationDriver(QUnifiedTimer *timer)
connect(this, SIGNAL(stopped()), this, SLOT(stopTimer()));
}
+QDefaultAnimationDriver::~QDefaultAnimationDriver()
+ = default;
+
void QDefaultAnimationDriver::timerEvent(QTimerEvent *e)
{
Q_ASSERT(e->timerId() == m_timer.timerId());
@@ -914,6 +922,21 @@ void QDefaultAnimationDriver::stopTimer()
m_timer.stop();
}
+QAnimationDriverPrivate::QAnimationDriverPrivate()
+ = default;
+
+QAnimationDriverPrivate::~QAnimationDriverPrivate()
+ = default;
+
+QAbstractAnimationTimer::QAbstractAnimationTimer()
+ = default;
+
+QAbstractAnimationTimer::~QAbstractAnimationTimer()
+ = default;
+
+QAbstractAnimationPrivate::QAbstractAnimationPrivate()
+ = default;
+
QAbstractAnimationPrivate::~QAbstractAnimationPrivate() { }
void QAbstractAnimationPrivate::setState(QAbstractAnimation::State newState)