diff options
author | Sergio Martins <sergio.martins@kdab.com> | 2019-05-06 15:44:49 +0100 |
---|---|---|
committer | Sérgio Martins <sergio.martins@kdab.com> | 2019-05-08 17:22:01 +0000 |
commit | 9444416a46ee0e6bb0d9d9be9a4883b388644c59 (patch) | |
tree | ac43b3a6bd23a431744ba2ad70bb92ac516ea7d1 /src/corelib/global/qsystemdetection.h | |
parent | c6bee8e4b2c48775247c67ef8e7569f623655c61 (diff) |
Define Q_OS_WINDOWS, make it an alias to Q_OS_WIN
As seen in several occasions, both in user code and in Qt proper,
people make these mistakes. What makes it harder to spot is that it doesn't
look like a typo, and feels natural (natural as Q_OS_LINUX instead of Q_OS_LIN feels).
There's been a P1 in qtdeclarative/ and currently there's a Q_OS_WINDOWS usage
in qtwebengine.
This is a recurring problem, no matter how much people test and review
these errors will happen, so the alias is justified.
Change-Id: If6943b52e17f0c8b238c36bb1f7834802123f12a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/global/qsystemdetection.h')
-rw-r--r-- | src/corelib/global/qsystemdetection.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/corelib/global/qsystemdetection.h b/src/corelib/global/qsystemdetection.h index aabe46f3c2..a2e51fa330 100644 --- a/src/corelib/global/qsystemdetection.h +++ b/src/corelib/global/qsystemdetection.h @@ -176,6 +176,7 @@ #endif #if defined(Q_OS_WIN32) || defined(Q_OS_WIN64) || defined(Q_OS_WINRT) +# define Q_OS_WINDOWS # define Q_OS_WIN #endif |