Commit cb8a202d authored by Utkarsh Ayachit's avatar Utkarsh Ayachit
Browse files

BUG: The aboutToBlock() events must only be monitered with playing tests.

parent ce052e29
...@@ -55,10 +55,6 @@ pqEventDispatcher::pqEventDispatcher(QObject* parentObject) : ...@@ -55,10 +55,6 @@ pqEventDispatcher::pqEventDispatcher(QObject* parentObject) :
this->ActivePlayer = NULL; this->ActivePlayer = NULL;
this->PlayBackStatus = false; this->PlayBackStatus = false;
this->PlayBackFinished = false; this->PlayBackFinished = false;
QObject::connect(QAbstractEventDispatcher::instance(), SIGNAL(aboutToBlock()),
this, SLOT(aboutToBlock()));
QObject::connect(QAbstractEventDispatcher::instance(), SIGNAL(awake()),
this, SLOT(awake()));
#ifdef __APPLE__ #ifdef __APPLE__
this->BlockTimer.setInterval(1000); this->BlockTimer.setInterval(1000);
...@@ -113,6 +109,12 @@ bool pqEventDispatcher::playEvents(pqEventSource& source, pqEventPlayer& player) ...@@ -113,6 +109,12 @@ bool pqEventDispatcher::playEvents(pqEventSource& source, pqEventPlayer& player)
QApplication::setEffectEnabled(Qt::UI_General, false); QApplication::setEffectEnabled(Qt::UI_General, false);
QObject::connect(QAbstractEventDispatcher::instance(), SIGNAL(aboutToBlock()),
this, SLOT(aboutToBlock()));
QObject::connect(QAbstractEventDispatcher::instance(), SIGNAL(awake()),
this, SLOT(awake()));
// This is how the playback logic works: // This is how the playback logic works:
// * In here, we continuously keep on playing one event after another until // * In here, we continuously keep on playing one event after another until
// we are done processing all the events. // we are done processing all the events.
...@@ -133,6 +135,12 @@ bool pqEventDispatcher::playEvents(pqEventSource& source, pqEventPlayer& player) ...@@ -133,6 +135,12 @@ bool pqEventDispatcher::playEvents(pqEventSource& source, pqEventPlayer& player)
} }
this->ActiveSource = NULL; this->ActiveSource = NULL;
this->ActivePlayer = NULL; this->ActivePlayer = NULL;
QObject::disconnect(QAbstractEventDispatcher::instance(), SIGNAL(aboutToBlock()),
this, SLOT(aboutToBlock()));
QObject::disconnect(QAbstractEventDispatcher::instance(), SIGNAL(awake()),
this, SLOT(awake()));
return this->PlayBackStatus; return this->PlayBackStatus;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment