summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMårten Nordheim <marten.nordheim@qt.io>2020-03-24 10:02:13 +0100
committerMårten Nordheim <marten.nordheim@qt.io>2020-04-21 07:23:56 +0000
commit00b6314f79cf4d8b1ea2ba81dbafe7088c52ae84 (patch)
tree59e43c6a83577e0082f2ef59f3e8e9e1f3399158
parentee5d89d5589dd1ace6e9f60d4ef611e23e2dec2d (diff)
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>
-rw-r--r--src/client/qwaylandintegration.cpp2
-rw-r--r--src/compositor/compositor_api/qwaylandcompositor.cpp2
-rw-r--r--src/compositor/wayland_wrapper/qwldatadevicemanager.cpp2
-rw-r--r--tests/auto/client/client/tst_client.cpp2
-rw-r--r--tests/auto/compositor/compositor/mockclient.cpp2
5 files changed, 5 insertions, 5 deletions
diff --git a/src/client/qwaylandintegration.cpp b/src/client/qwaylandintegration.cpp
index 85c1990b6..e3b86ee9f 100644
--- a/src/client/qwaylandintegration.cpp
+++ b/src/client/qwaylandintegration.cpp
@@ -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();
diff --git a/src/compositor/compositor_api/qwaylandcompositor.cpp b/src/compositor/compositor_api/qwaylandcompositor.cpp
index 83833991f..ccc87a477 100644
--- a/src/compositor/compositor_api/qwaylandcompositor.cpp
+++ b/src/compositor/compositor_api/qwaylandcompositor.cpp
@@ -223,7 +223,7 @@ void QWaylandCompositorPrivate::init()
int fd = wl_event_loop_get_fd(loop);
QSocketNotifier *sockNot = new QSocketNotifier(fd, QSocketNotifier::Read, q);
- QObject::connect(sockNot, SIGNAL(activated(int)), q, SLOT(processWaylandEvents()));
+ QObject::connect(sockNot, SIGNAL(activated(QSocketDescriptor)), q, SLOT(processWaylandEvents()));
QAbstractEventDispatcher *dispatcher = QGuiApplicationPrivate::eventDispatcher;
QObject::connect(dispatcher, SIGNAL(aboutToBlock()), q, SLOT(processWaylandEvents()));
diff --git a/src/compositor/wayland_wrapper/qwldatadevicemanager.cpp b/src/compositor/wayland_wrapper/qwldatadevicemanager.cpp
index 46df52109..d72bdf36d 100644
--- a/src/compositor/wayland_wrapper/qwldatadevicemanager.cpp
+++ b/src/compositor/wayland_wrapper/qwldatadevicemanager.cpp
@@ -107,7 +107,7 @@ void DataDeviceManager::retain()
fcntl(fd[0], F_SETFL, fcntl(fd[0], F_GETFL, 0) | O_NONBLOCK);
m_current_selection_source->send(mimeType, fd[1]);
m_retainedReadNotifier = new QSocketNotifier(fd[0], QSocketNotifier::Read, this);
- connect(m_retainedReadNotifier, SIGNAL(activated(int)), SLOT(readFromClient(int)));
+ connect(m_retainedReadNotifier, &QSocketNotifier::activated, this, &DataDeviceManager::readFromClient);
}
void DataDeviceManager::finishReadFromClient(bool exhausted)
diff --git a/tests/auto/client/client/tst_client.cpp b/tests/auto/client/client/tst_client.cpp
index 499a93a1d..42e23b54c 100644
--- a/tests/auto/client/client/tst_client.cpp
+++ b/tests/auto/client/client/tst_client.cpp
@@ -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);
diff --git a/tests/auto/compositor/compositor/mockclient.cpp b/tests/auto/compositor/compositor/mockclient.cpp
index 27d1eed89..76ccd0c58 100644
--- a/tests/auto/compositor/compositor/mockclient.cpp
+++ b/tests/auto/compositor/compositor/mockclient.cpp
@@ -57,7 +57,7 @@ MockClient::MockClient()
fd = wl_display_get_fd(display);
QSocketNotifier *readNotifier = new QSocketNotifier(fd, QSocketNotifier::Read, this);
- connect(readNotifier, SIGNAL(activated(int)), this, SLOT(readEvents()));
+ connect(readNotifier, SIGNAL(activated(QSocketDescriptor)), this, SLOT(readEvents()));
QAbstractEventDispatcher *dispatcher = QGuiApplicationPrivate::eventDispatcher;
connect(dispatcher, SIGNAL(awake()), this, SLOT(flushDisplay()));