Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-73189

QAbstractAnimation destructor emits stateChanged signal with invalid parameters

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • None
    • 5.11.3
    • None

    Description

      QAbstractAnimation::stateChanged signal is declared the following way:

       

      void QAbstractAnimation::stateChanged(QAbstractAnimation::State newState, QAbstractAnimation::State oldState)
      

      but in the class destructor there is:

          if (d->state != Stopped) {
              QAbstractAnimation::State oldState = d->state;
              d->state = Stopped;
              emit stateChanged(oldState, d->state);
              if (oldState == QAbstractAnimation::Running)
                  QAnimationTimer::unregisterAnimation(this);
          }
      

      Parameters are passed vise versa, so in the listening slots we are handling the situation like animation just started - and getting an error trying to cast this animation to QVariantAnimation, for example.

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            greydemonstr Sergey Ivanov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes