diff options
author | Ahmad Samir <a.samirh78@gmail.com> | 2023-10-25 14:32:56 +0300 |
---|---|---|
committer | Ahmad Samir <a.samirh78@gmail.com> | 2023-10-28 18:35:28 +0200 |
commit | 077073671f262c51791d27e273e9b8971af087fa (patch) | |
tree | 54b1b2a54b196f9cb7ce847f4aa1b555002eea01 /src | |
parent | 469043910bb9ae1a16b543f92d4dca7dfff6f90c (diff) |
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>
Diffstat (limited to 'src')
-rw-r--r-- | src/client/qwaylanddataoffer.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/client/qwaylanddataoffer.cpp b/src/client/qwaylanddataoffer.cpp index b22887495..c21113a80 100644 --- a/src/client/qwaylanddataoffer.cpp +++ b/src/client/qwaylanddataoffer.cpp @@ -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; |