diff --git a/core/core.pro b/core/core.pro index 0dd72c2..bdd8b7e 100644 --- a/core/core.pro +++ b/core/core.pro @@ -81,7 +81,8 @@ HEADERS += core.h\ samestringvalidator.h \ savefilterdialog.h \ filterdialog.h \ - itablemodel.h + itablemodel.h \ + data/core_global.h unix { target.path = /usr/lib diff --git a/core/data/core_global.h b/core/data/core_global.h new file mode 100644 index 0000000..b519481 --- /dev/null +++ b/core/data/core_global.h @@ -0,0 +1,12 @@ +#ifndef CORE_GLOBAL_H +#define CORE_GLOBAL_H + +#include + +#if defined(CORE_LIBRARY) +# define CORESHARED_EXPORT Q_DECL_EXPORT +#else +# define CORESHARED_EXPORT Q_DECL_IMPORT +#endif + +#endif // CORE_GLOBAL_H diff --git a/core/data/permission.h b/core/data/permission.h index c6dcfca..ba6b1c7 100644 --- a/core/data/permission.h +++ b/core/data/permission.h @@ -2,6 +2,7 @@ #define PERMISSION_H #include "core-data.h" +#include "core_global.h" #include #include @@ -12,7 +13,7 @@ #include #pragma db object -class Permission : public QObject +class CORESHARED_EXPORT Permission : public QObject { Q_OBJECT Q_PROPERTY(QString pluginId READ pluginId WRITE setPluginId) diff --git a/core/data/role.h b/core/data/role.h index 44d1a38..3119f5f 100644 --- a/core/data/role.h +++ b/core/data/role.h @@ -2,6 +2,7 @@ #define ROLE_H #include "core-data.h" +#include "core_global.h" #include #include @@ -12,7 +13,7 @@ #include #pragma db object -class Role : public QObject +class CORESHARED_EXPORT Role : public QObject { Q_OBJECT Q_PROPERTY(QString name READ name WRITE setName) diff --git a/core/data/user.h b/core/data/user.h index 0bce4d5..d7e8b85 100644 --- a/core/data/user.h +++ b/core/data/user.h @@ -2,6 +2,7 @@ #define USER_H #include "core-data.h" +#include "core_global.h" #include #include @@ -12,7 +13,7 @@ #include #pragma db object -class User : public QObject +class CORESHARED_EXPORT User : public QObject { Q_OBJECT Q_PROPERTY(QString login READ login WRITE setLogin)