Skip to content

Use discovercommon_export.h to avoid linker errors

Using purely Q_DECL_EXPORT isn't great because it doesn't switch to Q_DECL_IMPORT upon being used by external code.

Encountered during my KF6 build, where the linker couldn't find a reference for the Q_DECL_EXPORT marked functions and class. Admittedly I haven't attempted the KF5 build. The code looks the same there but I guess linker issues haven't been a thing for anyone? Weird! But it does seem like this one is more correct, and DISCOVERCOMMON_EXPORT is also used in other places in the code so hopefully I'm not crazy.

Merge request reports