diff options
author | Michal Klocek <michal.klocek@qt.io> | 2020-07-27 11:26:15 +0200 |
---|---|---|
committer | Michal Klocek <michal.klocek@qt.io> | 2020-11-06 12:17:43 +0100 |
commit | 71cb91cfba5ab7db2b2415a48881aeba37d71438 (patch) | |
tree | 95f91556531ee6a7d153315cd3e5359cf0dce177 /tests/auto | |
parent | 36c9c74023edb39d6ab64fb0d6c789575cdccdbd (diff) |
Add datetimeaxis to configure system
This handles also qreal as float detection.
Change-Id: I6b975f487f4d244849c306a703e5f25172acec8e
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/auto.pro | 7 | ||||
-rw-r--r-- | tests/auto/chartdataset/chartdataset.pro | 1 | ||||
-rw-r--r-- | tests/auto/chartdataset/tst_chartdataset.cpp | 6 | ||||
-rw-r--r-- | tests/auto/qml/qml.pro | 1 | ||||
-rw-r--r-- | tests/auto/qml/tst_qml.cpp | 4 |
5 files changed, 9 insertions, 10 deletions
diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro index 81557a7f..8e180c3d 100644 --- a/tests/auto/auto.pro +++ b/tests/auto/auto.pro @@ -1,3 +1,5 @@ +include($$OUT_PWD/../../src/charts/qtcharts-config.pri) +QT_FOR_CONFIG += charts TEMPLATE = subdirs SUBDIRS += \ qchartview \ @@ -29,9 +31,8 @@ SUBDIRS += \ qcandlestickseries \ qcandlestickset -!contains(QT_COORD_TYPE, float): { - SUBDIRS += \ - qdatetimeaxis +qtConfig(charts-datetime-axis) { + SUBDIRS += qdatetimeaxis } qtHaveModule(quick) { diff --git a/tests/auto/chartdataset/chartdataset.pro b/tests/auto/chartdataset/chartdataset.pro index d5c18732..22307d02 100644 --- a/tests/auto/chartdataset/chartdataset.pro +++ b/tests/auto/chartdataset/chartdataset.pro @@ -3,6 +3,5 @@ } QT += charts-private core-private -contains(QT_COORD_TYPE, float): DEFINES += QT_QREAL_IS_FLOAT SOURCES += tst_chartdataset.cpp diff --git a/tests/auto/chartdataset/tst_chartdataset.cpp b/tests/auto/chartdataset/tst_chartdataset.cpp index b3f40198..d9b3dbe1 100644 --- a/tests/auto/chartdataset/tst_chartdataset.cpp +++ b/tests/auto/chartdataset/tst_chartdataset.cpp @@ -33,7 +33,7 @@ #include <QtCharts/qlogvalueaxis.h> #include <QtCharts/qbarcategoryaxis.h> #include <QtCharts/qcategoryaxis.h> -#ifndef QT_QREAL_IS_FLOAT +#if QT_CONFIG(charts_datetime_axis) #include <QtCharts/qdatetimeaxis.h> #endif #include <QtCharts/qlineseries.h> @@ -213,7 +213,7 @@ void tst_ChartDataSet::addAxis_data() QAbstractAxis* logvalue = new QLogValueAxis(this); QAbstractAxis* category = new QCategoryAxis(this); QAbstractAxis* barcategory = new QBarCategoryAxis(this); -#ifndef QT_QREAL_IS_FLOAT +#if QT_CONFIG(charts_datetime_axis) QAbstractAxis* datetime = new QDateTimeAxis(this); #endif @@ -221,7 +221,7 @@ void tst_ChartDataSet::addAxis_data() QTest::newRow("logvalue") << logvalue; QTest::newRow("category") << category; QTest::newRow("barcategory") << barcategory; -#ifndef QT_QREAL_IS_FLOAT +#if QT_CONFIG(charts_datetime_axis) QTest::newRow("datetime") << datetime; #endif } diff --git a/tests/auto/qml/qml.pro b/tests/auto/qml/qml.pro index c7b808de..f116195d 100644 --- a/tests/auto/qml/qml.pro +++ b/tests/auto/qml/qml.pro @@ -3,4 +3,3 @@ } SOURCES += tst_qml.cpp QT += qml quick -contains(QT_COORD_TYPE, float): DEFINES += QT_QREAL_IS_FLOAT diff --git a/tests/auto/qml/tst_qml.cpp b/tests/auto/qml/tst_qml.cpp index b397f3d8..f6f63ed6 100644 --- a/tests/auto/qml/tst_qml.cpp +++ b/tests/auto/qml/tst_qml.cpp @@ -140,7 +140,7 @@ void tst_qml::checkPlugin_data() QTest::newRow("HBarModelMapper") << imports_1_1() + "HBarModelMapper{}"; QTest::newRow("VBarModelMapper") << imports_1_1() + "VBarModelMapper{}"; QTest::newRow("ValueAxis") << imports_1_1() + "ValueAxis{}"; -#ifndef QT_QREAL_IS_FLOAT +#if QT_CONFIG(charts_datetime_axis) QTest::newRow("DateTimeAxis") << imports_1_1() + "DateTimeAxis{}"; #endif QTest::newRow("CategoryAxis") << imports_1_1() + "CategoryAxis{}"; @@ -176,7 +176,7 @@ void tst_qml::checkPlugin_data() QTest::newRow("HBarModelMapper_2_0") << imports_2_0() + "HBarModelMapper{}"; QTest::newRow("VBarModelMapper_2_0") << imports_2_0() + "VBarModelMapper{}"; QTest::newRow("ValueAxis_2_0") << imports_2_0() + "ValueAxis{}"; -#ifndef QT_QREAL_IS_FLOAT +#if QT_CONFIG(charts_datetime_axis) QTest::newRow("DateTimeAxis_2_0") << imports_2_0() + "DateTimeAxis{}"; #endif QTest::newRow("CategoryAxis_2_0") << imports_2_0() + "CategoryAxis{}"; |