Fix std::bad_function_call in event handling (#3388)

This commit is contained in:
omartijn
2025-04-13 00:30:55 +02:00
committed by GitHub
parent 97490cb3c1
commit fbfc3c5b12

View File

@@ -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) {