From 5f160a3699d80d1736f691ad9ef774eb6aa28079 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Mon, 14 Oct 2019 15:18:44 +0200 Subject: Fix static linking when bearer management plugins are built MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The bearer plugins include copies of moc generated code that results in duplicate symbols when static linking pulls in multiple bearer plugins. Instead of relying on toolchain defined behavior, this patch moves the code that is shared into the shared library as private API. This way it will exist only once in memory and once at link time, resulting no linking errors about duplicate symbols. Fixes: QTBUG-79211 Change-Id: Iafa45c234e7fdd998971fc9cb7116334d08907bc Reviewed-by: MÃ¥rten Nordheim --- src/plugins/bearer/corewlan/corewlan.pro | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/plugins/bearer/corewlan/corewlan.pro') diff --git a/src/plugins/bearer/corewlan/corewlan.pro b/src/plugins/bearer/corewlan/corewlan.pro index 1dc09ebdd6..4f08eaba71 100644 --- a/src/plugins/bearer/corewlan/corewlan.pro +++ b/src/plugins/bearer/corewlan/corewlan.pro @@ -7,12 +7,9 @@ qtConfig(corewlan) { LIBS += -framework CoreWLAN -framework Security } -HEADERS += qcorewlanengine.h \ - ../qnetworksession_impl.h \ - ../qbearerengine_impl.h +HEADERS += qcorewlanengine.h -SOURCES += main.cpp \ - ../qnetworksession_impl.cpp +SOURCES += main.cpp OBJECTIVE_SOURCES += qcorewlanengine.mm -- cgit v1.2.3