From bbb471f82159b58bbeb63e68cba1ae0a47faf77b Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 14 Sep 2009 18:49:23 +0200 Subject: Move the QT_GUI_LIB check to qtestevent.h instead of qtestmouse.h. This allows #including qtestmouse.h and qtestkeyboard directly to get mouse testing. All QtTest headers are still unsupported (you should always include QtTest/QtTest) but we can still fix issues like this. I have verified with the preprocessor that no GUI code is enabled by including QtTest if QT_GUI_LIB isn't defined. This should not bring the MinGW autotest failures back that the a250ca3a3c0 commit was trying to fix. Reviewed-by: Trust Me --- src/testlib/qtestevent.h | 2 ++ src/testlib/qtestkeyboard.h | 2 +- src/testlib/qtestmouse.h | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/testlib/qtestevent.h b/src/testlib/qtestevent.h index 95f2028..55df572 100644 --- a/src/testlib/qtestevent.h +++ b/src/testlib/qtestevent.h @@ -48,8 +48,10 @@ #endif #include +#ifdef QT_GUI_LIB #include #include +#endif #include #include diff --git a/src/testlib/qtestkeyboard.h b/src/testlib/qtestkeyboard.h index 42012e9..11c3b70 100644 --- a/src/testlib/qtestkeyboard.h +++ b/src/testlib/qtestkeyboard.h @@ -39,7 +39,7 @@ ** ****************************************************************************/ -#if !defined(QTESTKEYBOARD_H) && defined(QT_GUI_LIB) +#if !defined(QTESTKEYBOARD_H) #define QTESTKEYBOARD_H #if 0 diff --git a/src/testlib/qtestmouse.h b/src/testlib/qtestmouse.h index feb64cf..f339a5a 100644 --- a/src/testlib/qtestmouse.h +++ b/src/testlib/qtestmouse.h @@ -39,7 +39,7 @@ ** ****************************************************************************/ -#if !defined(QTESTMOUSE_H) && defined(QT_GUI_LIB) +#if !defined(QTESTMOUSE_H) #define QTESTMOUSE_H #if 0 -- cgit v0.12