Only define CALLBACK when PCH is used

The PCH header is undefining CALLBACK after loading Windows headers,
but we need to add it back when using Windows headers that need it.

The new definition needs only to be done when the PCH is used,
otherwise it could lead to re-definition warnings.

Amends 7880950eca

Change-Id: Iae57ac4bbbfdd45b5f9b50a2242103bec6eea5bc
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
Cristian Adam
2021-05-05 10:28:07 +02:00
parent 3c45f9f23d
commit de9be2bb9d
6 changed files with 18 additions and 1 deletions

View File

@@ -44,7 +44,9 @@
#endif
#ifdef Q_OS_WIN
#ifdef QTCREATOR_PCH_H
#define CALLBACK WINAPI
#endif
#include <qt_windows.h>
#include <shlobj.h>
#endif