From 8bc4ea1e97c138034d08c705a75f75763361400b Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 13 Nov 2019 10:27:25 +0100 Subject: Windows QPA: Fix deprecation warnings Fix warnings introduced by qtbase/72f57cc84244633ca69ede9a1fd510b9b1881c1d: qwindowstheme.cpp:167:62: warning: 'bool QWaitCondition::wait(QMutex*, long unsigned int)' is deprecated: Use wait(QMutex *lockedMutex, QDeadlineTimer deadline) instead [-Wdeprecated-declarations]qwindowstheme.cpp: In member function 'bool QShGetFileInfoThread::runWithParams(QShGetFileInfoParams*, long unsigned int)': qwindowstheme.cpp:201:63: warning: 'bool QWaitCondition::wait(QMutex*, long unsigned int)' is deprecated: Use wait(QMutex *lockedMutex, QDeadlineTimer deadline) instead [-Wdeprecated-declarations] Change-Id: Ie33f8b0e1e742f972d2a8065eba9e16a13ec43ee Reviewed-by: Oliver Wolff --- src/plugins/platforms/windows/qwindowstheme.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/plugins/platforms/windows/qwindowstheme.cpp b/src/plugins/platforms/windows/qwindowstheme.cpp index 40f9652cbd..32a65109af 100644 --- a/src/plugins/platforms/windows/qwindowstheme.cpp +++ b/src/plugins/platforms/windows/qwindowstheme.cpp @@ -164,7 +164,7 @@ public: QMutexLocker readyLocker(&m_readyMutex); while (!m_cancelled.loadRelaxed()) { if (!m_params && !m_cancelled.loadRelaxed() - && !m_readyCondition.wait(&m_readyMutex, 1000)) + && !m_readyCondition.wait(&m_readyMutex, QDeadlineTimer(1000ll))) continue; if (m_params) { @@ -189,7 +189,7 @@ public: CoUninitialize(); } - bool runWithParams(QShGetFileInfoParams *params, unsigned long timeOutMSecs) + bool runWithParams(QShGetFileInfoParams *params, qint64 timeOutMSecs) { QMutexLocker doneLocker(&m_doneMutex); @@ -198,7 +198,7 @@ public: m_readyCondition.wakeAll(); m_readyMutex.unlock(); - return m_doneCondition.wait(&m_doneMutex, timeOutMSecs); + return m_doneCondition.wait(&m_doneMutex, QDeadlineTimer(timeOutMSecs)); } void cancel() @@ -220,7 +220,7 @@ private: static bool shGetFileInfoBackground(const QString &fileName, DWORD attributes, SHFILEINFO *info, UINT flags, - unsigned long timeOutMSecs = 5000) + qint64 timeOutMSecs = 5000) { static QShGetFileInfoThread *getFileInfoThread = nullptr; if (!getFileInfoThread) { -- cgit v1.2.3