Windows: Add debug output for message WM_DPICHANGED

Add it to the name lookup and add verbose formatting
to the debug operator.

Task-number: QTBUG-73014
Change-Id: I31ee31bc28ef563fdbc0adedcea03546ced5faad
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
This commit is contained in:
Friedemann Kleint 2019-05-06 09:47:19 +02:00
parent 95fa35fc72
commit a1516c3b93

View File

@ -48,6 +48,7 @@
#include "qmutex.h"
#include <private/qthread_p.h>
#endif
#include "qtextstream.h"
#include <ctype.h>
#include <qt_windows.h>
@ -480,6 +481,7 @@ static const char *findWMstr(uint msg)
{ 0x02DD, "WM_TABLET_FIRST + 29" },
{ 0x02DE, "WM_TABLET_FIRST + 30" },
{ 0x02DF, "WM_TABLET_LAST" },
{ 0x02E0, "WM_DPICHANGED" },
{ 0x0300, "WM_CUT" },
{ 0x0301, "WM_COPY" },
{ 0x0302, "WM_PASTE" },
@ -765,6 +767,13 @@ QString decodeMSG(const MSG& msg)
case WM_DESTROY:
parameters = QLatin1String("Destroy hwnd ") + hwndS;
break;
case 0x02E0u: { // WM_DPICHANGED
auto rect = reinterpret_cast<const RECT *>(lParam);
QTextStream(&parameters) << "DPI: " << HIWORD(wParam) << ','
<< LOWORD(wParam) << ' ' << (rect->right - rect->left) << 'x'
<< (rect->bottom - rect->top) << forcesign << rect->left << rect->top;
}
break;
case WM_IME_NOTIFY:
{
parameters = QLatin1String("Command(");