This commit is contained in:
liulinsong 2025-09-15 19:35:40 +00:00 committed by GitHub
commit ac2004e55b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 2 deletions

View File

@ -69,10 +69,12 @@ static gboolean socketNotifierSourceDispatch(GSource *source, GSourceFunc, gpoin
QEvent event(QEvent::SockAct); QEvent event(QEvent::SockAct);
GSocketNotifierSource *src = reinterpret_cast<GSocketNotifierSource *>(source); GSocketNotifierSource *src = reinterpret_cast<GSocketNotifierSource *>(source);
for (src->activeNotifierPos = 0; src->activeNotifierPos < src->pollfds.size(); src->activeNotifierPos = 0;
++src->activeNotifierPos) { while (src->activeNotifierPos < src->pollfds.size()) {
GPollFDWithQSocketNotifier *p = src->pollfds.at(src->activeNotifierPos); GPollFDWithQSocketNotifier *p = src->pollfds.at(src->activeNotifierPos);
++src->activeNotifierPos;
if ((p->pollfd.revents & p->pollfd.events) != 0) if ((p->pollfd.revents & p->pollfd.events) != 0)
QCoreApplication::sendEvent(p->socketNotifier, &event); QCoreApplication::sendEvent(p->socketNotifier, &event);
} }