Fix std::bad_function_call in event handling (#3388)
This commit is contained in:
@@ -113,7 +113,7 @@ void RunLoop::addWatch(int fd, Event event, std::function<void(int, Event)>&& cb
|
||||
if (event == Event::Read || event == Event::ReadWrite) {
|
||||
auto notifier = std::make_unique<QSocketNotifier>(fd, QSocketNotifier::Read);
|
||||
QObject::connect(notifier.get(), &QSocketNotifier::activated, impl.get(), &RunLoop::Impl::onReadEvent);
|
||||
impl->readPoll[fd] = WatchPair(std::move(notifier), std::move(cb));
|
||||
impl->readPoll[fd] = WatchPair(std::move(notifier), cb);
|
||||
}
|
||||
|
||||
if (event == Event::Write || event == Event::ReadWrite) {
|
||||
|
||||
Reference in New Issue
Block a user