Skip to content

Commit

Permalink
Fixed clearing notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
lslezak committed Jul 9, 2018
1 parent 5ebf1c1 commit e1d546d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/YQDialog.cc
Expand Up @@ -133,6 +133,7 @@ void YQDialog::clearHttpNotifiers() {
yuiMilestone() << "Clearing notifiers..." << std::endl;
BOOST_FOREACH(QSocketNotifier *_notifier, _http_notifiers)
{
yuiMilestone() << "Removing notifier for fd " << _notifier->socket() << std::endl;
_notifier->setEnabled(false);
delete _notifier;
}
Expand Down Expand Up @@ -806,20 +807,23 @@ void YQDialog::createHttpNotifiers()
QSocketNotifier *_notifier = new QSocketNotifier( s, QSocketNotifier::Read );
QObject::connect( _notifier, &pclass(_notifier)::activated,
this, &pclass(this)::httpData);
_http_notifiers.push_back(_notifier);
}

BOOST_FOREACH(int s, sockets.write())
{
QSocketNotifier *_notifier = new QSocketNotifier( s, QSocketNotifier::Write );
QObject::connect( _notifier, &pclass(_notifier)::activated,
this, &pclass(this)::httpData);
_http_notifiers.push_back(_notifier);
}

BOOST_FOREACH(int s, sockets.exception())
{
QSocketNotifier *_notifier = new QSocketNotifier( s, QSocketNotifier::Exception );
QObject::connect( _notifier, &pclass(_notifier)::activated,
this, &pclass(this)::httpData);
_http_notifiers.push_back(_notifier);
}
}
}
Expand Down Expand Up @@ -851,8 +855,6 @@ YQDialog::waitForEventInternal( int timeout_millisec )
#endif
_eventLoop->exec();

clearHttpNotifiers();

#if VERBOSE_EVENT_LOOP
yuiDebug() << "Event loop finished for " << this << std::endl;
#endif
Expand Down

0 comments on commit e1d546d

Please sign in to comment.