Windows QPA: fix debug message

Before applying this patch, the debug message will contain new lines
which will look rather weired, this patch fixes that.

Amends commit 5e0d9a077d28802988182319ae257e9102f0344e

Change-Id: I2420c04dd7e18a6556664a05ac4ef35c9b652f0c
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
This commit is contained in:
Yuhang Zhao 2023-01-25 08:37:21 +08:00
parent ad7227ada1
commit c53c292c1b

View File

@ -410,27 +410,28 @@ QtWindows::DpiAwareness QWindowsContext::processDpiAwareness()
QDebug operator<<(QDebug d, QtWindows::DpiAwareness dpiAwareness)
{
const QDebugStateSaver saver(d);
d.nospace().noquote() << "QtWindows::DpiAwareness::";
QString message = u"QtWindows::DpiAwareness::"_s;
switch (dpiAwareness) {
case QtWindows::DpiAwareness::Invalid:
d.nospace().noquote() << "Invalid";
message += u"Invalid"_s;
break;
case QtWindows::DpiAwareness::Unaware:
d.nospace().noquote() << "Unaware";
message += u"Unaware"_s;
break;
case QtWindows::DpiAwareness::System:
d.nospace().noquote() << "System";
message += u"System"_s;
break;
case QtWindows::DpiAwareness::PerMonitor:
d.nospace().noquote() << "PerMonitor";
message += u"PerMonitor"_s;
break;
case QtWindows::DpiAwareness::PerMonitorVersion2:
d.nospace().noquote() << "PerMonitorVersion2";
message += u"PerMonitorVersion2"_s;
break;
case QtWindows::DpiAwareness::Unaware_GdiScaled:
d.nospace().noquote() << "Unaware_GdiScaled";
message += u"Unaware_GdiScaled"_s;
break;
}
d.nospace().noquote() << message;
return d;
}
#endif