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 <oliver.wolff@qt.io>
This commit is contained in:
parent
c355602595
commit
8bc4ea1e97
@ -164,7 +164,7 @@ public:
|
|||||||
QMutexLocker readyLocker(&m_readyMutex);
|
QMutexLocker readyLocker(&m_readyMutex);
|
||||||
while (!m_cancelled.loadRelaxed()) {
|
while (!m_cancelled.loadRelaxed()) {
|
||||||
if (!m_params && !m_cancelled.loadRelaxed()
|
if (!m_params && !m_cancelled.loadRelaxed()
|
||||||
&& !m_readyCondition.wait(&m_readyMutex, 1000))
|
&& !m_readyCondition.wait(&m_readyMutex, QDeadlineTimer(1000ll)))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (m_params) {
|
if (m_params) {
|
||||||
@ -189,7 +189,7 @@ public:
|
|||||||
CoUninitialize();
|
CoUninitialize();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool runWithParams(QShGetFileInfoParams *params, unsigned long timeOutMSecs)
|
bool runWithParams(QShGetFileInfoParams *params, qint64 timeOutMSecs)
|
||||||
{
|
{
|
||||||
QMutexLocker doneLocker(&m_doneMutex);
|
QMutexLocker doneLocker(&m_doneMutex);
|
||||||
|
|
||||||
@ -198,7 +198,7 @@ public:
|
|||||||
m_readyCondition.wakeAll();
|
m_readyCondition.wakeAll();
|
||||||
m_readyMutex.unlock();
|
m_readyMutex.unlock();
|
||||||
|
|
||||||
return m_doneCondition.wait(&m_doneMutex, timeOutMSecs);
|
return m_doneCondition.wait(&m_doneMutex, QDeadlineTimer(timeOutMSecs));
|
||||||
}
|
}
|
||||||
|
|
||||||
void cancel()
|
void cancel()
|
||||||
@ -220,7 +220,7 @@ private:
|
|||||||
|
|
||||||
static bool shGetFileInfoBackground(const QString &fileName, DWORD attributes,
|
static bool shGetFileInfoBackground(const QString &fileName, DWORD attributes,
|
||||||
SHFILEINFO *info, UINT flags,
|
SHFILEINFO *info, UINT flags,
|
||||||
unsigned long timeOutMSecs = 5000)
|
qint64 timeOutMSecs = 5000)
|
||||||
{
|
{
|
||||||
static QShGetFileInfoThread *getFileInfoThread = nullptr;
|
static QShGetFileInfoThread *getFileInfoThread = nullptr;
|
||||||
if (!getFileInfoThread) {
|
if (!getFileInfoThread) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user