Check for correct "Access Denied" error
SetProcessDpiAwarenessContext() returns ERROR_ACCESS_DENIED if the DPI awareness has already been set, and not E_ACCESSDENIED like SetProcessDpiAwareness() does. Pick-to: 6.2 Change-Id: I6b29214773776f31c0622a35494d98c5c9637b0b Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>bb10
parent
80de516565
commit
7b14329d78
|
|
@ -510,9 +510,9 @@ void QWindowsContext::setProcessDpiV2Awareness()
|
|||
QWindowsContextPrivate::m_v2DpiAware = true;
|
||||
} else {
|
||||
const HRESULT errorCode = GetLastError();
|
||||
// E_ACCESSDENIED means set externally (MSVC manifest or external app loading Qt plugin).
|
||||
// ERROR_ACCESS_DENIED means set externally (MSVC manifest or external app loading Qt plugin).
|
||||
// Silence warning in that case unless debug is enabled.
|
||||
if (errorCode != E_ACCESSDENIED || lcQpaWindows().isDebugEnabled()) {
|
||||
if (errorCode != ERROR_ACCESS_DENIED || lcQpaWindows().isDebugEnabled()) {
|
||||
qWarning().noquote().nospace() << "setProcessDpiAwarenessContext(DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2) failed: "
|
||||
<< QWindowsContext::comErrorString(errorCode);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue