diff options
Diffstat (limited to 'src/corelib/animation')
-rw-r--r-- | src/corelib/animation/qabstractanimation.cpp | 11 | ||||
-rw-r--r-- | src/corelib/animation/qabstractanimation.h | 6 | ||||
-rw-r--r-- | src/corelib/animation/qvariantanimation.cpp | 13 |
3 files changed, 23 insertions, 7 deletions
diff --git a/src/corelib/animation/qabstractanimation.cpp b/src/corelib/animation/qabstractanimation.cpp index 7c16f7e..2d5cfab 100644 --- a/src/corelib/animation/qabstractanimation.cpp +++ b/src/corelib/animation/qabstractanimation.cpp @@ -404,6 +404,8 @@ void QUnifiedTimer::installAnimationDriver(QAnimationDriver *d) The default animation system is driven by a timer that fires at regular intervals. In some scenarios, it is better to drive the animation based on other synchronization mechanisms, such as the vertical refresh rate of the screen. + + \internal */ QAnimationDriver::QAnimationDriver(QObject *parent) @@ -420,6 +422,8 @@ QAnimationDriver::QAnimationDriver(QAnimationDriverPrivate &dd, QObject *parent) /*! Advances the animation based on the current time. This function should be continuously called by the driver while the animation is running. + + \internal */ void QAnimationDriver::advance() { @@ -434,6 +438,8 @@ void QAnimationDriver::advance() /*! Installs this animation driver. The animation driver is thread local and will only apply for the thread its installed in. + + \internal */ void QAnimationDriver::install() { @@ -471,6 +477,8 @@ void QAnimationDriver::stop() This function is called by the animation framework to notify the driver that it should start running. + + \internal */ /*! @@ -478,6 +486,8 @@ void QAnimationDriver::stop() This function is called by the animation framework to notify the driver that it should stop running. + + \internal */ /*! @@ -491,6 +501,7 @@ QDefaultAnimationDriver::QDefaultAnimationDriver(QUnifiedTimer *timer) void QDefaultAnimationDriver::timerEvent(QTimerEvent *e) { Q_ASSERT(e->timerId() == m_timer.timerId()); + Q_UNUSED(e); // if the assertions are disabled advance(); } diff --git a/src/corelib/animation/qabstractanimation.h b/src/corelib/animation/qabstractanimation.h index 957b9d5..0900870 100644 --- a/src/corelib/animation/qabstractanimation.h +++ b/src/corelib/animation/qabstractanimation.h @@ -140,7 +140,7 @@ class Q_CORE_EXPORT QAnimationDriver : public QObject Q_DECLARE_PRIVATE(QAnimationDriver) public: - QAnimationDriver(QObject *parent); + QAnimationDriver(QObject *parent = 0); void advance(); void install(); @@ -148,8 +148,8 @@ public: bool isRunning() const; protected: - virtual void started() = 0; - virtual void stopped() = 0; + virtual void started() {}; + virtual void stopped() {}; QAnimationDriver(QAnimationDriverPrivate &dd, QObject *parent = 0); diff --git a/src/corelib/animation/qvariantanimation.cpp b/src/corelib/animation/qvariantanimation.cpp index 212e85d..c76cb89 100644 --- a/src/corelib/animation/qvariantanimation.cpp +++ b/src/corelib/animation/qvariantanimation.cpp @@ -431,12 +431,17 @@ void QVariantAnimation::registerInterpolator(QVariantAnimation::Interpolator fun { // will override any existing interpolators QInterpolatorVector *interpolators = registeredInterpolators(); + // When built on solaris with GCC, the destructors can be called + // in such an order that we get here with interpolators == NULL, + // to continue causes the app to crash on exit with a SEGV + if (interpolators) { #ifndef QT_NO_THREAD - QMutexLocker locker(QMutexPool::globalInstanceGet(interpolators)); + QMutexLocker locker(QMutexPool::globalInstanceGet(interpolators)); #endif - if (int(interpolationType) >= interpolators->count()) - interpolators->resize(int(interpolationType) + 1); - interpolators->replace(interpolationType, func); + if (int(interpolationType) >= interpolators->count()) + interpolators->resize(int(interpolationType) + 1); + interpolators->replace(interpolationType, func); + } } |