qt5base-lts/tests/manual/diaglib
Marc Mutz aa37e67ef7 Port from qAsConst() to std::as_const()
We've been requiring C++17 since Qt 6.0, and our qAsConst use finally
starts to bother us (QTBUG-99313), so time to port away from it
now.

Since qAsConst has exactly the same semantics as std::as_const (down
to rvalue treatment, constexpr'ness and noexcept'ness), there's really
nothing more to it than a global search-and-replace, with manual
unstaging of the actual definition and documentation in dist/,
src/corelib/doc/ and src/corelib/global/.

Task-number: QTBUG-99313
Change-Id: I4c7114444a325ad4e62d0fcbfd347d2bbfb21541
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2022-10-11 23:17:18 +02:00
..
debugproxystyle.cpp Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
debugproxystyle.h Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
diaglib.pri CMake: Regenerate projects using pro2cmake one last time 2020-12-10 11:52:30 +01:00
eventfilter.cpp Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
eventfilter.h Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
glinfo.cpp Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
glinfo.h Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
logwidget.cpp Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
logwidget.h Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
nativewindowdump_win.cpp Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
nativewindowdump.cpp Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
nativewindowdump.h Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qwidgetdump.cpp Port from qAsConst() to std::as_const() 2022-10-11 23:17:18 +02:00
qwidgetdump.h Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qwindowdump.cpp Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qwindowdump.h Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
README.txt Diaglib: Add class LogWidget. 2016-06-09 20:16:47 +00:00
textdump.cpp Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
textdump.h Use SPDX license identifiers 2022-05-16 16:37:38 +02:00

This is a collection of functions and classes helpful for diagnosing bugs
in Qt 4 and Qt 5. It can be included in the application's .pro file by
adding:

include([path to Qt sources]/tests/manual/diaglib/diaglib.pri)

For Qt 4, the environment variable QTDIR may be used:
include($$(QTDIR)/tests/manual/diaglib/diaglib.pri)

The .pri file adds the define QT_DIAG_LIB, so, diagnostic
code can be enlosed within #ifdef to work without it as well.

All functions and classes are in the QtDiag namespace.

function dumpText() (textdump.h)
  Returns a string containing the input text split up in characters
  listing category, script, direction etc.
  Useful for analyzing non-Latin text.

function  dumpTextAsCode() (textdump.h)
   Returns a string containing a code snippet creating a QString
   by appending the unicode value of character of the input.
   This is useful for constructing non-Latin strings with purely ASCII
   source code.

class EventFilter (eventfilter.h):
  An event filter that logs Qt events to qDebug() depending on
  configured categories (for example mouse, keyboard, etc).

class DebugProxyStyle (debugproxystyle.h)
  A proxy style that wraps around an existing style and outputs
  the parameters and return values of its function calls, useful
  for debugging QStyle.

class LogWidget (logwidget.h)
  A Log Widget inheriting QPlainTextEdit with convenience functions
  to install as a message handler.

class LogFunctionGuard
   A guard class for use with LogWidget logging messages when a function
   is entered/left (indenting the log messages).
   Can be instantiated using:
   LogFunctionGuard guard(__FUNCTION__) or
   LogFunctionGuard guard(Q_FUNC_INFO)

function glInfo() (glinfo.h):
  Returns a string describing the Open GL configuration (obtained
  by querying GL_VENDOR and GL_RENDERER). Available only
  when the QT qmake variable contains opengl.

functions dumpNativeWindows(), dumpNativeQtTopLevels():
  These functions du,p out the hierarchy of native Windows. Currently
  implemented for Windows only.

function dumpAllWidgets() (qwidgetdump.h):
  Dumps the hierarchy of QWidgets including information about flags,
  visibility, geometry, etc.

function dumpAllWindows() (qwindowdump.h):
  Dumps the hierarchy of QWindows including information about flags,
  visibility, geometry, etc.