From 7c876b9cdc1cf836496ca70ebd2773c3ad2a83c9 Mon Sep 17 00:00:00 2001 From: tianduanrui <2407223896@qq.com> Date: Thu, 23 Nov 2017 19:47:14 +0800 Subject: [PATCH] fix math ml export --- src/exquisite/mathml/qtmmlwidget.h | 25 ++++++++++++------------- src/qqt_3rdparty.pri | 11 ++++++++++- 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/src/exquisite/mathml/qtmmlwidget.h b/src/exquisite/mathml/qtmmlwidget.h index 4f5a511f..f20dd7fc 100644 --- a/src/exquisite/mathml/qtmmlwidget.h +++ b/src/exquisite/mathml/qtmmlwidget.h @@ -64,20 +64,19 @@ class MmlDocument; -#if defined(Q_WS_WIN) -# if !defined(QT_QTMMLWIDGET_EXPORT) && !defined(QT_QTMMLWIDGET_IMPORT) -# define QT_QTMMLWIDGET_EXPORT -# elif defined(QT_QTMMLWIDGET_IMPORT) -# if defined(QT_QTMMLWIDGET_EXPORT) -# undef QT_QTMMLWIDGET_EXPORT -# endif -# define QT_QTMMLWIDGET_EXPORT __declspec(dllimport) -# elif defined(QT_QTMMLWIDGET_EXPORT) -# undef QT_QTMMLWIDGET_EXPORT -# define QT_QTMMLWIDGET_EXPORT __declspec(dllexport) -# endif +#include +#if defined(Q_OS_WIN) +//dynamic and static are different +#if defined(QT_QTMMLWIDGET_LIBRARY) +# define QT_QTMMLWIDGET_EXPORT Q_DECL_EXPORT +#elif defined(QT_QTMMLWIDGET_STATIC_LIBRARY) +# define QT_QTMMLWIDGET_EXPORT #else -# define QT_QTMMLWIDGET_EXPORT +# define QT_QTMMLWIDGET_EXPORT Q_DECL_IMPORT +#endif +#else +//dynamic and static are equal to each other +# define QT_QTMMLWIDGET_EXPORT #endif class QT_QTMMLWIDGET_EXPORT QtMmlWidget : public QFrame diff --git a/src/qqt_3rdparty.pri b/src/qqt_3rdparty.pri index b8ffe1ce..cc11e875 100644 --- a/src/qqt_3rdparty.pri +++ b/src/qqt_3rdparty.pri @@ -42,9 +42,18 @@ contains (DEFINES, __EXQUISITE__) { } contains (DEFINES, __EXQUISITE__) { - #gumbo widget + #mathml widget #DEFINES += __MATHSUPPORT__ contains (DEFINES, __MATHSUPPORT__) { + + contains(QKIT_PRIVATE, WIN32|WIN64) { + #mathml + contains (DEFINES, QQT_LIBRARY) { + DEFINES += QT_QTMMLWIDGET_LIBRARY + } else: contains (DEFINES, QQT_STATIC_LIBRARY) { + DEFINES += QT_QTMMLWIDGET_STATIC_LIBRARY + } + } SOURCES += $$PWD/exquisite/mathml/qtmmlwidget.cpp HEADERS += $$PWD/exquisite/mathml/qtmmlwidget.h }