From 721ec985011489b35ec9fd4f3c3cb9d51864f003 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Wed, 23 Oct 2013 14:50:45 +0200 Subject: [PATCH] remove qt_windows.h include from qwineventnotifier.h We must not include qt_windows.h in public headers, otherwise we're cluttering the environment with a colorful bouquet of Windows API preprocessor macros and typedefs. Task-number: QTBUG-34058 Change-Id: I415717ea2a47f39e7f4b7ce1c1df9d49afc99278 Reviewed-by: Olivier Goffart --- src/corelib/kernel/qwineventnotifier.h | 2 +- .../corelib/kernel/qwineventnotifier/tst_qwineventnotifier.cpp | 1 + tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/corelib/kernel/qwineventnotifier.h b/src/corelib/kernel/qwineventnotifier.h index 56605d9aaa..cddb9d73be 100644 --- a/src/corelib/kernel/qwineventnotifier.h +++ b/src/corelib/kernel/qwineventnotifier.h @@ -45,7 +45,6 @@ #include "QtCore/qobject.h" #ifdef Q_OS_WIN -#include "QtCore/qt_windows.h" QT_BEGIN_NAMESPACE @@ -54,6 +53,7 @@ class Q_CORE_EXPORT QWinEventNotifier : public QObject { Q_OBJECT Q_DECLARE_PRIVATE(QWinEventNotifier) + typedef Qt::HANDLE HANDLE; public: explicit QWinEventNotifier(QObject *parent = 0); diff --git a/tests/auto/corelib/kernel/qwineventnotifier/tst_qwineventnotifier.cpp b/tests/auto/corelib/kernel/qwineventnotifier/tst_qwineventnotifier.cpp index 8a0ff162c6..952cb031b8 100644 --- a/tests/auto/corelib/kernel/qwineventnotifier/tst_qwineventnotifier.cpp +++ b/tests/auto/corelib/kernel/qwineventnotifier/tst_qwineventnotifier.cpp @@ -42,6 +42,7 @@ #include #include #include +#include class tst_QWinEventNotifier : public QObject { diff --git a/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp b/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp index 0ee40713aa..1e2b0ed649 100644 --- a/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp +++ b/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp @@ -48,7 +48,7 @@ #include #ifdef Q_OS_WIN -# include +# include #endif class tst_QDateTime : public QObject