diff --git a/.qmake.conf b/.qmake.conf index ddabfea..1fe224d 100644 --- a/.qmake.conf +++ b/.qmake.conf @@ -1,4 +1,3 @@ load(qt_build_config) -CONFIG += qt_example_installs MODULE_VERSION=5.7.0 diff --git a/src/charts/animations/animations.pri b/src/charts/animations/animations.pri index 28b6db1..ccfafd8 100644 --- a/src/charts/animations/animations.pri +++ b/src/charts/animations/animations.pri @@ -1,5 +1,4 @@ INCLUDEPATH += $$PWD -DEPENDPATH += $$PWD SOURCES += \ $$PWD/axisanimation.cpp \ diff --git a/src/charts/areachart/areachart.pri b/src/charts/areachart/areachart.pri index af5fa60..4f26f01 100644 --- a/src/charts/areachart/areachart.pri +++ b/src/charts/areachart/areachart.pri @@ -1,5 +1,4 @@ INCLUDEPATH += $$PWD -DEPENDPATH += $$PWD SOURCES += \ $$PWD/areachartitem.cpp \ diff --git a/src/charts/axis/axis.pri b/src/charts/axis/axis.pri index 445782c..340f5b3 100644 --- a/src/charts/axis/axis.pri +++ b/src/charts/axis/axis.pri @@ -6,12 +6,6 @@ INCLUDEPATH += $$PWD \ $$PWD/categoryaxis \ $$PWD/logvalueaxis -DEPENDPATH += $$PWD \ - $$PWD/valueaxis \ - $$PWD/barcategoryaxis \ - $$PWD/categoryaxis \ - $$PWD/logvalueaxis - SOURCES += \ $$PWD/chartaxiselement.cpp \ $$PWD/cartesianchartaxis.cpp \ @@ -85,9 +79,6 @@ PRIVATE_HEADERS += \ INCLUDEPATH += \ $$PWD/datetimeaxis -DEPENDPATH += \ - $$PWD/datetimeaxis - SOURCES += \ $$PWD/datetimeaxis/chartdatetimeaxisx.cpp \ $$PWD/datetimeaxis/chartdatetimeaxisy.cpp \ diff --git a/src/charts/barchart/barchart.pri b/src/charts/barchart/barchart.pri index 0e78d23..06123e6 100644 --- a/src/charts/barchart/barchart.pri +++ b/src/charts/barchart/barchart.pri @@ -8,14 +8,6 @@ INCLUDEPATH += $$PWD \ $$PWD/horizontal/stacked \ $$PWD/horizontal/percent -DEPENDPATH += $$PWD \ - $$PWD/vertical/bar \ - $$PWD/vertical/stacked \ - $$PWD/vertical/percent \ - $$PWD/horizontal/bar \ - $$PWD/horizontal/stacked \ - $$PWD/horizontal/percent - SOURCES += \ $$PWD/bar.cpp \ $$PWD/abstractbarchartitem.cpp \ diff --git a/src/charts/boxplotchart/boxplotchart.pri b/src/charts/boxplotchart/boxplotchart.pri index db6e034..dffaf98 100644 --- a/src/charts/boxplotchart/boxplotchart.pri +++ b/src/charts/boxplotchart/boxplotchart.pri @@ -1,5 +1,4 @@ INCLUDEPATH += $$PWD -DEPENDPATH += $$PWD SOURCES += \ $$PWD/boxplotchartitem.cpp \ diff --git a/src/charts/charts.pro b/src/charts/charts.pro index 30546fd..0867f0f 100644 --- a/src/charts/charts.pro +++ b/src/charts/charts.pro @@ -2,20 +2,11 @@ TARGET = QtCharts -message($$QT_CONFIG) QT = core gui widgets -DEFINES += QT_CHARTS_LIBRARY contains(QT_COORD_TYPE, float): DEFINES += QT_QREAL_IS_FLOAT -# Fix exports in static builds for applications linking charts module -static: MODULE_DEFINES += QT_CHARTS_STATICLIB - -MODULE_INCNAME = QtCharts - QMAKE_DOCS = $$PWD/doc/qtcharts.qdocconf -load(qt_module) - QMAKE_TARGET_PRODUCT = "Qt Charts (Qt $$QT_VERSION)" QMAKE_TARGET_DESCRIPTION = "Charts component for Qt." @@ -62,7 +53,6 @@ PUBLIC_HEADERS += \ $$PWD/chartsnamespace.h \ $$PWD/qpolarchart.h -include($$PWD/common.pri) include($$PWD/animations/animations.pri) include($$PWD/areachart/areachart.pri) include($$PWD/axis/axis.pri) @@ -96,3 +86,5 @@ win32:!winrt:!wince { # ChartThemeSystem uses Windows native API LIBS += -luser32 } + +load(qt_module) diff --git a/src/charts/common.pri b/src/charts/common.pri deleted file mode 100644 index 1d5b649..0000000 --- a/src/charts/common.pri +++ /dev/null @@ -1,15 +0,0 @@ -INCLUDEPATH += $$PWD/ \ - $$PWD/animations \ - $$PWD/areachart \ - $$PWD/axis \ - $$PWD/barchart \ - $$PWD/boxplotchart \ - $$PWD/domain \ - $$PWD/layout \ - $$PWD/legend \ - $$PWD/linechart \ - $$PWD/piechart \ - $$PWD/scatterchart \ - $$PWD/splinechart \ - $$PWD/themes \ - $$PWD/xychart diff --git a/src/charts/domain/domain.pri b/src/charts/domain/domain.pri index ab4fcfc..69a7b9f 100644 --- a/src/charts/domain/domain.pri +++ b/src/charts/domain/domain.pri @@ -1,7 +1,6 @@ #Subdirectiores are defined here, because qt creator doesn't handle nested include(foo.pri) chains very well. INCLUDEPATH += $$PWD -DEPENDPATH += $$PWD SOURCES += \ $$PWD/abstractdomain.cpp \ diff --git a/src/charts/layout/layout.pri b/src/charts/layout/layout.pri index 159eab1..0400589 100644 --- a/src/charts/layout/layout.pri +++ b/src/charts/layout/layout.pri @@ -1,5 +1,4 @@ INCLUDEPATH += $$PWD -DEPENDPATH += $$PWD SOURCES += \ $$PWD/abstractchartlayout.cpp \ diff --git a/src/charts/legend/legend.pri b/src/charts/legend/legend.pri index c14cf6b..73ff719 100644 --- a/src/charts/legend/legend.pri +++ b/src/charts/legend/legend.pri @@ -1,5 +1,4 @@ INCLUDEPATH += $$PWD -DEPENDPATH += $$PWD SOURCES += \ $$PWD/qlegend.cpp \ diff --git a/src/charts/linechart/linechart.pri b/src/charts/linechart/linechart.pri index 573b23d..d0a0f9e 100644 --- a/src/charts/linechart/linechart.pri +++ b/src/charts/linechart/linechart.pri @@ -1,5 +1,4 @@ INCLUDEPATH += $$PWD -DEPENDPATH += $$PWD SOURCES += \ $$PWD/linechartitem.cpp \ diff --git a/src/charts/piechart/piechart.pri b/src/charts/piechart/piechart.pri index 2c45c4e..d20d1a9 100644 --- a/src/charts/piechart/piechart.pri +++ b/src/charts/piechart/piechart.pri @@ -1,5 +1,4 @@ INCLUDEPATH += $$PWD -DEPENDPATH += $$PWD SOURCES += \ $$PWD/qpieseries.cpp \ diff --git a/src/charts/qchartglobal.h b/src/charts/qchartglobal.h index 1c4a668..4a0d560 100644 --- a/src/charts/qchartglobal.h +++ b/src/charts/qchartglobal.h @@ -42,19 +42,18 @@ */ #define QT_CHARTS_VERSION_CHECK(major, minor, patch) ((major<<16)|(minor<<8)|(patch)) -#if defined(QT_CHARTS_LIBRARY) -# define QT_CHARTS_EXPORT Q_DECL_EXPORT +#ifndef QT_STATIC +# if defined(QT_BUILD_CHARTS_LIB) +# define QT_CHARTS_EXPORT Q_DECL_EXPORT +# else +# define QT_CHARTS_EXPORT Q_DECL_IMPORT +# endif #else -# define QT_CHARTS_EXPORT Q_DECL_IMPORT -#endif - -#ifdef QT_CHARTS_STATICLIB -# undef QT_CHARTS_EXPORT -# undef Q_AUTOTEST_EXPORT # define QT_CHARTS_EXPORT -# define Q_AUTOTEST_EXPORT #endif +#define QT_CHARTS_AUTOTEST_EXPORT Q_AUTOTEST_EXPORT + #define QT_CHARTS_NAMESPACE QtCharts #ifdef QT_CHARTS_NAMESPACE diff --git a/src/charts/scatterchart/scatter.pri b/src/charts/scatterchart/scatter.pri index fcbd119..e235c11 100644 --- a/src/charts/scatterchart/scatter.pri +++ b/src/charts/scatterchart/scatter.pri @@ -1,5 +1,4 @@ INCLUDEPATH += $$PWD -DEPENDPATH += $$PWD SOURCES += \ $$PWD/qscatterseries.cpp \ diff --git a/src/charts/splinechart/splinechart.pri b/src/charts/splinechart/splinechart.pri index 4038685..b103625 100644 --- a/src/charts/splinechart/splinechart.pri +++ b/src/charts/splinechart/splinechart.pri @@ -1,5 +1,4 @@ INCLUDEPATH += $$PWD -DEPENDPATH += $$PWD SOURCES += \ $$PWD/qsplineseries.cpp \ diff --git a/src/charts/themes/themes.pri b/src/charts/themes/themes.pri index 656552a..49b9735 100644 --- a/src/charts/themes/themes.pri +++ b/src/charts/themes/themes.pri @@ -1,5 +1,4 @@ INCLUDEPATH += $$PWD -DEPENDPATH += $$PWD THEMES += \ $$PWD/charttheme_p.h \ diff --git a/src/charts/xychart/xychart.pri b/src/charts/xychart/xychart.pri index 1c5efb9..e314faa 100644 --- a/src/charts/xychart/xychart.pri +++ b/src/charts/xychart/xychart.pri @@ -1,5 +1,4 @@ -#INCLUDEPATH += $$PWD -#DEPENDPATH += $$PWD +INCLUDEPATH += $$PWD SOURCES += \ $$PWD/xychart.cpp \ diff --git a/src/chartsqml2/chartsqml2.pro b/src/chartsqml2/chartsqml2.pro index fae7dc2..cadfd15 100644 --- a/src/chartsqml2/chartsqml2.pro +++ b/src/chartsqml2/chartsqml2.pro @@ -1,24 +1,13 @@ TARGET = qtchartsqml2 +CXX_MODULE = charts + QT += qml quick QT += charts charts-private -TARGETPATH = QtCharts contains(QT_COORD_TYPE, float): DEFINES += QT_QREAL_IS_FLOAT -IMPORT_VERSION = $$MODULE_VERSION - -# Only build qml plugin static if Qt itself is also built static -!contains(QT_CONFIG, static): CONFIG -= static staticlib - include($$PWD/designer/designer.pri) -INCLUDEPATH += ../../include \ - ../../include/QtCharts \ - ../charts \ - ../charts/animations \ - ../charts/axis \ - ../charts/domain - SOURCES += \ chartsqml2_plugin.cpp \ declarativechart.cpp \ @@ -56,18 +45,9 @@ HEADERS += \ declarativechartnode.h \ declarativerendernode.h -OTHER_FILES = qmldir - -CONFIG += no_cxx_module - load(qml_plugin) win32 { - CONFIG += skip_target_version_ext - VERSION = $$MODULE_VERSION QMAKE_TARGET_PRODUCT = "Qt Charts (Qt $$QT_VERSION)" QMAKE_TARGET_DESCRIPTION = "Charts QML plugin for Qt." } - -QML_FILES += \ - $$PWD/plugins.qmltypes