Commit b5734883 authored by Dan Lipsa's avatar Dan Lipsa

Rename variable: IgnoreBlocking --> DeferEventsIfBlocked

Conflicts:
	pqEventDispatcher.cxx
parent 3b19c527
......@@ -52,7 +52,7 @@ using namespace std;
namespace
{
static QList<QPointer<QTimer> > RegisteredTimers;
void processTimers()
{
foreach (QTimer* timer, RegisteredTimers)
......@@ -69,7 +69,7 @@ namespace
};
bool pqEventDispatcher::DeferMenuTimeouts = false;
bool pqEventDispatcher::IgnoreBlocking = false;
bool pqEventDispatcher::DeferEventsIfBlocked = false;
//-----------------------------------------------------------------------------
pqEventDispatcher::pqEventDispatcher(QObject* parentObject) :
......@@ -118,11 +118,12 @@ void pqEventDispatcher::registerTimer(QTimer* timer)
}
//-----------------------------------------------------------------------------
void pqEventDispatcher::setIgnoreBlocking(bool enable)
void pqEventDispatcher::deferEventsIfBlocked(bool enable)
{
pqEventDispatcher::IgnoreBlocking = enable;
pqEventDispatcher::DeferEventsIfBlocked = enable;
}
//-----------------------------------------------------------------------------
void pqEventDispatcher::aboutToBlock()
{
......@@ -184,8 +185,9 @@ bool pqEventDispatcher::playEvents(pqEventSource& source, pqEventPlayer& player)
this->PlayBackFinished = false;
while (!this->PlayBackFinished)
{
this->playEvent();
}
//cerr << "=== playEvent(1) ===" << endl;
this->playEvent();
}
this->ActiveSource = NULL;
this->ActivePlayer = NULL;
......@@ -202,14 +204,16 @@ bool pqEventDispatcher::playEvents(pqEventSource& source, pqEventPlayer& player)
//-----------------------------------------------------------------------------
void pqEventDispatcher::playEventOnBlocking()
{
if (pqEventDispatcher::DeferMenuTimeouts || pqEventDispatcher::IgnoreBlocking)
if (pqEventDispatcher::DeferMenuTimeouts || pqEventDispatcher::DeferEventsIfBlocked)
{
//cerr << "=== playEventOnBlocking ===" << endl;
this->BlockTimer.start();
return;
}
//cout << "---blocked event: " << endl;
// if needed for debugging, I can print blocking annotation here.
//cerr << "=== playEvent(2) ===" << endl;
this->playEvent(1);
//if (!this->BlockTimer.isActive())
......
......@@ -99,10 +99,10 @@ public:
/// event dispatch.
static void registerTimer(QTimer* timer);
/// Disables the behavior where more events may be dispatched if Qt starts
/// waiting in an event loop. Warning: Setting this to true will prevent
/// modal dialogs from functioning correctly.
static void setIgnoreBlocking(bool enable);
/// Disables the behavior where more test events may be dispatched
/// if Qt starts waiting in an event loop. Warning: Setting this to
/// true will prevent modal dialogs from functioning correctly.
static void deferEventsIfBlocked(bool defer);
signals:
/// signal when playback starts
......@@ -127,7 +127,11 @@ protected:
bool PlayBackFinished;
bool PlayBackStatus;
static bool DeferMenuTimeouts;
static bool IgnoreBlocking;
/// This variable says that we should not continue to process test events
/// when the application is blocked in a Qt event loop - it is either blocked
/// in a modal dialog or is in a long wait while also processing events
/// (such as when waiting from Insitu server @see pqLiveInsituManager).
static bool DeferEventsIfBlocked;
pqEventSource* ActiveSource;
pqEventPlayer* ActivePlayer;
......
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