From 3cd19719e5c48d801cc0369f0b8b5ce8eda3fca8 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Tue, 6 Dec 2022 10:42:00 +0100 Subject: [PATCH] Fix moc warning for qwineventnotifier.h on non-Windows platforms MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Disable AUTOMOC for qwineventnotifier.h on non-Windows platforms. Add a comment to remove qwineventnotifier.h from non-Windows platforms for Qt7. Fixes: QTBUG-107109 Change-Id: I8f769aa764daeb634211aca7114f94b50cc0a85d Reviewed-by: Tor Arne Vestbø Reviewed-by: Alexandru Croitor Reviewed-by: Alexey Edelev --- src/corelib/CMakeLists.txt | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/corelib/CMakeLists.txt b/src/corelib/CMakeLists.txt index 279562cae20..8fc301e27f0 100644 --- a/src/corelib/CMakeLists.txt +++ b/src/corelib/CMakeLists.txt @@ -182,7 +182,6 @@ qt_internal_add_module(Core kernel/qtranslator.cpp kernel/qtranslator.h kernel/qtranslator_p.h kernel/qvariant.cpp kernel/qvariant.h kernel/qvariantmap.h kernel/qvarianthash.h kernel/qvariantlist.h - kernel/qwineventnotifier.h plugin/qfactoryinterface.cpp plugin/qfactoryinterface.h plugin/qfactoryloader.cpp plugin/qfactoryloader_p.h plugin/qplugin.h plugin/qplugin_p.h @@ -564,7 +563,7 @@ qt_internal_extend_target(Core CONDITION WIN32 kernel/qfunctions_win.cpp kernel/qfunctions_win_p.h kernel/qfunctions_winrt_p.h kernel/qsharedmemory_win.cpp kernel/qsystemsemaphore_win.cpp - kernel/qwineventnotifier.cpp kernel/qwineventnotifier_p.h + kernel/qwineventnotifier.cpp kernel/qwineventnotifier.h kernel/qwineventnotifier_p.h kernel/qwinregistry.cpp kernel/qwinregistry_p.h plugin/qsystemlibrary.cpp plugin/qsystemlibrary_p.h thread/qthread_win.cpp @@ -586,6 +585,14 @@ qt_internal_extend_target(Core CONDITION WIN32 userenv ) +if(NOT WIN32) + ### Qt7: remove + # Make qwineventnotifier.h available on non-Windows platforms too for code bases that include + # it unconditionally. + qt_internal_extend_target(Core SOURCES kernel/qwineventnotifier.h) + set_source_files_properties(kernel/qwineventnotifier.h PROPERTIES SKIP_AUTOMOC ON) +endif() + qt_internal_extend_target(Core CONDITION WASM SOURCES kernel/qcore_wasm.cpp)