@@ -26,7 +26,7 @@ public:
{
pipe(pipefd_);
- notifier_ = new EventNotifier(pipefd_[0], EventNotifier::Read);
+ notifier_ = new EventNotifier(pipefd_[0], EventNotifier::Read, this);
notifier_->activated.connect(this, &EventHandler::readReady);
}
@@ -60,12 +60,6 @@ public:
return notified_;
}
- void moveToThread(Thread *thread)
- {
- Object::moveToThread(thread);
- notifier_->moveToThread(thread);
- }
-
private:
void readReady(EventNotifier *notifier)
{
@@ -20,7 +20,7 @@ class TimeoutHandler : public Object
{
public:
TimeoutHandler()
- : timeout_(false)
+ : timer_(this), timeout_(false)
{
timer_.timeout.connect(this, &TimeoutHandler::timeoutHandler);
timer_.start(100);
@@ -31,12 +31,6 @@ public:
return timeout_;
}
- void moveToThread(Thread *thread)
- {
- Object::moveToThread(thread);
- timer_.moveToThread(thread);
- }
-
private:
void timeoutHandler(Timer *timer)
{