diff --git a/tests/auto/tools/moc/moc.pro b/tests/auto/tools/moc/moc.pro index d2b13f9c4e..3cbc9ebb5e 100644 --- a/tests/auto/tools/moc/moc.pro +++ b/tests/auto/tools/moc/moc.pro @@ -36,11 +36,11 @@ if(*-g++*|*-icc*|*-clang*|*-llvm):!win32-*: HEADERS += os9-newlines.h win-newlin if(*-g++*|*-clang*): HEADERS += dollars.h SOURCES += tst_moc.cpp -QT = core sql network testlib -qtHaveModule(dbus) { - DEFINES += WITH_DBUS - QT += dbus -} +QT = core testlib +qtHaveModule(dbus): QT += dbus +qtHaveModule(concurrent): QT += concurrent +qtHaveModule(network): QT += network +qtHaveModule(sql): QT += sql # tst_Moc::specifyMetaTagsFromCmdline() # Ensure that plugin_metadata.h are moc-ed with some extra -M arguments: diff --git a/tests/auto/tools/moc/no-keywords.h b/tests/auto/tools/moc/no-keywords.h index d31063665b..ca77056503 100644 --- a/tests/auto/tools/moc/no-keywords.h +++ b/tests/auto/tools/moc/no-keywords.h @@ -37,16 +37,19 @@ #define slots Baz #define emit Yoyodyne +#include + +#ifdef QT_CONCURRENT_LIB #include -#include -#include -#include -//#include -#if defined(WITH_DBUS) -#include #endif -#ifdef QT_SCRIPT_LIB -#include +#ifdef QT_NETWORK_LIB +#include +#endif +#ifdef QT_SQL_LIB +#include +#endif +#ifdef QT_DBUS_LIB +#include #endif #undef signals