Fix build of tests in static builds

tests/auto/corelib/kernel/qsocketnotifier includes cpp files from
src/network, and this blows up at the linking step in a static build,
due to duplicate symbols when linking the mocs_compilation of network
and the test.

Include the moc file in the .cpp file as we usually did in other cases,
to prevent duplicate symbols.

Change-Id: I2fb15058cb4477201af7bd053407e20970a947bb
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
Alexandru Croitor 2019-11-26 20:09:56 +01:00
parent a2fd94f055
commit 2a1fc7b835

View File

@ -274,3 +274,5 @@ int QAbstractSocketEngine::outboundStreamCount() const
}
QT_END_NAMESPACE
#include "moc_qabstractsocketengine_p.cpp"