From 5c50b9f6fefd52e89417a2d526c4f94e2c1158bd 2016-05-19 18:49:59 From: Oswald Buddenhagen Date: 2016-05-19 18:49:59 Subject: [PATCH] use standardized test export macros note that debug build != developer build. Change-Id: Ia3e4b4d2f80e7126ad9a2461642c93321099cc27 Reviewed-by: Miikka Heikkinen Reviewed-by: Tomi Korpipää --- diff --git a/src/charts/charts.pro b/src/charts/charts.pro index d5e9160..bc8d69e 100644 --- a/src/charts/charts.pro +++ b/src/charts/charts.pro @@ -75,11 +75,6 @@ OTHER_FILES += doc/qtcharts.qdocconf \ doc/src/* \ doc/images/* -#Define for unit tests -CONFIG(debug, debug|release) { - DEFINES += BUILD_PRIVATE_UNIT_TESTS -} - msvc { # Suppress "conversion from 'size_t' to 'int', possible loss of data" warnings in 64bit # builds resulting from usage of str::sort diff --git a/src/charts/qchartglobal.h b/src/charts/qchartglobal.h index 81a7f55..76d3cf2 100644 --- a/src/charts/qchartglobal.h +++ b/src/charts/qchartglobal.h @@ -44,14 +44,7 @@ # define QT_CHARTS_EXPORT #endif -#if defined(BUILD_PRIVATE_UNIT_TESTS) && defined(QT_BUILD_CHARTS_LIB) -# define QT_CHARTS_AUTOTEST_EXPORT Q_DECL_EXPORT -#elif defined(BUILD_PRIVATE_UNIT_TESTS) && !defined(QT_BUILD_CHARTS_LIB) -# define QT_CHARTS_AUTOTEST_EXPORT Q_DECL_IMPORT -#else -# define QT_CHARTS_AUTOTEST_EXPORT -#endif - +#define QT_CHARTS_AUTOTEST_EXPORT Q_AUTOTEST_EXPORT #define QT_CHARTS_NAMESPACE QtCharts diff --git a/tests/auto/auto.pri b/tests/auto/auto.pri index 9d3ed05..a04f5b2 100644 --- a/tests/auto/auto.pri +++ b/tests/auto/auto.pri @@ -8,8 +8,3 @@ QT += testlib widgets INCLUDEPATH += ../inc HEADERS += ../inc/tst_definitions.h - -#Define for unit tests -CONFIG(debug, debug|release) { - DEFINES += BUILD_PRIVATE_UNIT_TESTS -} diff --git a/tests/auto/chartdataset/tst_chartdataset.cpp b/tests/auto/chartdataset/tst_chartdataset.cpp index 60abd45..fcbb34b 100644 --- a/tests/auto/chartdataset/tst_chartdataset.cpp +++ b/tests/auto/chartdataset/tst_chartdataset.cpp @@ -18,7 +18,7 @@ ** $QT_END_LICENSE$ ** ******************************************************************************/ -#ifndef BUILD_PRIVATE_UNIT_TESTS +#ifndef QT_BUILD_INTERNAL #include class tst_ChartDataSet: public QObject { @@ -32,7 +32,7 @@ private Q_SLOTS: void tst_ChartDataSet::skip() { - QSKIP("This test requires the debug version of library"); + QSKIP("This test requires a developer build of the library"); } QTEST_MAIN(tst_ChartDataSet) diff --git a/tests/auto/domain/tst_domain.cpp b/tests/auto/domain/tst_domain.cpp index 299d93f..8b960ea 100644 --- a/tests/auto/domain/tst_domain.cpp +++ b/tests/auto/domain/tst_domain.cpp @@ -18,7 +18,7 @@ ** $QT_END_LICENSE$ ** ******************************************************************************/ -#ifndef BUILD_PRIVATE_UNIT_TESTS +#ifndef QT_BUILD_INTERNAL #include @@ -33,7 +33,7 @@ private Q_SLOTS: void tst_Domain::skip() { - QSKIP("This test requires the debug version of library"); + QSKIP("This test requires a developer build of the library"); } QTEST_MAIN(tst_Domain)