QWaylandMimeData: adapt to qt_safe_poll changes from qtbase

It's private API in qtbase and has been changed recently.

Change-Id: I763918a035bce67c06a6120e9d7dfb542ca023b8
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This commit is contained in:
Ahmad Samir 2023-10-25 14:32:56 +03:00
parent d76ce4732e
commit 7666f93b3b

View File

@ -11,6 +11,8 @@
#include <QtCore/QDebug>
using namespace std::chrono;
QT_BEGIN_NAMESPACE
namespace QtWaylandClient {
@ -205,13 +207,9 @@ int QWaylandMimeData::readData(int fd, QByteArray &data) const
struct pollfd readset;
readset.fd = fd;
readset.events = POLLIN;
struct timespec timeout;
timeout.tv_sec = 1;
timeout.tv_nsec = 0;
Q_FOREVER {
int ready = qt_safe_poll(&readset, 1, &timeout);
int ready = qt_safe_poll(&readset, 1, QDeadlineTimer(1s));
if (ready < 0) {
qWarning() << "QWaylandDataOffer: qt_safe_poll() failed";
return -1;