diff --git a/Eigen/QtAlignedMalloc b/Eigen/QtAlignedMalloc index dba7cb29e..b10489dd5 100644 --- a/Eigen/QtAlignedMalloc +++ b/Eigen/QtAlignedMalloc @@ -1,8 +1,21 @@ - #ifndef EIGEN_QTMALLOC_MODULE_H #define EIGEN_QTMALLOC_MODULE_H +#ifdef QVECTOR_H +#error You must include before . +#endif + +#ifdef Q_DECL_IMPORT + #define Q_DECL_IMPORT_ORIG Q_DECL_IMPORT + #undef Q_DECL_IMPORT + #define Q_DECL_IMPORT +#else + #define Q_DECL_IMPORT +#endif + #include "Core" + +#include #include #if (!EIGEN_MALLOC_ALREADY_ALIGNED) @@ -37,4 +50,11 @@ QVectorData *QVectorData::malloc(int sizeofTypedData, int size, int sizeofT, QVe #endif +#ifdef Q_DECL_IMPORT_ORIG + #define Q_DECL_IMPORT Q_DECL_IMPORT_ORIG + #undef Q_DECL_IMPORT_ORIG +#else + #undef Q_DECL_IMPORT +#endif + #endif // EIGEN_QTMALLOC_MODULE_H diff --git a/test/qtvector.cpp b/test/qtvector.cpp index 79bcba675..79c55b631 100644 --- a/test/qtvector.cpp +++ b/test/qtvector.cpp @@ -26,10 +26,12 @@ #define EIGEN_WORK_AROUND_QT_BUG_CALLING_WRONG_OPERATOR_NEW_FIXED_IN_QT_4_5 #include "main.h" -#include + #include #include +#include + template void check_qtvector_matrix(const MatrixType& m) {