From 7c94e01d9feff8e6c09c88a9e51c8d5a6cb61005 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Sun, 31 Jan 2016 14:00:05 +0100 Subject: Explicitly state visibility This cuts the exportet symbols from 12k to 2k and the library size from 16Mb to 14Mb, which isn't great but still an improvement. About 30% of the symbols are coming from the Store:: interface. nm -C -D /work/install/lib64/libsinkcommon.so.0.1 --- common/domain/applicationdomaintype.h | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) (limited to 'common/domain/applicationdomaintype.h') diff --git a/common/domain/applicationdomaintype.h b/common/domain/applicationdomaintype.h index 88f094a..330d680 100644 --- a/common/domain/applicationdomaintype.h +++ b/common/domain/applicationdomaintype.h @@ -19,6 +19,7 @@ */ #pragma once +#include #include #include #include @@ -35,7 +36,7 @@ namespace ApplicationDomain { * * ApplicationDomainTypes don't adhere to any standard and are meant to be extended frequently (hence the non-typesafe interface). */ -class ApplicationDomainType { +class SINKCOMMON_EXPORT ApplicationDomainType { public: typedef QSharedPointer Ptr; @@ -82,37 +83,37 @@ inline bool operator==(const ApplicationDomainType& lhs, const ApplicationDomain && lhs.resourceInstanceIdentifier() == rhs.resourceInstanceIdentifier(); } -struct Entity : public ApplicationDomainType { +struct SINKCOMMON_EXPORT Entity : public ApplicationDomainType { typedef QSharedPointer Ptr; using ApplicationDomainType::ApplicationDomainType; virtual ~Entity(); }; -struct Event : public Entity { +struct SINKCOMMON_EXPORT Event : public Entity { typedef QSharedPointer Ptr; using Entity::Entity; virtual ~Event(); }; -struct Todo : public Entity { +struct SINKCOMMON_EXPORT Todo : public Entity { typedef QSharedPointer Ptr; using Entity::Entity; virtual ~Todo(); }; -struct Calendar : public Entity { +struct SINKCOMMON_EXPORT Calendar : public Entity { typedef QSharedPointer Ptr; using Entity::Entity; virtual ~Calendar(); }; -struct Mail : public Entity { +struct SINKCOMMON_EXPORT Mail : public Entity { typedef QSharedPointer Ptr; using Entity::Entity; virtual ~Mail(); }; -struct Folder : public Entity { +struct SINKCOMMON_EXPORT Folder : public Entity { typedef QSharedPointer Ptr; using Entity::Entity; virtual ~Folder(); @@ -124,7 +125,7 @@ struct Folder : public Entity { * This type is used for configuration of resources, * and for creating and removing resource instances. */ -struct SinkResource : public ApplicationDomainType { +struct SINKCOMMON_EXPORT SinkResource : public ApplicationDomainType { typedef QSharedPointer Ptr; using ApplicationDomainType::ApplicationDomainType; virtual ~SinkResource(); @@ -136,22 +137,22 @@ struct SinkResource : public ApplicationDomainType { * Do not store these types to disk, they may change over time. */ template -QByteArray getTypeName(); +QByteArray SINKCOMMON_EXPORT getTypeName(); template<> -QByteArray getTypeName(); +QByteArray SINKCOMMON_EXPORT getTypeName(); template<> -QByteArray getTypeName(); +QByteArray SINKCOMMON_EXPORT getTypeName(); template<> -QByteArray getTypeName(); +QByteArray SINKCOMMON_EXPORT getTypeName(); template<> -QByteArray getTypeName(); +QByteArray SINKCOMMON_EXPORT getTypeName(); template<> -QByteArray getTypeName(); +QByteArray SINKCOMMON_EXPORT getTypeName(); /** * Type implementation. @@ -160,7 +161,7 @@ QByteArray getTypeName(); * Contains all non-resource specific, but type-specific code. */ template -class TypeImplementation; +class SINKCOMMON_EXPORT TypeImplementation; } } -- cgit v1.2.3