From 1264b2547aaf03dbe0daacb5bb000657fe320515 Mon Sep 17 00:00:00 2001 From: Josef Rokos Date: Wed, 11 Nov 2015 12:23:32 +0100 Subject: [PATCH] Fixed build on MS VS2010. Improved includes in data classes. --- core/core.pro | 10 ++++++---- core/data/core-data.h | 13 +++++++++++++ core/data/permission.h | 5 ++--- core/data/role.h | 7 ++----- core/data/user.h | 6 ++---- core/emptystringvalidator.h | 4 +++- core/ivalidator.h | 4 +++- core/transaction.h | 4 +++- 8 files changed, 34 insertions(+), 19 deletions(-) create mode 100644 core/data/core-data.h diff --git a/core/core.pro b/core/core.pro index 4e0e479..688fad0 100644 --- a/core/core.pro +++ b/core/core.pro @@ -16,7 +16,7 @@ SOURCES += \ context.cpp \ imetadataplugin.cpp \ transaction.cpp \ - emptystringvalidator.cpp + emptystringvalidator.cpp \ data/role.cpp \ data/permission.cpp @@ -31,15 +31,17 @@ HEADERS += core.h\ autoform.h \ transaction.h \ ivalidator.h \ - emptystringvalidator.h + emptystringvalidator.h \ data/role.h \ - data/permission.h + data/permission.h \ + data/core-data.h unix { target.path = /usr/lib INSTALLS += target } -ODB_FILES = core/data/user.h core/data/role.h core/data/permission.h +ODB_FILES = core/data/core-data.h + H_DIR = $$PWD/data/*.h include(../odb.pri) diff --git a/core/data/core-data.h b/core/data/core-data.h new file mode 100644 index 0000000..3d7a05e --- /dev/null +++ b/core/data/core-data.h @@ -0,0 +1,13 @@ +#ifndef COREDATA_H +#define COREDATA_H + +class User; +class Permission; +class Role; + +#include "user.h" +#include "role.h" +#include "permission.h" + +#endif // COREDATA_H + diff --git a/core/data/permission.h b/core/data/permission.h index 47e5f5d..a469599 100644 --- a/core/data/permission.h +++ b/core/data/permission.h @@ -1,16 +1,15 @@ #ifndef PERMISSION_H #define PERMISSION_H +#include "core-data.h" + #include -#include "role.h" #include #include #include #include #include -class Role; - #pragma db object class Permission : public QObject { diff --git a/core/data/role.h b/core/data/role.h index 9eeda92..43d2074 100644 --- a/core/data/role.h +++ b/core/data/role.h @@ -1,18 +1,15 @@ #ifndef ROLE_H #define ROLE_H +#include "core-data.h" + #include -#include "user.h" -#include "permission.h" #include #include #include #include #include -class Permission; -class User; - #pragma db object class Role : public QObject { diff --git a/core/data/user.h b/core/data/user.h index bace0b2..57c0e35 100644 --- a/core/data/user.h +++ b/core/data/user.h @@ -1,17 +1,15 @@ #ifndef USER_H #define USER_H +#include "core-data.h" + #include #include -#include "role.h" #include #include #include - #include -class Role; - #pragma db object class User : public QObject { diff --git a/core/emptystringvalidator.h b/core/emptystringvalidator.h index c060f86..ac796b3 100644 --- a/core/emptystringvalidator.h +++ b/core/emptystringvalidator.h @@ -4,7 +4,9 @@ #include #include "ivalidator.h" -class EmptyStringValidator : public IValidator +#include "core_global.h" + +class CORESHARED_EXPORT EmptyStringValidator : public IValidator { public: EmptyStringValidator(QWidget *widget, const QString &errMessage); diff --git a/core/ivalidator.h b/core/ivalidator.h index d096a7d..f0aa0e5 100644 --- a/core/ivalidator.h +++ b/core/ivalidator.h @@ -4,7 +4,9 @@ #include #include -class IValidator +#include "core_global.h" + +class CORESHARED_EXPORT IValidator { public: IValidator(QWidget *widget, const QString &errMessage) diff --git a/core/transaction.h b/core/transaction.h index 2fd84c0..29eb3d6 100644 --- a/core/transaction.h +++ b/core/transaction.h @@ -4,7 +4,9 @@ #include #include -class Transaction +#include "core_global.h" + +class CORESHARED_EXPORT Transaction { public: Transaction();