path: root/src/corelib/global/qglobal.cpp
diff options
authorSergio Martins <>2019-05-06 15:44:49 +0100
committerSérgio Martins <>2019-05-08 17:22:01 +0000
commit9444416a46ee0e6bb0d9d9be9a4883b388644c59 (patch)
treeac43b3a6bd23a431744ba2ad70bb92ac516ea7d1 /src/corelib/global/qglobal.cpp
parentc6bee8e4b2c48775247c67ef8e7569f623655c61 (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 <>
Diffstat (limited to 'src/corelib/global/qglobal.cpp')
1 files changed, 7 insertions, 0 deletions
diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp
index 8d80a32ad5..555b04dcd5 100644
--- a/src/corelib/global/qglobal.cpp
+++ b/src/corelib/global/qglobal.cpp
@@ -1401,6 +1401,13 @@ bool qSharedBuild() Q_DECL_NOTHROW
+ \macro Q_OS_WINDOWS
+ \relates <QtGlobal>
+ This is a synonym for Q_OS_WIN.
\macro Q_OS_WIN32
\relates <QtGlobal>