summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>2016-05-18 13:15:52 +0200
committerOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>2016-05-19 18:49:59 +0000
commit5c50b9f6fefd52e89417a2d526c4f94e2c1158bd (patch)
tree068f9e6025a5560949203270b2e3f8566fa768ce
parent17cb2cde9c6a3377f948552c3c37d2eb3b813439 (diff)
use standardized test export macros
note that debug build != developer build. Change-Id: Ia3e4b4d2f80e7126ad9a2461642c93321099cc27 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@theqtcompany.com>
-rw-r--r--src/charts/charts.pro5
-rw-r--r--src/charts/qchartglobal.h9
-rw-r--r--tests/auto/auto.pri5
-rw-r--r--tests/auto/chartdataset/tst_chartdataset.cpp4
-rw-r--r--tests/auto/domain/tst_domain.cpp4
5 files changed, 5 insertions, 22 deletions
diff --git a/src/charts/charts.pro b/src/charts/charts.pro
index d5e9160a..bc8d69e9 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 81a7f557..76d3cf27 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 9d3ed05a..a04f5b23 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 60abd45a..fcbb34bc 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 <QtTest/QtTest>
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 299d93fa..8b960eae 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 <QtTest/QtTest>
@@ -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)