resolve symbols export errors on msvc
This commit is contained in:
parent
b077defc81
commit
3470f7f8b3
|
|
@ -1 +1 @@
|
||||||
Subproject commit 51500a497933444196942ee0db6628338a0422af
|
Subproject commit 5b30b13af9b9537d4226c922d04106dc4ba0595b
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
#QT -= gui
|
|
||||||
|
|
||||||
DEFINES += NUT_PATH=\\\"$$PWD/../../\\\"
|
|
||||||
|
|
||||||
|
|
@ -1,10 +0,0 @@
|
||||||
QT += sql gui
|
|
||||||
|
|
||||||
TARGET = nut
|
|
||||||
TEMPLATE = lib
|
|
||||||
CONFIG += c++11
|
|
||||||
|
|
||||||
DEFINES += QT_DEPRECATED_WARNINGS NUT_COMPILE_STATIC
|
|
||||||
|
|
||||||
include($$PWD/src/src.pri)
|
|
||||||
include($$PWD/3rdparty/serializer/src/src.pri)
|
|
||||||
|
|
@ -36,7 +36,7 @@ void Nut::BulkInserter::insert(std::initializer_list<QVariant> vars)
|
||||||
|
|
||||||
int Nut::BulkInserter::apply()
|
int Nut::BulkInserter::apply()
|
||||||
{
|
{
|
||||||
auto sql = _database->sqlGenertor()->insertBulk(_className, _fields, variants);
|
auto sql = _database->sqlGenerator()->insertBulk(_className, _fields, variants);
|
||||||
QSqlQuery q = _database->exec(sql);
|
QSqlQuery q = _database->exec(sql);
|
||||||
return q.numRowsAffected();
|
return q.numRowsAffected();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ NUT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
class PhraseList;
|
class PhraseList;
|
||||||
class Database;
|
class Database;
|
||||||
class BulkInserter
|
class NUT_EXPORT BulkInserter
|
||||||
{
|
{
|
||||||
Database *_database;
|
Database *_database;
|
||||||
QString _className;
|
QString _className;
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
NUT_BEGIN_NAMESPACE
|
NUT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
class ChangeLogTable : public Table
|
class NUT_EXPORT ChangeLogTable : public Table
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@
|
||||||
NUT_BEGIN_NAMESPACE
|
NUT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
class ChangeLogTable;
|
class ChangeLogTable;
|
||||||
class DatabasePrivate //: public QSharedData
|
class NUT_EXPORT DatabasePrivate //: public QSharedData
|
||||||
{
|
{
|
||||||
Database *q_ptr;
|
Database *q_ptr;
|
||||||
Q_DECLARE_PUBLIC(Database)
|
Q_DECLARE_PUBLIC(Database)
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ NUT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
class TableModel;
|
class TableModel;
|
||||||
struct RelationModel;
|
struct RelationModel;
|
||||||
class DatabaseModel : public QList<TableModel *>
|
class NUT_EXPORT DatabaseModel : public QList<TableModel *>
|
||||||
{
|
{
|
||||||
QString _databaseClassName;
|
QString _databaseClassName;
|
||||||
int _version;
|
int _version;
|
||||||
|
|
|
||||||
|
|
@ -31,10 +31,20 @@
|
||||||
#include <QVariant>
|
#include <QVariant>
|
||||||
#include <QMetaClassInfo>
|
#include <QMetaClassInfo>
|
||||||
|
|
||||||
#ifdef NUT_COMPILE_STATIC
|
#if defined(NUT_SHARED) || !defined(NUT_STATIC)
|
||||||
# define NUT_EXPORT
|
# ifdef NUT_STATIC
|
||||||
|
# error "Both NUT_SHARED and NUT_STATIC defined, please make up your mind"
|
||||||
|
# endif
|
||||||
|
# ifndef NUT_SHARED
|
||||||
|
# define NUT_SHARED
|
||||||
|
# endif
|
||||||
|
# if defined(NUT_BUILD_LIB)
|
||||||
|
# define NUT_EXPORT Q_DECL_EXPORT
|
||||||
|
# else
|
||||||
|
# define NUT_EXPORT Q_DECL_IMPORT
|
||||||
|
# endif
|
||||||
#else
|
#else
|
||||||
# define NUT_EXPORT Q_DECL_EXPORT
|
# define NUT_EXPORT
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define NUT_INFO(type, name, value) \
|
#define NUT_INFO(type, name, value) \
|
||||||
|
|
@ -45,7 +55,7 @@
|
||||||
Q_CLASSINFO(__nut_NAME_PERFIX type #name #value, \
|
Q_CLASSINFO(__nut_NAME_PERFIX type #name #value, \
|
||||||
type "\n" #name "\n" value)
|
type "\n" #name "\n" value)
|
||||||
|
|
||||||
#define NUT_FIELD_PERFIX
|
#define NUT_FIELD_PREFIX
|
||||||
#define NUT_FIELD_POSTFIX Field
|
#define NUT_FIELD_POSTFIX Field
|
||||||
|
|
||||||
// Database
|
// Database
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
NUT_BEGIN_NAMESPACE
|
NUT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
class MySqlGenerator : public SqlGeneratorBase
|
class NUT_EXPORT MySqlGenerator : public SqlGeneratorBase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit MySqlGenerator(Database *parent = nullptr);
|
explicit MySqlGenerator(Database *parent = nullptr);
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
NUT_BEGIN_NAMESPACE
|
NUT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
class PostgreSqlGenerator : public SqlGeneratorBase
|
class NUT_EXPORT PostgreSqlGenerator : public SqlGeneratorBase
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
bool readInsideParentese(QString &text, QString &out);
|
bool readInsideParentese(QString &text, QString &out);
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ class DatabaseModel;
|
||||||
class TableModel;
|
class TableModel;
|
||||||
class Database;
|
class Database;
|
||||||
struct RelationModel;
|
struct RelationModel;
|
||||||
class SqlGeneratorBase : public QObject
|
class NUT_EXPORT SqlGeneratorBase : public QObject
|
||||||
{
|
{
|
||||||
// Q_OBJECT
|
// Q_OBJECT
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
NUT_BEGIN_NAMESPACE
|
NUT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
class SqliteGenerator : public SqlGeneratorBase
|
class NUT_EXPORT SqliteGenerator : public SqlGeneratorBase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit SqliteGenerator(Database *parent = nullptr);
|
explicit SqliteGenerator(Database *parent = nullptr);
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
NUT_BEGIN_NAMESPACE
|
NUT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
class SqlServerGenerator : public SqlGeneratorBase
|
class NUT_EXPORT SqlServerGenerator : public SqlGeneratorBase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit SqlServerGenerator(Database *parent = nullptr);
|
explicit SqlServerGenerator(Database *parent = nullptr);
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ ConditionalPhrase::ConditionalPhrase(const ConditionalPhrase &other)
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef Q_COMPILER_RVALUE_REFS
|
#ifdef Q_COMPILER_RVALUE_REFS
|
||||||
ConditionalPhrase::ConditionalPhrase(const ConditionalPhrase &&other)
|
ConditionalPhrase::ConditionalPhrase(ConditionalPhrase &&other)
|
||||||
{
|
{
|
||||||
this->data = qMove(other.data);
|
this->data = qMove(other.data);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,7 @@ ConditionalPhrase operator op(const QVariant &other) \
|
||||||
{ \
|
{ \
|
||||||
return ConditionalPhrase(this, cond, other); \
|
return ConditionalPhrase(this, cond, other); \
|
||||||
}
|
}
|
||||||
|
|
||||||
class NUT_EXPORT ConditionalPhrase
|
class NUT_EXPORT ConditionalPhrase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
@ -42,7 +43,7 @@ public:
|
||||||
ConditionalPhrase();
|
ConditionalPhrase();
|
||||||
ConditionalPhrase(const ConditionalPhrase &other);
|
ConditionalPhrase(const ConditionalPhrase &other);
|
||||||
#ifdef Q_COMPILER_RVALUE_REFS
|
#ifdef Q_COMPILER_RVALUE_REFS
|
||||||
ConditionalPhrase(const ConditionalPhrase &&other);
|
ConditionalPhrase(ConditionalPhrase &&other);
|
||||||
#endif
|
#endif
|
||||||
explicit ConditionalPhrase(const PhraseData *data);
|
explicit ConditionalPhrase(const PhraseData *data);
|
||||||
ConditionalPhrase(AbstractFieldPhrase *, PhraseData::Condition);
|
ConditionalPhrase(AbstractFieldPhrase *, PhraseData::Condition);
|
||||||
|
|
@ -69,24 +70,24 @@ public:
|
||||||
|
|
||||||
|
|
||||||
#define DECLARE_CONDITIONALPHRASE_OPERATORS(op) \
|
#define DECLARE_CONDITIONALPHRASE_OPERATORS(op) \
|
||||||
ConditionalPhrase operator op(const ConditionalPhrase &l, const ConditionalPhrase &r); \
|
ConditionalPhrase NUT_EXPORT operator op(const ConditionalPhrase &l, const ConditionalPhrase &r); \
|
||||||
ConditionalPhrase operator op(const ConditionalPhrase &l, ConditionalPhrase &&r); \
|
ConditionalPhrase NUT_EXPORT operator op(const ConditionalPhrase &l, ConditionalPhrase &&r); \
|
||||||
ConditionalPhrase operator op(ConditionalPhrase &&l, const ConditionalPhrase &r); \
|
ConditionalPhrase NUT_EXPORT operator op(ConditionalPhrase &&l, const ConditionalPhrase &r); \
|
||||||
ConditionalPhrase operator op(ConditionalPhrase &&l, ConditionalPhrase &&r);
|
ConditionalPhrase NUT_EXPORT operator op(ConditionalPhrase &&l, ConditionalPhrase &&r);
|
||||||
|
|
||||||
DECLARE_CONDITIONALPHRASE_OPERATORS(==)
|
DECLARE_CONDITIONALPHRASE_OPERATORS(==)
|
||||||
DECLARE_CONDITIONALPHRASE_OPERATORS(&&)
|
DECLARE_CONDITIONALPHRASE_OPERATORS(&&)
|
||||||
DECLARE_CONDITIONALPHRASE_OPERATORS(||)
|
DECLARE_CONDITIONALPHRASE_OPERATORS(||)
|
||||||
|
|
||||||
ConditionalPhrase operator <(AbstractFieldPhrase &l, ConditionalPhrase &&r);
|
ConditionalPhrase NUT_EXPORT operator <(AbstractFieldPhrase &l, ConditionalPhrase &&r);
|
||||||
ConditionalPhrase operator <=(AbstractFieldPhrase &l, ConditionalPhrase &&r);
|
ConditionalPhrase NUT_EXPORT operator <=(AbstractFieldPhrase &l, ConditionalPhrase &&r);
|
||||||
ConditionalPhrase operator >(AbstractFieldPhrase &l, ConditionalPhrase &&r);
|
ConditionalPhrase NUT_EXPORT operator >(AbstractFieldPhrase &l, ConditionalPhrase &&r);
|
||||||
ConditionalPhrase operator >=(AbstractFieldPhrase &l, ConditionalPhrase &&r);
|
ConditionalPhrase NUT_EXPORT operator >=(AbstractFieldPhrase &l, ConditionalPhrase &&r);
|
||||||
|
|
||||||
ConditionalPhrase operator <(ConditionalPhrase &&l, ConditionalPhrase &&r);
|
ConditionalPhrase NUT_EXPORT operator <(ConditionalPhrase &&l, ConditionalPhrase &&r);
|
||||||
ConditionalPhrase operator <=(ConditionalPhrase &&l, ConditionalPhrase &&r);
|
ConditionalPhrase NUT_EXPORT operator <=(ConditionalPhrase &&l, ConditionalPhrase &&r);
|
||||||
ConditionalPhrase operator >(ConditionalPhrase &&l, ConditionalPhrase &&r);
|
ConditionalPhrase NUT_EXPORT operator >(ConditionalPhrase &&l, ConditionalPhrase &&r);
|
||||||
ConditionalPhrase operator >=(ConditionalPhrase &&l, ConditionalPhrase &&r);
|
ConditionalPhrase NUT_EXPORT operator >=(ConditionalPhrase &&l, ConditionalPhrase &&r);
|
||||||
|
|
||||||
|
|
||||||
NUT_END_NAMESPACE
|
NUT_END_NAMESPACE
|
||||||
|
|
|
||||||
|
|
@ -27,27 +27,33 @@
|
||||||
|
|
||||||
NUT_BEGIN_NAMESPACE
|
NUT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
template<typename T, typename enable = void>
|
template<typename T>
|
||||||
class NUT_EXPORT FieldPhrase : public AbstractFieldPhrase
|
class FieldPhrase : public AbstractFieldPhrase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
FieldPhrase(const char *className, const char *s) :
|
FieldPhrase(const char *className, const char *s) :
|
||||||
AbstractFieldPhrase(className, s)
|
AbstractFieldPhrase(className, s)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
AssignmentPhrase operator =(const QVariant &other) {
|
virtual ~FieldPhrase() {}
|
||||||
return AssignmentPhrase(this, other);
|
|
||||||
}
|
|
||||||
|
|
||||||
ConditionalPhrase operator ==(const QVariant &other) {
|
|
||||||
return ConditionalPhrase(this, PhraseData::Equal, other);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
AssignmentPhrase operator =(const QVariant &other);
|
||||||
|
ConditionalPhrase operator ==(const QVariant &other);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
template<typename T>
|
||||||
|
Q_OUTOFLINE_TEMPLATE AssignmentPhrase FieldPhrase<T>::operator =(const QVariant &other) {
|
||||||
|
return AssignmentPhrase(this, other);
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename T>
|
||||||
|
Q_OUTOFLINE_TEMPLATE ConditionalPhrase FieldPhrase<T>::operator ==(const QVariant &other) {
|
||||||
|
return ConditionalPhrase(this, PhraseData::Equal, other);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
class NUT_EXPORT FieldPhrase<QString> : public AbstractFieldPhrase
|
class FieldPhrase<QString> : public AbstractFieldPhrase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
FieldPhrase(const char *className, const char *s) :
|
FieldPhrase(const char *className, const char *s) :
|
||||||
|
|
@ -75,7 +81,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
class NUT_EXPORT FieldPhrase<bool> : public AbstractFieldPhrase
|
class FieldPhrase<bool> : public AbstractFieldPhrase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
FieldPhrase(const char *className, const char *s) :
|
FieldPhrase(const char *className, const char *s) :
|
||||||
|
|
|
||||||
|
|
@ -12,23 +12,13 @@ NUT_BEGIN_NAMESPACE
|
||||||
return ConditionalPhrase(this, cond, other); \
|
return ConditionalPhrase(this, cond, other); \
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
class NumericFieldPhrase : public AbstractFieldPhrase
|
||||||
class FieldPhrase<T, typename std::enable_if<
|
|
||||||
std::is_floating_point<T>::value || std::is_integral<T>::value
|
|
||||||
>::type>
|
|
||||||
: public AbstractFieldPhrase
|
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
FieldPhrase(const char *className, const char *s) :
|
NumericFieldPhrase(const char *className, const char *s) :
|
||||||
AbstractFieldPhrase(className, s)
|
AbstractFieldPhrase(className, s)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
AssignmentPhrase operator =(const QVariant &other) {
|
|
||||||
return AssignmentPhrase(this, other);
|
|
||||||
}
|
|
||||||
AssignmentPhrase operator =(ConditionalPhrase &&other) {
|
|
||||||
return AssignmentPhrase(new PhraseData(data, PhraseData::Equal, other.data));
|
|
||||||
}
|
|
||||||
ConditionalPhrase between(const QVariant &min, const QVariant &max)
|
ConditionalPhrase between(const QVariant &min, const QVariant &max)
|
||||||
{
|
{
|
||||||
return ConditionalPhrase(this, PhraseData::Between,
|
return ConditionalPhrase(this, PhraseData::Between,
|
||||||
|
|
@ -65,25 +55,32 @@ public:
|
||||||
|
|
||||||
#define SPECIALIZATION_NUMERIC_TYPE(type) \
|
#define SPECIALIZATION_NUMERIC_TYPE(type) \
|
||||||
template<> \
|
template<> \
|
||||||
class FieldPhrase<type> : public NumericPhrase \
|
class FieldPhrase<type> : public NumericFieldPhrase \
|
||||||
{ \
|
{ \
|
||||||
public: \
|
public: \
|
||||||
FieldPhrase(const char *className, const char *s) : \
|
FieldPhrase(const char *className, const char *s) : \
|
||||||
NumericPhrase(className, s) \
|
NumericFieldPhrase(className, s) \
|
||||||
{} \
|
{} \
|
||||||
|
AssignmentPhrase operator =(const QVariant &other) { \
|
||||||
|
return AssignmentPhrase(this, other); \
|
||||||
|
} \
|
||||||
|
AssignmentPhrase operator =(ConditionalPhrase &&other) { \
|
||||||
|
return AssignmentPhrase(new PhraseData(data, PhraseData::Equal, other.data)); \
|
||||||
|
} \
|
||||||
};
|
};
|
||||||
|
|
||||||
//SPECIALIZATION_NUMERIC_TYPE(qint8)
|
SPECIALIZATION_NUMERIC_TYPE(qint8)
|
||||||
//SPECIALIZATION_NUMERIC_TYPE(qint16)
|
SPECIALIZATION_NUMERIC_TYPE(qint16)
|
||||||
//SPECIALIZATION_NUMERIC_TYPE(qint32)
|
SPECIALIZATION_NUMERIC_TYPE(qint32)
|
||||||
//SPECIALIZATION_NUMERIC_TYPE(qint64)
|
SPECIALIZATION_NUMERIC_TYPE(qint64)
|
||||||
|
|
||||||
//SPECIALIZATION_NUMERIC_TYPE(quint8)
|
SPECIALIZATION_NUMERIC_TYPE(quint8)
|
||||||
//SPECIALIZATION_NUMERIC_TYPE(quint16)
|
SPECIALIZATION_NUMERIC_TYPE(quint16)
|
||||||
//SPECIALIZATION_NUMERIC_TYPE(quint32)
|
SPECIALIZATION_NUMERIC_TYPE(quint32)
|
||||||
//SPECIALIZATION_NUMERIC_TYPE(quint64)
|
SPECIALIZATION_NUMERIC_TYPE(quint64)
|
||||||
|
|
||||||
//SPECIALIZATION_NUMERIC_TYPE(qreal)
|
SPECIALIZATION_NUMERIC_TYPE(qreal)
|
||||||
|
SPECIALIZATION_NUMERIC_TYPE(float)
|
||||||
|
|
||||||
NUT_END_NAMESPACE
|
NUT_END_NAMESPACE
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@
|
||||||
NUT_BEGIN_NAMESPACE
|
NUT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
class NUT_EXPORT Query : public QueryBase
|
class Query : public QueryBase
|
||||||
{
|
{
|
||||||
QueryPrivate *d_ptr;
|
QueryPrivate *d_ptr;
|
||||||
Q_DECLARE_PRIVATE(Query)
|
Q_DECLARE_PRIVATE(Query)
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ class Database;
|
||||||
class TableSetBase;
|
class TableSetBase;
|
||||||
class QueryBase;
|
class QueryBase;
|
||||||
struct RelationModel;
|
struct RelationModel;
|
||||||
class QueryPrivate : public QSharedData {
|
class NUT_EXPORT QueryPrivate : public QSharedData {
|
||||||
QueryBase *q_ptr;
|
QueryBase *q_ptr;
|
||||||
Q_DECLARE_PUBLIC(QueryBase)
|
Q_DECLARE_PUBLIC(QueryBase)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ NUT_BEGIN_NAMESPACE
|
||||||
//TODO: remove this class
|
//TODO: remove this class
|
||||||
class Table;
|
class Table;
|
||||||
class TableSetBase;
|
class TableSetBase;
|
||||||
class QueryBase : public QObject
|
class NUT_EXPORT QueryBase : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ NUT_BEGIN_NAMESPACE
|
||||||
class SqlModel;
|
class SqlModel;
|
||||||
class Table;
|
class Table;
|
||||||
class TableModel;
|
class TableModel;
|
||||||
class SqlModelPrivate : public QSharedData {
|
class NUT_EXPORT SqlModelPrivate : public QSharedData {
|
||||||
public:
|
public:
|
||||||
explicit SqlModelPrivate(SqlModel *parent);
|
explicit SqlModelPrivate(SqlModel *parent);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -65,5 +65,4 @@ SOURCES += \
|
||||||
$$PWD/phrases/phraselist.cpp \
|
$$PWD/phrases/phraselist.cpp \
|
||||||
$$PWD/phrases/datephrase.cpp
|
$$PWD/phrases/datephrase.cpp
|
||||||
|
|
||||||
|
|
||||||
include($$PWD/../3rdparty/serializer/src/src.pri)
|
include($$PWD/../3rdparty/serializer/src/src.pri)
|
||||||
|
|
|
||||||
72
src/src.pro
72
src/src.pro
|
|
@ -4,7 +4,73 @@ TARGET = nut
|
||||||
TEMPLATE = lib
|
TEMPLATE = lib
|
||||||
CONFIG += c++11
|
CONFIG += c++11
|
||||||
|
|
||||||
DEFINES += QT_DEPRECATED_WARNINGS NUT_COMPILE_STATIC
|
DEFINES += QT_DEPRECATED_WARNINGS NUT_SHARED NUT_BUILD_LIB
|
||||||
|
|
||||||
include($$PWD/src.pri)
|
DEFINES += NUT_SHARED_POINTER
|
||||||
include($$PWD/../ci-test-init.pri)
|
|
||||||
|
HEADERS += \
|
||||||
|
$$PWD/generators/sqlgeneratorbase_p.h \
|
||||||
|
$$PWD/generators/postgresqlgenerator.h \
|
||||||
|
$$PWD/generators/mysqlgenerator.h \
|
||||||
|
$$PWD/generators/sqlitegenerator.h \
|
||||||
|
$$PWD/generators/sqlservergenerator.h \
|
||||||
|
$$PWD/tablesetbasedata.h \
|
||||||
|
$$PWD/types/dbgeography.h \
|
||||||
|
$$PWD/tableset.h \
|
||||||
|
$$PWD/defines_p.h \
|
||||||
|
$$PWD/defines.h \
|
||||||
|
$$PWD/query.h \
|
||||||
|
$$PWD/databasemodel.h \
|
||||||
|
$$PWD/changelogtable.h \
|
||||||
|
$$PWD/tablesetbase_p.h \
|
||||||
|
$$PWD/querybase_p.h \
|
||||||
|
$$PWD/tablemodel.h \
|
||||||
|
$$PWD/query_p.h \
|
||||||
|
$$PWD/table.h \
|
||||||
|
$$PWD/database.h \
|
||||||
|
$$PWD/database_p.h \
|
||||||
|
$$PWD/serializableobject.h \
|
||||||
|
$$PWD/sqlmodel.h \
|
||||||
|
$$PWD/sqlmodel_p.h \
|
||||||
|
$$PWD/phrase.h \
|
||||||
|
$$PWD/phrases/abstractfieldphrase.h \
|
||||||
|
$$PWD/phrases/assignmentphrase.h \
|
||||||
|
$$PWD/phrases/assignmentphraselist.h \
|
||||||
|
$$PWD/phrases/conditionalphrase.h \
|
||||||
|
$$PWD/phrases/fieldphrase.h \
|
||||||
|
$$PWD/phrases/phrasedata.h \
|
||||||
|
$$PWD/phrases/phrasedatalist.h \
|
||||||
|
$$PWD/phrases/phraselist.h \
|
||||||
|
$$PWD/phrases/datephrase.h \
|
||||||
|
$$PWD/table_p.h
|
||||||
|
|
||||||
|
SOURCES += \
|
||||||
|
$$PWD/generators/sqlgeneratorbase.cpp \
|
||||||
|
$$PWD/generators/postgresqlgenerator.cpp \
|
||||||
|
$$PWD/generators/mysqlgenerator.cpp \
|
||||||
|
$$PWD/generators/sqlitegenerator.cpp \
|
||||||
|
$$PWD/generators/sqlservergenerator.cpp \
|
||||||
|
$$PWD/types/dbgeography.cpp \
|
||||||
|
$$PWD/tableset.cpp \
|
||||||
|
$$PWD/query.cpp \
|
||||||
|
$$PWD/databasemodel.cpp \
|
||||||
|
$$PWD/tablesetbase.cpp \
|
||||||
|
$$PWD/changelogtable.cpp \
|
||||||
|
$$PWD/querybase.cpp \
|
||||||
|
$$PWD/tablemodel.cpp \
|
||||||
|
$$PWD/table.cpp \
|
||||||
|
$$PWD/database.cpp \
|
||||||
|
$$PWD/serializableobject.cpp \
|
||||||
|
$$PWD/sqlmodel.cpp \
|
||||||
|
$$PWD/phrase.cpp \
|
||||||
|
$$PWD/phrases/abstractfieldphrase.cpp \
|
||||||
|
$$PWD/phrases/assignmentphrase.cpp \
|
||||||
|
$$PWD/phrases/assignmentphraselist.cpp \
|
||||||
|
$$PWD/phrases/conditionalphrase.cpp \
|
||||||
|
$$PWD/phrases/fieldphrase.cpp \
|
||||||
|
$$PWD/phrases/phrasedata.cpp \
|
||||||
|
$$PWD/phrases/phrasedatalist.cpp \
|
||||||
|
$$PWD/phrases/phraselist.cpp \
|
||||||
|
$$PWD/phrases/datephrase.cpp
|
||||||
|
|
||||||
|
include($$PWD/../3rdparty/serializer/src/src.pri)
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ class QJsonObject;
|
||||||
NUT_BEGIN_NAMESPACE
|
NUT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
class TableModel;
|
class TableModel;
|
||||||
struct FieldModel{
|
struct NUT_EXPORT FieldModel{
|
||||||
explicit FieldModel() : name(QString()), defaultValue(QString())
|
explicit FieldModel() : name(QString()), defaultValue(QString())
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ class BulkInserter;
|
||||||
class Database;
|
class Database;
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
class NUT_EXPORT TableSet : public TableSetBase
|
class TableSet : public TableSetBase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef T value_type;
|
typedef T value_type;
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ NUT_BEGIN_NAMESPACE
|
||||||
class Table;
|
class Table;
|
||||||
class Database;
|
class Database;
|
||||||
class TableSetBaseData;
|
class TableSetBaseData;
|
||||||
class TableSetBase : public QObject
|
class NUT_EXPORT TableSetBase : public QObject
|
||||||
{
|
{
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,12 @@
|
||||||
win32 {
|
win32 {
|
||||||
CONFIG(debug,debug|release): LIBDIR = $$absolute_path($$OUT_PWD/../../src/debug)
|
CONFIG(debug,debug|release): LIBDIR = $$absolute_path($$OUT_PWD/../../src/debug)
|
||||||
CONFIG(release,debug|release): LIBDIR = $$absolute_path($$OUT_PWD/../../src/release)
|
CONFIG(release,debug|release): LIBDIR = $$absolute_path($$OUT_PWD/../../src/release)
|
||||||
} else {
|
} else {
|
||||||
LIBDIR = $$absolute_path($$OUT_PWD/../../src)
|
LIBDIR = $$absolute_path($$OUT_PWD/../../src)
|
||||||
}
|
}
|
||||||
|
|
||||||
LIBS += -L$$LIBDIR -lnut
|
LIBS += -L$$LIBDIR -lnut
|
||||||
INCLUDEPATH += $$PWD/../../src $$PWD/../common
|
INCLUDEPATH += $$PWD/../../src $$PWD/../common
|
||||||
|
|
||||||
DEFINES += NUT_SHARED_POINTER
|
DEFINES += NUT_SHARED_POINTER
|
||||||
|
DEFINES += NUT_PATH=\\\"$$PWD/../../\\\"
|
||||||
|
|
|
||||||
|
|
@ -24,4 +24,3 @@ HEADERS += \
|
||||||
../common/score.h \
|
../common/score.h \
|
||||||
tst_basic.h
|
tst_basic.h
|
||||||
|
|
||||||
include($$PWD/../../ci-test-init.pri)
|
|
||||||
|
|
|
||||||
|
|
@ -24,4 +24,3 @@ HEADERS += \
|
||||||
../common/score.h \
|
../common/score.h \
|
||||||
tst_benchmark.h
|
tst_benchmark.h
|
||||||
|
|
||||||
include($$PWD/../../ci-test-init.pri)
|
|
||||||
|
|
|
||||||
|
|
@ -16,5 +16,3 @@ HEADERS += \
|
||||||
db.h \
|
db.h \
|
||||||
sampletable.h \
|
sampletable.h \
|
||||||
tst_datatypes.h
|
tst_datatypes.h
|
||||||
|
|
||||||
include($$PWD/../../ci-test-init.pri)
|
|
||||||
|
|
|
||||||
|
|
@ -17,4 +17,3 @@ HEADERS += \
|
||||||
sampletable.h \
|
sampletable.h \
|
||||||
tst_datetime.h
|
tst_datetime.h
|
||||||
|
|
||||||
include($$PWD/../../ci-test-init.pri)
|
|
||||||
|
|
|
||||||
|
|
@ -12,5 +12,3 @@ SOURCES += \
|
||||||
|
|
||||||
HEADERS += \
|
HEADERS += \
|
||||||
tst_generators.h
|
tst_generators.h
|
||||||
|
|
||||||
include($$PWD/../../ci-test-init.pri)
|
|
||||||
|
|
|
||||||
|
|
@ -15,5 +15,3 @@ HEADERS += \
|
||||||
tst_json.h \
|
tst_json.h \
|
||||||
db.h \
|
db.h \
|
||||||
sampletable.h
|
sampletable.h
|
||||||
|
|
||||||
include($$PWD/../../ci-test-init.pri)
|
|
||||||
|
|
|
||||||
|
|
@ -13,4 +13,3 @@ SOURCES += \
|
||||||
HEADERS += \
|
HEADERS += \
|
||||||
tst_phrases.h
|
tst_phrases.h
|
||||||
|
|
||||||
include($$PWD/../../ci-test-init.pri)
|
|
||||||
|
|
|
||||||
|
|
@ -17,4 +17,3 @@ HEADERS += \
|
||||||
test.h \
|
test.h \
|
||||||
tst_uuid.h
|
tst_uuid.h
|
||||||
|
|
||||||
include($$PWD/../../ci-test-init.pri)
|
|
||||||
|
|
|
||||||
|
|
@ -23,4 +23,3 @@ HEADERS += \
|
||||||
db3.h \
|
db3.h \
|
||||||
table3.h
|
table3.h
|
||||||
|
|
||||||
include($$PWD/../../ci-test-init.pri)
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue