Windows: Silence warnings about BitBlt() failing.
After showing the lock screen, spurious warnings about BitBlt() failing occur with last error set to ERROR_SUCCESS or ERROR_INVALID_HANDLE. Task-number: QTBUG-35926 Task-number: QTBUG-29716 Change-Id: I3e899cdf1ae60e76d13b81caec43716ad7c9725d Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
This commit is contained in:
parent
1949a8c003
commit
1cf5cd34f7
@ -117,8 +117,11 @@ void QWindowsBackingStore::flush(QWindow *window, const QRegion ®ion,
|
||||
}
|
||||
|
||||
if (!BitBlt(dc, br.x(), br.y(), br.width(), br.height(),
|
||||
m_image->hdc(), br.x() + offset.x(), br.y() + offset.y(), SRCCOPY))
|
||||
qErrnoWarning("%s: BitBlt failed", __FUNCTION__);
|
||||
m_image->hdc(), br.x() + offset.x(), br.y() + offset.y(), SRCCOPY)) {
|
||||
const DWORD lastError = GetLastError(); // QTBUG-35926, QTBUG-29716: may fail after lock screen.
|
||||
if (lastError != ERROR_SUCCESS && lastError != ERROR_INVALID_HANDLE)
|
||||
qErrnoWarning(lastError, "%s: BitBlt failed", __FUNCTION__);
|
||||
}
|
||||
rw->releaseDC();
|
||||
#ifndef Q_OS_WINCE
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user