QtBase  v6.3.1
qcoreapplication_win.cpp
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** Copyright (C) 2013 Samuel Gaist <samuel.gaist@edeltech.ch>
4 ** Copyright (C) 2016 The Qt Company Ltd.
5 ** Contact: https://www.qt.io/licensing/
6 **
7 ** This file is part of the QtCore module of the Qt Toolkit.
8 **
9 ** $QT_BEGIN_LICENSE:LGPL$
10 ** Commercial License Usage
11 ** Licensees holding valid commercial Qt licenses may use this file in
12 ** accordance with the commercial license agreement provided with the
13 ** Software or, alternatively, in accordance with the terms contained in
14 ** a written agreement between you and The Qt Company. For licensing terms
15 ** and conditions see https://www.qt.io/terms-conditions. For further
16 ** information use the contact form at https://www.qt.io/contact-us.
17 **
18 ** GNU Lesser General Public License Usage
19 ** Alternatively, this file may be used under the terms of the GNU Lesser
20 ** General Public License version 3 as published by the Free Software
21 ** Foundation and appearing in the file LICENSE.LGPL3 included in the
22 ** packaging of this file. Please review the following information to
23 ** ensure the GNU Lesser General Public License version 3 requirements
24 ** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
25 **
26 ** GNU General Public License Usage
27 ** Alternatively, this file may be used under the terms of the GNU
28 ** General Public License version 2.0 or (at your option) the GNU General
29 ** Public license version 3 or any later version approved by the KDE Free
30 ** Qt Foundation. The licenses are as published by the Free Software
31 ** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
32 ** included in the packaging of this file. Please review the following
33 ** information to ensure the GNU General Public License requirements will
34 ** be met: https://www.gnu.org/licenses/gpl-2.0.html and
35 ** https://www.gnu.org/licenses/gpl-3.0.html.
36 **
37 ** $QT_END_LICENSE$
38 **
39 ****************************************************************************/
40 
41 #include "qcoreapplication.h"
42 #include "qcoreapplication_p.h"
43 #include "qstringlist.h"
44 #include "qfileinfo.h"
45 #include "qcorecmdlineargs_p.h"
46 #ifndef QT_NO_QOBJECT
47 #include "qmutex.h"
48 #include <private/qthread_p.h>
49 #include <private/qlocking_p.h>
50 #endif
51 #include "qtextstream.h"
52 #include <ctype.h>
53 #include <qt_windows.h>
54 
56 
57 Q_CORE_EXPORT QString qAppFileName() // get application file name
58 {
59  /*
60  GetModuleFileName() returns the length of the module name, when it has
61  space to store it and 0-terminate; this return is necessarily smaller than
62  the buffer size, as it doesn't include the terminator. When it lacks
63  space, the function returns the full size of the buffer and fills the
64  buffer, truncating the full path to make it fit. We have reports that
65  GetModuleFileName sometimes doesn't set the error number to
66  ERROR_INSUFFICIENT_BUFFER, as claimed by the MSDN documentation; so we
67  only trust the answer when the return is actually less than the buffer
68  size we pass in. (When truncating, except on XP, it does so by enough to
69  still have space to 0-terminate; in either case, it fills the claimed
70  space and returns the size of the space. While XP might thus give us the
71  full name, without a 0 terminator, and return its actual length, we can
72  never be sure that's what's happened until a later call with bigger buffer
73  confirms it by returning less than its buffer size.)
74  */
75  // Full path may be longer than MAX_PATH - expand until we have enough space:
77  DWORD v;
78  size_t size = 1;
79  do {
80  size += MAX_PATH;
81  space.resize(int(size));
82  v = GetModuleFileName(NULL, space.data(), DWORD(space.size()));
83  } while (Q_UNLIKELY(v >= size));
84 
85  return QString::fromWCharArray(space.data(), v);
86 }
87 
89 {
90  return QFileInfo(qAppFileName()).baseName();
91 }
92 
94 {
95  QString applicationVersion;
96 #ifndef QT_BOOTSTRAPPED
97  const QString appFileName = qAppFileName();
98  QVarLengthArray<wchar_t> buffer(appFileName.size() + 1);
99  buffer[appFileName.toWCharArray(buffer.data())] = 0;
100 
101  DWORD versionInfoSize = GetFileVersionInfoSize(buffer.data(), nullptr);
102  if (versionInfoSize) {
103  QVarLengthArray<BYTE> info(static_cast<int>(versionInfoSize));
104  if (GetFileVersionInfo(buffer.data(), 0, versionInfoSize, info.data())) {
105  UINT size;
106  DWORD *fi;
107 
108  if (VerQueryValue(info.data(), __TEXT("\\"),
109  reinterpret_cast<void **>(&fi), &size) && size) {
110  const VS_FIXEDFILEINFO *verInfo = reinterpret_cast<const VS_FIXEDFILEINFO *>(fi);
111  applicationVersion = QStringLiteral("%1.%2.%3.%4")
112  .arg(HIWORD(verInfo->dwProductVersionMS))
113  .arg(LOWORD(verInfo->dwProductVersionMS))
114  .arg(HIWORD(verInfo->dwProductVersionLS))
115  .arg(LOWORD(verInfo->dwProductVersionLS));
116  }
117  }
118  }
119 #endif
120  return applicationVersion;
121 }
122 
123 #ifndef QT_NO_QOBJECT
124 
125 #if defined(Q_OS_WIN) && !defined(QT_NO_DEBUG_STREAM)
126 /*****************************************************************************
127  Convenience functions for convert WM_* messages into human readable strings,
128  including a nifty QDebug operator<< for simple QDebug() << msg output.
129  *****************************************************************************/
131 #include <windowsx.h>
132 #include "qdebug.h"
134 
135 #if !defined(GET_X_LPARAM)
136 # define GET_X_LPARAM(lp) ((int)(short)LOWORD(lp))
137 # define GET_Y_LPARAM(lp) ((int)(short)HIWORD(lp))
138 #endif
139 
140 // The values below should never change. Note that none of the usual
141 // WM_...FIRST & WM_...LAST values are in the list, as they normally have other
142 // WM_... representations
143 
144 template <class IntType>
145 struct QWinMessageMapping {
146  IntType value;
147  const char *name;
148 };
149 
150 #define FLAG_ENTRY(x) {x, #x} // for populating arrays
151 
152 // Looks up a value in a list of QWinMessageMapping
153 template <class IntType>
154 static const char *findWinMessageMapping(const QWinMessageMapping<IntType> *haystack,
155  size_t haystackSize,
156  IntType needle)
157 {
158  for (auto p = haystack, end = haystack + haystackSize; p < end; ++p) {
159  if (p->value == needle)
160  return p->name;
161  }
162  return nullptr;
163 }
164 
165 // Format flags using a mapping as "Flag1 | Flag2"...
166 template <class IntType>
167 static QString flagsValue(const QWinMessageMapping<IntType> *haystack,
168  size_t haystackSize, IntType value)
169 {
170  QString result;
171  for (auto p = haystack, end = haystack + haystackSize; p < end; ++p) {
172  if ((p->value & value) == p->value) {
173  if (!result.isEmpty())
174  result += QLatin1String(" | ");
175  result += QLatin1String(p->name);
176  }
177  }
178  return result;
179 }
180 
181 // Looks up the WM_ message in the table inside
182 static const char *findWMstr(uint msg)
183 {
184  static const QWinMessageMapping<uint> knownWM[] =
185 {{ 0x0000, "WM_NULL" },
186  { 0x0001, "WM_CREATE" },
187  { 0x0002, "WM_DESTROY" },
188  { 0x0003, "WM_MOVE" },
189  { 0x0005, "WM_SIZE" },
190  { 0x0006, "WM_ACTIVATE" },
191  { 0x0007, "WM_SETFOCUS" },
192  { 0x0008, "WM_KILLFOCUS" },
193  { 0x000A, "WM_ENABLE" },
194  { 0x000B, "WM_SETREDRAW" },
195  { 0x000C, "WM_SETTEXT" },
196  { 0x000D, "WM_GETTEXT" },
197  { 0x000E, "WM_GETTEXTLENGTH" },
198  { 0x000F, "WM_PAINT" },
199  { 0x0010, "WM_CLOSE" },
200  { 0x0011, "WM_QUERYENDSESSION" },
201  { 0x0013, "WM_QUERYOPEN" },
202  { 0x0016, "WM_ENDSESSION" },
203  { 0x0012, "WM_QUIT" },
204  { 0x0014, "WM_ERASEBKGND" },
205  { 0x0015, "WM_SYSCOLORCHANGE" },
206  { 0x0018, "WM_SHOWWINDOW" },
207  { 0x001A, "WM_WININICHANGE" },
208  { 0x001B, "WM_DEVMODECHANGE" },
209  { 0x001C, "WM_ACTIVATEAPP" },
210  { 0x001D, "WM_FONTCHANGE" },
211  { 0x001E, "WM_TIMECHANGE" },
212  { 0x001F, "WM_CANCELMODE" },
213  { 0x0020, "WM_SETCURSOR" },
214  { 0x0021, "WM_MOUSEACTIVATE" },
215  { 0x0022, "WM_CHILDACTIVATE" },
216  { 0x0023, "WM_QUEUESYNC" },
217  { 0x0024, "WM_GETMINMAXINFO" },
218  { 0x0026, "WM_PAINTICON" },
219  { 0x0027, "WM_ICONERASEBKGND" },
220  { 0x0028, "WM_NEXTDLGCTL" },
221  { 0x002A, "WM_SPOOLERSTATUS" },
222  { 0x002B, "WM_DRAWITEM" },
223  { 0x002C, "WM_MEASUREITEM" },
224  { 0x002D, "WM_DELETEITEM" },
225  { 0x002E, "WM_VKEYTOITEM" },
226  { 0x002F, "WM_CHARTOITEM" },
227  { 0x0030, "WM_SETFONT" },
228  { 0x0031, "WM_GETFONT" },
229  { 0x0032, "WM_SETHOTKEY" },
230  { 0x0033, "WM_GETHOTKEY" },
231  { 0x0037, "WM_QUERYDRAGICON" },
232  { 0x0039, "WM_COMPAREITEM" },
233  { 0x003D, "WM_GETOBJECT" },
234  { 0x0041, "WM_COMPACTING" },
235  { 0x0044, "WM_COMMNOTIFY" },
236  { 0x0046, "WM_WINDOWPOSCHANGING" },
237  { 0x0047, "WM_WINDOWPOSCHANGED" },
238  { 0x0048, "WM_POWER" },
239  { 0x004A, "WM_COPYDATA" },
240  { 0x004B, "WM_CANCELJOURNAL" },
241  { 0x004E, "WM_NOTIFY" },
242  { 0x0050, "WM_INPUTLANGCHANGEREQUEST" },
243  { 0x0051, "WM_INPUTLANGCHANGE" },
244  { 0x0052, "WM_TCARD" },
245  { 0x0053, "WM_HELP" },
246  { 0x0054, "WM_USERCHANGED" },
247  { 0x0055, "WM_NOTIFYFORMAT" },
248  { 0x007B, "WM_CONTEXTMENU" },
249  { 0x007C, "WM_STYLECHANGING" },
250  { 0x007D, "WM_STYLECHANGED" },
251  { 0x007E, "WM_DISPLAYCHANGE" },
252  { 0x007F, "WM_GETICON" },
253  { 0x0080, "WM_SETICON" },
254  { 0x0081, "WM_NCCREATE" },
255  { 0x0082, "WM_NCDESTROY" },
256  { 0x0083, "WM_NCCALCSIZE" },
257  { 0x0084, "WM_NCHITTEST" },
258  { 0x0085, "WM_NCPAINT" },
259  { 0x0086, "WM_NCACTIVATE" },
260  { 0x0087, "WM_GETDLGCODE" },
261  { 0x0088, "WM_SYNCPAINT" },
262  { 0x00A0, "WM_NCMOUSEMOVE" },
263  { 0x00A1, "WM_NCLBUTTONDOWN" },
264  { 0x00A2, "WM_NCLBUTTONUP" },
265  { 0x00A3, "WM_NCLBUTTONDBLCLK" },
266  { 0x00A4, "WM_NCRBUTTONDOWN" },
267  { 0x00A5, "WM_NCRBUTTONUP" },
268  { 0x00A6, "WM_NCRBUTTONDBLCLK" },
269  { 0x00A7, "WM_NCMBUTTONDOWN" },
270  { 0x00A8, "WM_NCMBUTTONUP" },
271  { 0x00A9, "WM_NCMBUTTONDBLCLK" },
272  { 0x00AB, "WM_NCXBUTTONDOWN" },
273  { 0x00AC, "WM_NCXBUTTONUP" },
274  { 0x00AD, "WM_NCXBUTTONDBLCLK" },
275  { 0x00FF, "WM_INPUT" },
276  { 0x0100, "WM_KEYDOWN" },
277  { 0x0101, "WM_KEYUP" },
278  { 0x0102, "WM_CHAR" },
279  { 0x0103, "WM_DEADCHAR" },
280  { 0x0104, "WM_SYSKEYDOWN" },
281  { 0x0105, "WM_SYSKEYUP" },
282  { 0x0106, "WM_SYSCHAR" },
283  { 0x0107, "WM_SYSDEADCHAR" },
284  { 0x0109, "WM_UNICHAR" },
285  { 0x010D, "WM_IME_STARTCOMPOSITION" },
286  { 0x010E, "WM_IME_ENDCOMPOSITION" },
287  { 0x010F, "WM_IME_COMPOSITION" },
288  { 0x0110, "WM_INITDIALOG" },
289  { 0x0111, "WM_COMMAND" },
290  { 0x0112, "WM_SYSCOMMAND" },
291  { 0x0113, "WM_TIMER" },
292  { 0x0114, "WM_HSCROLL" },
293  { 0x0115, "WM_VSCROLL" },
294  { 0x0116, "WM_INITMENU" },
295  { 0x0117, "WM_INITMENUPOPUP" },
296  { 0x011F, "WM_MENUSELECT" },
297  { 0x0120, "WM_MENUCHAR" },
298  { 0x0121, "WM_ENTERIDLE" },
299  { 0x0122, "WM_MENURBUTTONUP" },
300  { 0x0123, "WM_MENUDRAG" },
301  { 0x0124, "WM_MENUGETOBJECT" },
302  { 0x0125, "WM_UNINITMENUPOPUP" },
303  { 0x0126, "WM_MENUCOMMAND" },
304  { 0x0127, "WM_CHANGEUISTATE" },
305  { 0x0128, "WM_UPDATEUISTATE" },
306  { 0x0129, "WM_QUERYUISTATE" },
307  { 0x0132, "WM_CTLCOLORMSGBOX" },
308  { 0x0133, "WM_CTLCOLOREDIT" },
309  { 0x0134, "WM_CTLCOLORLISTBOX" },
310  { 0x0135, "WM_CTLCOLORBTN" },
311  { 0x0136, "WM_CTLCOLORDLG" },
312  { 0x0137, "WM_CTLCOLORSCROLLBAR" },
313  { 0x0138, "WM_CTLCOLORSTATIC" },
314  { 0x0200, "WM_MOUSEMOVE" },
315  { 0x0201, "WM_LBUTTONDOWN" },
316  { 0x0202, "WM_LBUTTONUP" },
317  { 0x0203, "WM_LBUTTONDBLCLK" },
318  { 0x0204, "WM_RBUTTONDOWN" },
319  { 0x0205, "WM_RBUTTONUP" },
320  { 0x0206, "WM_RBUTTONDBLCLK" },
321  { 0x0207, "WM_MBUTTONDOWN" },
322  { 0x0208, "WM_MBUTTONUP" },
323  { 0x0209, "WM_MBUTTONDBLCLK" },
324  { 0x020A, "WM_MOUSEWHEEL" },
325  { 0x020B, "WM_XBUTTONDOWN" },
326  { 0x020C, "WM_XBUTTONUP" },
327  { 0x020D, "WM_XBUTTONDBLCLK" },
328  { 0x020E, "WM_MOUSEHWHEEL" },
329  { 0x0210, "WM_PARENTNOTIFY" },
330  { 0x0211, "WM_ENTERMENULOOP" },
331  { 0x0212, "WM_EXITMENULOOP" },
332  { 0x0213, "WM_NEXTMENU" },
333  { 0x0214, "WM_SIZING" },
334  { 0x0215, "WM_CAPTURECHANGED" },
335  { 0x0216, "WM_MOVING" },
336  { 0x0218, "WM_POWERBROADCAST" },
337  { 0x0219, "WM_DEVICECHANGE" },
338  { 0x0220, "WM_MDICREATE" },
339  { 0x0221, "WM_MDIDESTROY" },
340  { 0x0222, "WM_MDIACTIVATE" },
341  { 0x0223, "WM_MDIRESTORE" },
342  { 0x0224, "WM_MDINEXT" },
343  { 0x0225, "WM_MDIMAXIMIZE" },
344  { 0x0226, "WM_MDITILE" },
345  { 0x0227, "WM_MDICASCADE" },
346  { 0x0228, "WM_MDIICONARRANGE" },
347  { 0x0229, "WM_MDIGETACTIVE" },
348  { 0x0230, "WM_MDISETMENU" },
349  { 0x0231, "WM_ENTERSIZEMOVE" },
350  { 0x0232, "WM_EXITSIZEMOVE" },
351  { 0x0233, "WM_DROPFILES" },
352  { 0x0234, "WM_MDIREFRESHMENU" },
353  { 0x0241, "WM_NCPOINTERUPDATE"},
354  { 0x0242, "WM_NCPOINTERDOWN"},
355  { 0x0243, "WM_NCPOINTERUP"},
356  { 0x0245, "WM_POINTERUPDATE"},
357  { 0x0246, "WM_POINTERDOWN"},
358  { 0x0247, "WM_POINTERUP"},
359  { 0x0249, "WM_POINTERENTER"},
360  { 0x024A, "WM_POINTERLEAVE"},
361  { 0x0248, "WM_POINTERACTIVATE"},
362  { 0x024C, "WM_POINTERCAPTURECHANGED"},
363  { 0x024D, "WM_TOUCHHITTESTING"},
364  { 0x024E, "WM_POINTERWHEEL"},
365  { 0x024F, "WM_POINTERHWHEEL"},
366  { 0x0250, "DM_POINTERHITTEST"},
367  { 0x0251, "WM_POINTERROUTEDTO"},
368  { 0x0252, "WM_POINTERROUTEDAWAY"},
369  { 0x0253, "WM_POINTERROUTEDRELEASED"},
370  { 0x0281, "WM_IME_SETCONTEXT" },
371  { 0x0282, "WM_IME_NOTIFY" },
372  { 0x0283, "WM_IME_CONTROL" },
373  { 0x0284, "WM_IME_COMPOSITIONFULL" },
374  { 0x0285, "WM_IME_SELECT" },
375  { 0x0286, "WM_IME_CHAR" },
376  { 0x0288, "WM_IME_REQUEST" },
377  { 0x0290, "WM_IME_KEYDOWN" },
378  { 0x0291, "WM_IME_KEYUP" },
379  { 0x02A0, "WM_NCMOUSEHOVER" },
380  { 0x02A1, "WM_MOUSEHOVER" },
381  { 0x02A2, "WM_NCMOUSELEAVE" },
382  { 0x02A3, "WM_MOUSELEAVE" },
383  { 0x02B1, "WM_WTSSESSION_CHANGE" },
384  { 0x02C0, "WM_TABLET_FIRST" },
385  { 0x02C1, "WM_TABLET_FIRST + 1" },
386  { 0x02C2, "WM_TABLET_FIRST + 2" },
387  { 0x02C3, "WM_TABLET_FIRST + 3" },
388  { 0x02C4, "WM_TABLET_FIRST + 4" },
389  { 0x02C5, "WM_TABLET_FIRST + 5" },
390  { 0x02C6, "WM_TABLET_FIRST + 6" },
391  { 0x02C7, "WM_TABLET_FIRST + 7" },
392  { 0x02C8, "WM_TABLET_FIRST + 8" },
393  { 0x02C9, "WM_TABLET_FIRST + 9" },
394  { 0x02CA, "WM_TABLET_FIRST + 10" },
395  { 0x02CB, "WM_TABLET_FIRST + 11" },
396  { 0x02CC, "WM_TABLET_FIRST + 12" },
397  { 0x02CD, "WM_TABLET_FIRST + 13" },
398  { 0x02CE, "WM_TABLET_FIRST + 14" },
399  { 0x02CF, "WM_TABLET_FIRST + 15" },
400  { 0x02D0, "WM_TABLET_FIRST + 16" },
401  { 0x02D1, "WM_TABLET_FIRST + 17" },
402  { 0x02D2, "WM_TABLET_FIRST + 18" },
403  { 0x02D3, "WM_TABLET_FIRST + 19" },
404  { 0x02D4, "WM_TABLET_FIRST + 20" },
405  { 0x02D5, "WM_TABLET_FIRST + 21" },
406  { 0x02D6, "WM_TABLET_FIRST + 22" },
407  { 0x02D7, "WM_TABLET_FIRST + 23" },
408  { 0x02D8, "WM_TABLET_FIRST + 24" },
409  { 0x02D9, "WM_TABLET_FIRST + 25" },
410  { 0x02DA, "WM_TABLET_FIRST + 26" },
411  { 0x02DB, "WM_TABLET_FIRST + 27" },
412  { 0x02DC, "WM_TABLET_FIRST + 28" },
413  { 0x02DD, "WM_TABLET_FIRST + 29" },
414  { 0x02DE, "WM_TABLET_FIRST + 30" },
415  { 0x02DF, "WM_TABLET_LAST" },
416  { 0x02E0, "WM_DPICHANGED" },
417  { 0x0300, "WM_CUT" },
418  { 0x0301, "WM_COPY" },
419  { 0x0302, "WM_PASTE" },
420  { 0x0303, "WM_CLEAR" },
421  { 0x0304, "WM_UNDO" },
422  { 0x0305, "WM_RENDERFORMAT" },
423  { 0x0306, "WM_RENDERALLFORMATS" },
424  { 0x0307, "WM_DESTROYCLIPBOARD" },
425  { 0x0308, "WM_DRAWCLIPBOARD" },
426  { 0x0309, "WM_PAINTCLIPBOARD" },
427  { 0x030A, "WM_VSCROLLCLIPBOARD" },
428  { 0x030B, "WM_SIZECLIPBOARD" },
429  { 0x030C, "WM_ASKCBFORMATNAME" },
430  { 0x030D, "WM_CHANGECBCHAIN" },
431  { 0x030E, "WM_HSCROLLCLIPBOARD" },
432  { 0x030F, "WM_QUERYNEWPALETTE" },
433  { 0x0310, "WM_PALETTEISCHANGING" },
434  { 0x0311, "WM_PALETTECHANGED" },
435  { 0x0312, "WM_HOTKEY" },
436  { 0x0317, "WM_PRINT" },
437  { 0x0318, "WM_PRINTCLIENT" },
438  { 0x0319, "WM_APPCOMMAND" },
439  { 0x031A, "WM_THEMECHANGED" },
440  { 0x0358, "WM_HANDHELDFIRST" },
441  { 0x0359, "WM_HANDHELDFIRST + 1" },
442  { 0x035A, "WM_HANDHELDFIRST + 2" },
443  { 0x035B, "WM_HANDHELDFIRST + 3" },
444  { 0x035C, "WM_HANDHELDFIRST + 4" },
445  { 0x035D, "WM_HANDHELDFIRST + 5" },
446  { 0x035E, "WM_HANDHELDFIRST + 6" },
447  { 0x035F, "WM_HANDHELDLAST" },
448  { 0x0360, "WM_AFXFIRST" },
449  { 0x0361, "WM_AFXFIRST + 1" },
450  { 0x0362, "WM_AFXFIRST + 2" },
451  { 0x0363, "WM_AFXFIRST + 3" },
452  { 0x0364, "WM_AFXFIRST + 4" },
453  { 0x0365, "WM_AFXFIRST + 5" },
454  { 0x0366, "WM_AFXFIRST + 6" },
455  { 0x0367, "WM_AFXFIRST + 7" },
456  { 0x0368, "WM_AFXFIRST + 8" },
457  { 0x0369, "WM_AFXFIRST + 9" },
458  { 0x036A, "WM_AFXFIRST + 10" },
459  { 0x036B, "WM_AFXFIRST + 11" },
460  { 0x036C, "WM_AFXFIRST + 12" },
461  { 0x036D, "WM_AFXFIRST + 13" },
462  { 0x036E, "WM_AFXFIRST + 14" },
463  { 0x036F, "WM_AFXFIRST + 15" },
464  { 0x0370, "WM_AFXFIRST + 16" },
465  { 0x0371, "WM_AFXFIRST + 17" },
466  { 0x0372, "WM_AFXFIRST + 18" },
467  { 0x0373, "WM_AFXFIRST + 19" },
468  { 0x0374, "WM_AFXFIRST + 20" },
469  { 0x0375, "WM_AFXFIRST + 21" },
470  { 0x0376, "WM_AFXFIRST + 22" },
471  { 0x0377, "WM_AFXFIRST + 23" },
472  { 0x0378, "WM_AFXFIRST + 24" },
473  { 0x0379, "WM_AFXFIRST + 25" },
474  { 0x037A, "WM_AFXFIRST + 26" },
475  { 0x037B, "WM_AFXFIRST + 27" },
476  { 0x037C, "WM_AFXFIRST + 28" },
477  { 0x037D, "WM_AFXFIRST + 29" },
478  { 0x037E, "WM_AFXFIRST + 30" },
479  { 0x037F, "WM_AFXLAST" },
480  { 0x0380, "WM_PENWINFIRST" },
481  { 0x0381, "WM_PENWINFIRST + 1" },
482  { 0x0382, "WM_PENWINFIRST + 2" },
483  { 0x0383, "WM_PENWINFIRST + 3" },
484  { 0x0384, "WM_PENWINFIRST + 4" },
485  { 0x0385, "WM_PENWINFIRST + 5" },
486  { 0x0386, "WM_PENWINFIRST + 6" },
487  { 0x0387, "WM_PENWINFIRST + 7" },
488  { 0x0388, "WM_PENWINFIRST + 8" },
489  { 0x0389, "WM_PENWINFIRST + 9" },
490  { 0x038A, "WM_PENWINFIRST + 10" },
491  { 0x038B, "WM_PENWINFIRST + 11" },
492  { 0x038C, "WM_PENWINFIRST + 12" },
493  { 0x038D, "WM_PENWINFIRST + 13" },
494  { 0x038E, "WM_PENWINFIRST + 14" },
495  { 0x038F, "WM_PENWINLAST" },
496  { 0x0400, "WM_USER" },
497  { 0x8000, "WM_APP" }
498  };
499 
500  return findWinMessageMapping(knownWM, sizeof(knownWM) / sizeof(knownWM[0]), msg);
501 }
502 
503 static const char *activateParameter(uint p)
504 {
505  static const QWinMessageMapping<uint> activeEnum[] = {
506  {WA_ACTIVE, "Activate"}, {WA_INACTIVE, "Deactivate"},
507  {WA_CLICKACTIVE, "Activate by mouseclick"}
508  };
509 
510  return findWinMessageMapping(activeEnum, sizeof(activeEnum) / sizeof(activeEnum[0]), p);
511 }
512 
513 static QString styleFlags(uint style)
514 {
515  static const QWinMessageMapping<uint> styleFlags[] = {
516  FLAG_ENTRY(WS_BORDER), FLAG_ENTRY(WS_CAPTION), FLAG_ENTRY(WS_CHILD),
517  FLAG_ENTRY(WS_CLIPCHILDREN), FLAG_ENTRY(WS_CLIPSIBLINGS),
518  FLAG_ENTRY(WS_DISABLED), FLAG_ENTRY(WS_DLGFRAME), FLAG_ENTRY(WS_GROUP),
519  FLAG_ENTRY(WS_HSCROLL), FLAG_ENTRY(WS_OVERLAPPED),
520  FLAG_ENTRY(WS_OVERLAPPEDWINDOW), FLAG_ENTRY(WS_ICONIC),
521  FLAG_ENTRY(WS_MAXIMIZE), FLAG_ENTRY(WS_MAXIMIZEBOX),
522  FLAG_ENTRY(WS_MINIMIZE), FLAG_ENTRY(WS_MINIMIZEBOX),
523  FLAG_ENTRY(WS_OVERLAPPEDWINDOW), FLAG_ENTRY(WS_POPUP),
524  FLAG_ENTRY(WS_POPUPWINDOW), FLAG_ENTRY(WS_SIZEBOX),
525  FLAG_ENTRY(WS_SYSMENU), FLAG_ENTRY(WS_TABSTOP), FLAG_ENTRY(WS_THICKFRAME),
526  FLAG_ENTRY(WS_TILED), FLAG_ENTRY(WS_TILEDWINDOW), FLAG_ENTRY(WS_VISIBLE),
527  FLAG_ENTRY(WS_VSCROLL)
528  };
529 
530  return flagsValue(styleFlags, sizeof(styleFlags) / sizeof(styleFlags[0]), style);
531 }
532 
533 static QString exStyleFlags(uint exStyle)
534 {
535  static const QWinMessageMapping<uint> exStyleFlags[] = {
536  FLAG_ENTRY(WS_EX_ACCEPTFILES), FLAG_ENTRY(WS_EX_APPWINDOW),
537  FLAG_ENTRY(WS_EX_CLIENTEDGE), FLAG_ENTRY(WS_EX_DLGMODALFRAME),
538  FLAG_ENTRY(WS_EX_LEFT), FLAG_ENTRY(WS_EX_LEFTSCROLLBAR),
539  FLAG_ENTRY(WS_EX_LTRREADING), FLAG_ENTRY(WS_EX_MDICHILD),
540  FLAG_ENTRY(WS_EX_NOACTIVATE), FLAG_ENTRY(WS_EX_NOPARENTNOTIFY),
541  FLAG_ENTRY(WS_EX_OVERLAPPEDWINDOW), FLAG_ENTRY(WS_EX_PALETTEWINDOW),
542  FLAG_ENTRY(WS_EX_RIGHT), FLAG_ENTRY(WS_EX_RIGHTSCROLLBAR),
543  FLAG_ENTRY(WS_EX_RTLREADING), FLAG_ENTRY(WS_EX_STATICEDGE),
544  FLAG_ENTRY(WS_EX_TOOLWINDOW), FLAG_ENTRY(WS_EX_TOPMOST),
545  FLAG_ENTRY(WS_EX_TRANSPARENT), FLAG_ENTRY(WS_EX_WINDOWEDGE)
546  };
547 
548  return flagsValue(exStyleFlags, sizeof(exStyleFlags) / sizeof(exStyleFlags[0]), exStyle);
549 }
550 
551 static const char *imeCommand(uint cmd)
552 {
553  static const QWinMessageMapping<uint> commands[] = {
554  FLAG_ENTRY(IMN_CHANGECANDIDATE), FLAG_ENTRY(IMN_CLOSECANDIDATE),
555  FLAG_ENTRY(IMN_CLOSESTATUSWINDOW), FLAG_ENTRY(IMN_GUIDELINE),
556  FLAG_ENTRY(IMN_OPENCANDIDATE), FLAG_ENTRY(IMN_OPENSTATUSWINDOW),
557  FLAG_ENTRY(IMN_SETCANDIDATEPOS), FLAG_ENTRY(IMN_SETCOMPOSITIONFONT),
558  FLAG_ENTRY(IMN_SETCOMPOSITIONWINDOW), FLAG_ENTRY(IMN_SETCONVERSIONMODE),
559  FLAG_ENTRY(IMN_SETOPENSTATUS), FLAG_ENTRY(IMN_SETSENTENCEMODE),
560  FLAG_ENTRY(IMN_SETSTATUSWINDOWPOS)
561  };
562 
563  return findWinMessageMapping(commands, sizeof(commands) / sizeof(commands[0]), cmd);
564 }
565 
566 static QString imeShowFlags(uint flags)
567 {
568  static const QWinMessageMapping<uint> showFlags[] = {
569  FLAG_ENTRY(ISC_SHOWUICOMPOSITIONWINDOW),
570  FLAG_ENTRY(ISC_SHOWUICANDIDATEWINDOW),
571  FLAG_ENTRY(ISC_SHOWUICANDIDATEWINDOW << 1),
572  FLAG_ENTRY(ISC_SHOWUICANDIDATEWINDOW << 2),
573  FLAG_ENTRY(ISC_SHOWUICANDIDATEWINDOW << 3)
574  };
575 
576  return flagsValue(showFlags, sizeof(showFlags) / sizeof(showFlags[0]), flags);
577 }
578 
579 static const char *wmSizeParam(uint p)
580 {
581  static const QWinMessageMapping<uint> sizeParams[] = {
582  FLAG_ENTRY(SIZE_MAXHIDE), FLAG_ENTRY(SIZE_MAXIMIZED),
583  FLAG_ENTRY(SIZE_MAXSHOW), FLAG_ENTRY(SIZE_MINIMIZED),
584  FLAG_ENTRY(SIZE_RESTORED)
585  };
586 
587  return findWinMessageMapping(sizeParams, sizeof(sizeParams) / sizeof(sizeParams[0]), p);
588 }
589 
590 static QString virtualKeys(uint vk)
591 {
592  static const QWinMessageMapping<uint> keys[] = {
593  FLAG_ENTRY(MK_CONTROL), FLAG_ENTRY(MK_LBUTTON), FLAG_ENTRY(MK_MBUTTON),
594  FLAG_ENTRY(MK_RBUTTON), FLAG_ENTRY(MK_SHIFT), FLAG_ENTRY(MK_XBUTTON1),
595  FLAG_ENTRY(MK_XBUTTON2)
596  };
597 
598  return flagsValue(keys, sizeof(keys) / sizeof(keys[0]), vk);
599 }
600 
601 static QString winPosFlags(uint f)
602 {
603  static const QWinMessageMapping<uint> winPosValues[] = {
604  FLAG_ENTRY(SWP_DRAWFRAME), FLAG_ENTRY(SWP_FRAMECHANGED),
605  FLAG_ENTRY(SWP_HIDEWINDOW), FLAG_ENTRY(SWP_NOACTIVATE),
606  FLAG_ENTRY(SWP_NOCOPYBITS), FLAG_ENTRY(SWP_NOMOVE),
607  FLAG_ENTRY(SWP_NOOWNERZORDER), FLAG_ENTRY(SWP_NOREDRAW),
608  FLAG_ENTRY(SWP_NOREPOSITION), FLAG_ENTRY(SWP_NOSENDCHANGING),
609  FLAG_ENTRY(SWP_NOSIZE), FLAG_ENTRY(SWP_NOZORDER),
610  FLAG_ENTRY(SWP_SHOWWINDOW)
611  };
612 
613  return flagsValue(winPosValues, sizeof(winPosValues) / sizeof(winPosValues[0]), f);
614 }
615 
616 static const char *winPosInsertAfter(quintptr h)
617 {
618  static const QWinMessageMapping<quintptr> insertAfterValues[] = {
619  {quintptr(HWND_BOTTOM), "HWND_BOTTOM"},
620  {quintptr(HWND_NOTOPMOST), "HWND_NOTOPMOST"},
621  {quintptr(HWND_TOP), "HWND_TOP"},
622  {quintptr(HWND_TOPMOST), "HWND_TOPMOST"}
623  };
624  return findWinMessageMapping(insertAfterValues, sizeof(insertAfterValues) / sizeof(insertAfterValues[0]), h);
625 }
626 
627 static const char *sessionMgrLogOffOption(uint p)
628 {
629 #ifndef ENDSESSION_CLOSEAPP
630 #define ENDSESSION_CLOSEAPP 0x00000001
631 #endif
632 #ifndef ENDSESSION_CRITICAL
633 #define ENDSESSION_CRITICAL 0x40000000
634 #endif
635  static const QWinMessageMapping<uint> values[] = {
636  {ENDSESSION_CLOSEAPP, "Close application"},
637  {ENDSESSION_CRITICAL, "Force application end"},
638  {ENDSESSION_LOGOFF, "User logoff"}
639  };
640 
641  return findWinMessageMapping(values, sizeof(values) / sizeof(values[0]), p);
642 }
643 
644 // Returns a "human readable" string representation of the MSG and the
645 // information it points to
646 QString decodeMSG(const MSG& msg)
647 {
648  const WPARAM wParam = msg.wParam;
649  const LPARAM lParam = msg.lParam;
650 
652  // Custom WM_'s
653  if (msg.message > WM_APP)
654  message= QString::fromLatin1("WM_APP + %1").arg(msg.message - WM_APP);
655  else if (msg.message > WM_USER)
656  message = QString::fromLatin1("WM_USER + %1").arg(msg.message - WM_USER);
657  else if (const char *wmmsgC = findWMstr(msg.message))
658  message = QString::fromLatin1(wmmsgC);
659  else
660  message = QString::fromLatin1("WM_(0x%1)").arg(msg.message, 0, 16); // Unknown WM_, so use number
661 
662  // Yes, we want to give the WM_ names 20 chars of space before showing the
663  // decoded message, since some of the common messages are quite long, and
664  // we don't want the decoded information to vary in output position
665  if (message.size() < 20)
666  message.prepend(QString(20 - message.size(), QLatin1Char(' ')));
667  message += QLatin1String(": ");
668 
669  const QString hwndS = QString::asprintf("(%p)", reinterpret_cast<void *>(msg.hwnd));
670  const QString wParamS = QString::asprintf("(%p)", reinterpret_cast<void *>(wParam));
671  const QString lParamS = QString::asprintf("(%p)", reinterpret_cast<void *>(lParam));
672 
673  QString parameters;
674  switch (msg.message) {
675  case WM_ACTIVATE:
676  if (const char *a = activateParameter(uint(wParam)))
677  parameters += QLatin1String(a);
678  parameters += QLatin1String(" Hwnd ") + hwndS;
679  break;
680  case WM_CAPTURECHANGED:
681  parameters = QLatin1String("Hwnd gaining capture ") + hwndS;
682  break;
683  case WM_CREATE:
684  {
685  auto lpcs = reinterpret_cast<LPCREATESTRUCT>(lParam);
687  if (lpcs->lpszClass != nullptr) {
688  className = HIWORD(lpcs->lpszClass) == 0
689  ? QString::number(LOWORD(lpcs->lpszClass), 16) // Atom
690  : QString::fromWCharArray(lpcs->lpszClass);
691  }
692 
693  const QString windowName = lpcs->lpszName
694  ? QString::fromWCharArray(lpcs->lpszName) : QString();
695 
696  parameters = QString::asprintf("x,y(%4d,%4d) w,h(%4d,%4d) className(%s) windowName(%s) parent(0x%p) style(%s) exStyle(%s)",
697  lpcs->x, lpcs->y, lpcs->cx, lpcs->cy,
698  className.toLatin1().constData(),
699  windowName.toLatin1().constData(),
700  reinterpret_cast<void *>(lpcs->hwndParent),
701  styleFlags(uint(lpcs->style)).toLatin1().constData(),
702  exStyleFlags(lpcs->dwExStyle).toLatin1().constData());
703  }
704  break;
705  case WM_DESTROY:
706  parameters = QLatin1String("Destroy hwnd ") + hwndS;
707  break;
708  case 0x02E0u: { // WM_DPICHANGED
709  auto rect = reinterpret_cast<const RECT *>(lParam);
710  QTextStream(&parameters) << "DPI: " << HIWORD(wParam) << ','
711  << LOWORD(wParam) << ' ' << (rect->right - rect->left) << 'x'
712  << (rect->bottom - rect->top) << Qt::forcesign << rect->left << rect->top;
713  }
714  break;
715  case WM_IME_NOTIFY:
716  {
717  parameters = QLatin1String("Command(");
718  if (const char *c = imeCommand(uint(wParam)))
719  parameters += QLatin1String(c);
720  parameters += QLatin1String(" : ") + lParamS;
721  }
722  break;
723  case WM_IME_SETCONTEXT:
724  parameters = QLatin1String("Input context(")
725  + QLatin1String(wParam == TRUE ? "Active" : "Inactive")
726  + QLatin1String(") Show flags(")
727  + imeShowFlags(DWORD(lParam)) + QLatin1Char(')');
728  break;
729  case WM_KILLFOCUS:
730  parameters = QLatin1String("Hwnd gaining keyboard focus ") + wParamS;
731  break;
732  case WM_CHAR:
733  case WM_IME_CHAR:
734  case WM_KEYDOWN:
735  case WM_KEYUP:
736  {
737  const int nVirtKey = int(wParam);
738  const long lKeyData = long(lParam);
739  int repCount = (lKeyData & 0xffff); // Bit 0-15
740  int scanCode = (lKeyData & 0xf0000) >> 16; // Bit 16-23
741  bool contextCode = !!(lKeyData & 0x20000000); // Bit 29
742  bool prevState = !!(lKeyData & 0x40000000); // Bit 30
743  bool transState = !!(lKeyData & 0x80000000); // Bit 31
744  parameters = QString::asprintf("Virtual-key(0x%x) Scancode(%d) Rep(%d) Contextcode(%d), Prev state(%d), Trans state(%d)",
745  nVirtKey, scanCode, repCount,
746  contextCode, prevState, transState);
747  }
748  break;
749  case WM_INPUTLANGCHANGE:
750  parameters = QStringLiteral("Keyboard layout changed");
751  break;
752  case WM_NCACTIVATE:
753  parameters = (msg.wParam? QLatin1String("Active Titlebar") : QLatin1String("Inactive Titlebar"));
754  break;
755  case WM_MOUSEACTIVATE:
756  {
757  const char *mouseMsg = findWMstr(HIWORD(lParam));
758  parameters = QString::asprintf("TLW(0x%p) HittestCode(0x%x) MouseMsg(%s)",
759  reinterpret_cast<void *>(wParam),
760  LOWORD(lParam), mouseMsg ? mouseMsg : "");
761  }
762  break;
763  case WM_MOUSELEAVE:
764  break; // wParam & lParam not used
765  case WM_MOUSEHOVER:
766  case WM_MOUSEWHEEL:
767  case WM_MOUSEHWHEEL:
768  case WM_LBUTTONDBLCLK:
769  case WM_LBUTTONDOWN:
770  case WM_LBUTTONUP:
771  case WM_MBUTTONDBLCLK:
772  case WM_MBUTTONDOWN:
773  case WM_MBUTTONUP:
774  case WM_RBUTTONDBLCLK:
775  case WM_RBUTTONDOWN:
776  case WM_RBUTTONUP:
777  case WM_MOUSEMOVE:
778  parameters = QString::asprintf("x,y(%4d,%4d) Virtual Keys(",
779  GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam))
780  + virtualKeys(uint(wParam)) + QLatin1Char(')');
781  break;
782  case WM_MOVE:
783  parameters = QString::asprintf("x,y(%4d,%4d)", LOWORD(lParam), HIWORD(lParam));
784  break;
785  case WM_ERASEBKGND:
786  case WM_PAINT:
787  parameters = QLatin1String("hdc") + wParamS;
788  break;
789  case WM_QUERYNEWPALETTE:
790  break; // lParam & wParam are unused
791  case WM_SETCURSOR:
792  parameters = QString::asprintf("HitTestCode(0x%x) MouseMsg(", LOWORD(lParam));
793  if (const char *mouseMsg = findWMstr(HIWORD(lParam)))
794  parameters += QLatin1String(mouseMsg);
795  parameters += QLatin1Char(')');
796  break;
797  case WM_SETFOCUS:
798  parameters = QLatin1String("Lost Focus ") + wParamS;
799  break;
800  case WM_SETTEXT:
801  parameters = QLatin1String("Set Text (")
802  + QString::fromWCharArray(reinterpret_cast<const wchar_t *>(lParam))
803  + QLatin1Char(')');
804  break;
805  case WM_SIZE:
806  parameters = QString::asprintf("w,h(%4d,%4d) showmode(",
807  LOWORD(lParam), HIWORD(lParam));
808  if (const char *showMode = wmSizeParam(uint(wParam)))
809  parameters += QLatin1String(showMode);
810  parameters += QLatin1Char(')');
811  break;
812  case WM_WINDOWPOSCHANGED:
813  {
814  auto winPos = reinterpret_cast<LPWINDOWPOS>(lParam);
815  if (!winPos)
816  break;
817  const auto insertAfter = quintptr(winPos->hwndInsertAfter);
818  parameters = QString::asprintf("x,y(%4d,%4d) w,h(%4d,%4d) flags(%s) hwndAfter(",
819  winPos->x, winPos->y, winPos->cx, winPos->cy,
820  winPosFlags(winPos->flags).toLatin1().constData());
821  if (const char *h = winPosInsertAfter(insertAfter))
822  parameters += QLatin1String(h);
823  else
824  parameters += QString::number(insertAfter, 16);
825  parameters += QLatin1Char(')');
826  }
827  break;
828  case WM_QUERYENDSESSION:
829  parameters = QLatin1String("End session: ");
830  if (const char *logoffOption = sessionMgrLogOffOption(uint(wParam)))
831  parameters += QLatin1String(logoffOption);
832  break;
833  default:
834  parameters = QLatin1String("wParam") + wParamS + QLatin1String(" lParam") + lParamS;
835  break;
836  }
837 
838  return message + QLatin1String("hwnd") + hwndS + QLatin1Char(' ') + parameters;
839 }
840 
841 QDebug operator<<(QDebug dbg, const MSG &msg)
842 {
843  QDebugStateSaver saver(dbg);
844  dbg.noquote();
845  dbg.nospace();
846  dbg << decodeMSG(msg);
847  return dbg;
848 }
849 #endif
850 
851 #endif // QT_NO_QOBJECT
852 
853 #ifndef QT_NO_QOBJECT
854 void QCoreApplicationPrivate::removePostedTimerEvent(QObject *object, int timerId)
855 {
856  QThreadData *data = object->d_func()->threadData.loadRelaxed();
857 
858  const auto locker = qt_scoped_lock(data->postEventList.mutex);
859  if (data->postEventList.size() == 0)
860  return;
861  for (int i = 0; i < data->postEventList.size(); ++i) {
862  const QPostEvent &pe = data->postEventList.at(i);
863  if (pe.receiver == object
864  && pe.event
865  && (pe.event->type() == QEvent::Timer || pe.event->type() == QEvent::ZeroTimerEvent)
866  && static_cast<QTimerEvent *>(pe.event)->timerId() == timerId) {
867  --pe.receiver->d_func()->postedEvents;
868  pe.event->m_posted = false;
869  delete pe.event;
870  const_cast<QPostEvent &>(pe).event = 0;
871  return;
872  }
873  }
874 }
875 #endif // QT_NO_QOBJECT
876 
small capitals from c petite p scientific i
[1]
Definition: afcover.h:80
Arabic default style
Definition: afstyles.h:94
const char msg[]
Definition: arch.cpp:46
#define value
[5]
const char * constData() const noexcept
Definition: qbytearray.h:144
operator<<(QDataStream &ds, qfloat16 f)
Definition: qfloat16.cpp:327
The QDebug class provides an output stream for debugging information.
Definition: qdebug.h:65
QDebug & noquote()
Definition: qdebug.h:124
QDebug & nospace()
Definition: qdebug.h:113
Convenience class for custom QDebug operators.
Definition: qdebug.h:176
@ ZeroTimerEvent
Definition: qcoreevent.h:200
@ Timer
Definition: qcoreevent.h:72
Type type() const
Definition: qcoreevent.h:307
The QFileInfo class provides system-independent file information.
Definition: qfileinfo.h:57
QString baseName() const
Definition: qfileinfo.cpp:816
The QLatin1String class provides a thin wrapper around an US-ASCII/Latin-1 encoded string literal.
Definition: qstring.h:84
The QObject class is the base class of all Qt objects.
Definition: qobject.h:125
Definition: qthread_p.h:76
QObject * receiver
Definition: qthread_p.h:78
QEvent * event
Definition: qthread_p.h:79
The QString class provides a Unicode character string.
Definition: qstring.h:388
QByteArray toLatin1() const &
Definition: qstring.h:745
QString & prepend(QChar c)
Definition: qstring.h:656
static QString fromLatin1(QByteArrayView ba)
Definition: qstring.cpp:5488
qsizetype toWCharArray(wchar_t *array) const
qsizetype size() const
Definition: qstring.h:413
static QString fromWCharArray(const wchar_t *string, qsizetype size=-1)
QString arg(qlonglong a, int fieldwidth=0, int base=10, QChar fillChar=QLatin1Char(' ')) const
Definition: qstring.cpp:8318
static QString number(int, int base=10)
Definition: qstring.cpp:7538
static QString static QString asprintf(const char *format,...) Q_ATTRIBUTE_FORMAT_PRINTF(1
Definition: qstring.cpp:6759
The QTextStream class provides a convenient interface for reading and writing text.
Definition: qtextstream.h:62
The QTimerEvent class contains parameters that describe a timer event.
Definition: qcoreevent.h:367
int timerId() const
Definition: qcoreevent.h:372
constexpr size_type size() const noexcept
void resize(qsizetype sz)
T * data() noexcept
rect
[4]
#define NULL
Definition: ftobjs.h:61
#define TRUE
Definition: ftobjs.h:53
backing_store_ptr info
[4]
Definition: jmemsys.h:161
Lock qt_scoped_lock(Mutex &mutex)
Definition: qlocking_p.h:94
QTextStream & forcesign(QTextStream &stream)
#define QString()
Definition: parse-defines.h:51
#define Q_UNLIKELY(x)
QT_BEGIN_NAMESPACE Q_CORE_EXPORT QString qAppFileName()
EGLOutputLayerEXT EGLint EGLAttrib value
#define QT_BEGIN_INCLUDE_NAMESPACE
Definition: qglobal.h:265
size_t quintptr
Definition: qglobal.h:310
#define QT_END_INCLUDE_NAMESPACE
Definition: qglobal.h:266
unsigned int uint
Definition: qglobal.h:334
GLenum GLuint GLenum GLsizei const GLchar * message
Definition: qopengl.h:270
GLsizei const GLubyte * commands
[10]
GLenum GLsizei GLsizei GLint * values
[16]
GLsizei const GLfloat * v
[13]
GLboolean GLboolean GLboolean GLboolean a
[7]
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLuint GLuint end
GLfloat GLfloat f
GLenum GLuint buffer
GLbitfield flags
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLuint name
GLfloat GLfloat GLfloat GLfloat h
struct _cl_event * event
Definition: qopenglext.h:2998
const GLubyte * c
Definition: qopenglext.h:12701
GLuint64EXT * result
[6]
Definition: qopenglext.h:10932
GLfloat GLfloat p
[1]
Definition: qopenglext.h:12698
#define QStringLiteral(str)
#define WM_MOUSEHWHEEL
Definition: qt_windows.h:116
#define WM_MOUSEWHEEL
Definition: qt_windows.h:113
struct tagMSG MSG
const char className[16]
[1]
Definition: qwizard.cpp:135
QFileInfo fi("c:/temp/foo")
[newstuff]
QStringList keys
The QLatin1Char class provides an 8-bit ASCII/Latin-1 character.
Definition: qchar.h:53