Update connects to QSocketNotifier::activated

The int-overload will in some cases truncate the descriptor.
So it's being replaced. On Linux it won't truncate, so the slot can stay
as int, but we still update which signal to connect to.

Task-number: QTBUG-70441
Change-Id: I516a453c381e8d29464febabfd69c788e58db5fe
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
This commit is contained in:
Mårten Nordheim 2020-03-24 10:02:13 +01:00
parent 592cfb27f8
commit 88eb97dd0a
2 changed files with 2 additions and 2 deletions

View File

@ -198,7 +198,7 @@ void QWaylandIntegration::initialize()
int fd = wl_display_get_fd(mDisplay->wl_display());
QSocketNotifier *sn = new QSocketNotifier(fd, QSocketNotifier::Read, mDisplay.data());
QObject::connect(sn, SIGNAL(activated(int)), mDisplay.data(), SLOT(flushRequests()));
QObject::connect(sn, SIGNAL(activated(QSocketDescriptor)), mDisplay.data(), SLOT(flushRequests()));
// Qt does not support running with no screens
mDisplay->ensureScreen();

View File

@ -149,7 +149,7 @@ public:
: compositor(c)
{
QSocketNotifier *notifier = new QSocketNotifier(compositor->waylandFileDescriptor(), QSocketNotifier::Read, this);
connect(notifier, SIGNAL(activated(int)), this, SLOT(processWaylandEvents()));
connect(notifier, SIGNAL(activated(QSocketDescriptor)), this, SLOT(processWaylandEvents()));
// connect to the event dispatcher to make sure to flush out the outgoing message queue
connect(QCoreApplication::eventDispatcher(), &QAbstractEventDispatcher::awake, this, &tst_WaylandClient::processWaylandEvents);
connect(QCoreApplication::eventDispatcher(), &QAbstractEventDispatcher::aboutToBlock, this, &tst_WaylandClient::processWaylandEvents);