From aa5aba329d302d352bdb084318e53ca8654b6fb2 2016-01-14 11:47:01 From: Robin Burchell Date: 2016-01-14 11:47:01 Subject: [PATCH] charts: Follow Qt's already-existent -developer-build option. This means that rebuilding the entirety of Qt with -developer-build will get us all autotests. Furthermore, it fixes the situation on OS X where a debug_and_release build wouldn't actually fully link. In addition, we clean up the tests that were stubbed when internals aren't available to just not build/run them at all by checking private_tests. Change-Id: I5701559cd91df842f78346d7d6ad9295bee587d0 Reviewed-by: Miikka Heikkinen --- diff --git a/src/charts/axis/qabstractaxis_p.h b/src/charts/axis/qabstractaxis_p.h index 2a987e7..556f3db 100644 --- a/src/charts/axis/qabstractaxis_p.h +++ b/src/charts/axis/qabstractaxis_p.h @@ -57,7 +57,7 @@ class QAbstractSeries; class ChartTheme; class ChartElement; -class QT_CHARTS_AUTOTEST_EXPORT QAbstractAxisPrivate : public QObject +class Q_AUTOTEST_EXPORT QAbstractAxisPrivate : public QObject { Q_OBJECT public: diff --git a/src/charts/chartdataset_p.h b/src/charts/chartdataset_p.h index 82a81d2..85823c4 100644 --- a/src/charts/chartdataset_p.h +++ b/src/charts/chartdataset_p.h @@ -50,7 +50,7 @@ class QAbstractAxis; class ChartPresenter; class GLXYSeriesDataManager; -class QT_CHARTS_AUTOTEST_EXPORT ChartDataSet : public QObject +class Q_AUTOTEST_EXPORT ChartDataSet : public QObject { Q_OBJECT public: diff --git a/src/charts/charts.pro b/src/charts/charts.pro index 2ec6ce0..427432b 100644 --- a/src/charts/charts.pro +++ b/src/charts/charts.pro @@ -84,11 +84,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/domain/abstractdomain.cpp b/src/charts/domain/abstractdomain.cpp index 97cf555..fb906c6 100644 --- a/src/charts/domain/abstractdomain.cpp +++ b/src/charts/domain/abstractdomain.cpp @@ -234,7 +234,7 @@ bool AbstractDomain::detachAxis(QAbstractAxis *axis) // operators -bool QT_CHARTS_AUTOTEST_EXPORT operator== (const AbstractDomain &domain1, const AbstractDomain &domain2) +bool Q_AUTOTEST_EXPORT operator== (const AbstractDomain &domain1, const AbstractDomain &domain2) { return (qFuzzyIsNull(domain1.m_maxX - domain2.m_maxX) && qFuzzyIsNull(domain1.m_maxY - domain2.m_maxY) @@ -243,13 +243,13 @@ bool QT_CHARTS_AUTOTEST_EXPORT operator== (const AbstractDomain &domain1, const } -bool QT_CHARTS_AUTOTEST_EXPORT operator!= (const AbstractDomain &domain1, const AbstractDomain &domain2) +bool Q_AUTOTEST_EXPORT operator!= (const AbstractDomain &domain1, const AbstractDomain &domain2) { return !(domain1 == domain2); } -QDebug QT_CHARTS_AUTOTEST_EXPORT operator<<(QDebug dbg, const AbstractDomain &domain) +QDebug Q_AUTOTEST_EXPORT operator<<(QDebug dbg, const AbstractDomain &domain) { #ifdef QT_NO_TEXTSTREAM Q_UNUSED(domain) diff --git a/src/charts/domain/abstractdomain_p.h b/src/charts/domain/abstractdomain_p.h index f3d7425..1e1782b 100644 --- a/src/charts/domain/abstractdomain_p.h +++ b/src/charts/domain/abstractdomain_p.h @@ -47,7 +47,7 @@ QT_CHARTS_BEGIN_NAMESPACE class QAbstractAxis; -class QT_CHARTS_AUTOTEST_EXPORT AbstractDomain: public QObject +class Q_AUTOTEST_EXPORT AbstractDomain: public QObject { Q_OBJECT public: @@ -93,9 +93,9 @@ public: void storeZoomReset(); bool isZoomed() { return m_zoomed; } - friend bool QT_CHARTS_AUTOTEST_EXPORT operator== (const AbstractDomain &domain1, const AbstractDomain &domain2); - friend bool QT_CHARTS_AUTOTEST_EXPORT operator!= (const AbstractDomain &domain1, const AbstractDomain &domain2); - friend QDebug QT_CHARTS_AUTOTEST_EXPORT operator<<(QDebug dbg, const AbstractDomain &domain); + friend bool Q_AUTOTEST_EXPORT operator== (const AbstractDomain &domain1, const AbstractDomain &domain2); + friend bool Q_AUTOTEST_EXPORT operator!= (const AbstractDomain &domain1, const AbstractDomain &domain2); + friend QDebug Q_AUTOTEST_EXPORT operator<<(QDebug dbg, const AbstractDomain &domain); virtual void zoomIn(const QRectF &rect) = 0; virtual void zoomOut(const QRectF &rect) = 0; diff --git a/src/charts/domain/logxlogydomain.cpp b/src/charts/domain/logxlogydomain.cpp index 43aa7ba..ab799e6 100644 --- a/src/charts/domain/logxlogydomain.cpp +++ b/src/charts/domain/logxlogydomain.cpp @@ -258,7 +258,7 @@ void LogXLogYDomain::handleHorizontalAxisBaseChanged(qreal baseX) // operators -bool QT_CHARTS_AUTOTEST_EXPORT operator== (const LogXLogYDomain &domain1, const LogXLogYDomain &domain2) +bool Q_AUTOTEST_EXPORT operator== (const LogXLogYDomain &domain1, const LogXLogYDomain &domain2) { return (qFuzzyIsNull(domain1.m_maxX - domain2.m_maxX) && qFuzzyIsNull(domain1.m_maxY - domain2.m_maxY) @@ -267,13 +267,13 @@ bool QT_CHARTS_AUTOTEST_EXPORT operator== (const LogXLogYDomain &domain1, const } -bool QT_CHARTS_AUTOTEST_EXPORT operator!= (const LogXLogYDomain &domain1, const LogXLogYDomain &domain2) +bool Q_AUTOTEST_EXPORT operator!= (const LogXLogYDomain &domain1, const LogXLogYDomain &domain2) { return !(domain1 == domain2); } -QDebug QT_CHARTS_AUTOTEST_EXPORT operator<<(QDebug dbg, const LogXLogYDomain &domain) +QDebug Q_AUTOTEST_EXPORT operator<<(QDebug dbg, const LogXLogYDomain &domain) { #ifdef QT_NO_TEXTSTREAM Q_UNUSED(domain) diff --git a/src/charts/domain/logxlogydomain_p.h b/src/charts/domain/logxlogydomain_p.h index 15398af..b91c99b 100644 --- a/src/charts/domain/logxlogydomain_p.h +++ b/src/charts/domain/logxlogydomain_p.h @@ -44,7 +44,7 @@ QT_CHARTS_BEGIN_NAMESPACE -class QT_CHARTS_AUTOTEST_EXPORT LogXLogYDomain: public AbstractDomain +class Q_AUTOTEST_EXPORT LogXLogYDomain: public AbstractDomain { Q_OBJECT public: @@ -55,9 +55,9 @@ public: void setRange(qreal minX, qreal maxX, qreal minY, qreal maxY); - friend bool QT_CHARTS_AUTOTEST_EXPORT operator== (const LogXLogYDomain &domain1, const LogXLogYDomain &domain2); - friend bool QT_CHARTS_AUTOTEST_EXPORT operator!= (const LogXLogYDomain &domain1, const LogXLogYDomain &domain2); - friend QDebug QT_CHARTS_AUTOTEST_EXPORT operator<<(QDebug dbg, const LogXLogYDomain &domain); + friend bool Q_AUTOTEST_EXPORT operator== (const LogXLogYDomain &domain1, const LogXLogYDomain &domain2); + friend bool Q_AUTOTEST_EXPORT operator!= (const LogXLogYDomain &domain1, const LogXLogYDomain &domain2); + friend QDebug Q_AUTOTEST_EXPORT operator<<(QDebug dbg, const LogXLogYDomain &domain); void zoomIn(const QRectF &rect); void zoomOut(const QRectF &rect); diff --git a/src/charts/domain/logxlogypolardomain.cpp b/src/charts/domain/logxlogypolardomain.cpp index d6bfdf3..e68391a 100644 --- a/src/charts/domain/logxlogypolardomain.cpp +++ b/src/charts/domain/logxlogypolardomain.cpp @@ -253,7 +253,7 @@ void LogXLogYPolarDomain::handleVerticalAxisBaseChanged(qreal baseY) // operators -bool QT_CHARTS_AUTOTEST_EXPORT operator== (const LogXLogYPolarDomain &domain1, const LogXLogYPolarDomain &domain2) +bool Q_AUTOTEST_EXPORT operator== (const LogXLogYPolarDomain &domain1, const LogXLogYPolarDomain &domain2) { return (qFuzzyIsNull(domain1.m_maxX - domain2.m_maxX) && qFuzzyIsNull(domain1.m_maxY - domain2.m_maxY) @@ -262,13 +262,13 @@ bool QT_CHARTS_AUTOTEST_EXPORT operator== (const LogXLogYPolarDomain &domain1, c } -bool QT_CHARTS_AUTOTEST_EXPORT operator!= (const LogXLogYPolarDomain &domain1, const LogXLogYPolarDomain &domain2) +bool Q_AUTOTEST_EXPORT operator!= (const LogXLogYPolarDomain &domain1, const LogXLogYPolarDomain &domain2) { return !(domain1 == domain2); } -QDebug QT_CHARTS_AUTOTEST_EXPORT operator<<(QDebug dbg, const LogXLogYPolarDomain &domain) +QDebug Q_AUTOTEST_EXPORT operator<<(QDebug dbg, const LogXLogYPolarDomain &domain) { #ifdef QT_NO_TEXTSTREAM Q_UNUSED(domain) diff --git a/src/charts/domain/logxlogypolardomain_p.h b/src/charts/domain/logxlogypolardomain_p.h index 8afbe0c..64c16d4 100644 --- a/src/charts/domain/logxlogypolardomain_p.h +++ b/src/charts/domain/logxlogypolardomain_p.h @@ -44,7 +44,7 @@ QT_CHARTS_BEGIN_NAMESPACE -class QT_CHARTS_AUTOTEST_EXPORT LogXLogYPolarDomain: public PolarDomain +class Q_AUTOTEST_EXPORT LogXLogYPolarDomain: public PolarDomain { Q_OBJECT public: @@ -55,9 +55,9 @@ public: void setRange(qreal minX, qreal maxX, qreal minY, qreal maxY); - friend bool QT_CHARTS_AUTOTEST_EXPORT operator== (const LogXLogYPolarDomain &domain1, const LogXLogYPolarDomain &domain2); - friend bool QT_CHARTS_AUTOTEST_EXPORT operator!= (const LogXLogYPolarDomain &domain1, const LogXLogYPolarDomain &domain2); - friend QDebug QT_CHARTS_AUTOTEST_EXPORT operator<<(QDebug dbg, const LogXLogYPolarDomain &domain); + friend bool Q_AUTOTEST_EXPORT operator== (const LogXLogYPolarDomain &domain1, const LogXLogYPolarDomain &domain2); + friend bool Q_AUTOTEST_EXPORT operator!= (const LogXLogYPolarDomain &domain1, const LogXLogYPolarDomain &domain2); + friend QDebug Q_AUTOTEST_EXPORT operator<<(QDebug dbg, const LogXLogYPolarDomain &domain); void zoomIn(const QRectF &rect); void zoomOut(const QRectF &rect); diff --git a/src/charts/domain/logxydomain.cpp b/src/charts/domain/logxydomain.cpp index e152460..d8f712d 100644 --- a/src/charts/domain/logxydomain.cpp +++ b/src/charts/domain/logxydomain.cpp @@ -225,7 +225,7 @@ void LogXYDomain::handleHorizontalAxisBaseChanged(qreal baseX) // operators -bool QT_CHARTS_AUTOTEST_EXPORT operator== (const LogXYDomain &domain1, const LogXYDomain &domain2) +bool Q_AUTOTEST_EXPORT operator== (const LogXYDomain &domain1, const LogXYDomain &domain2) { return (qFuzzyIsNull(domain1.m_maxX - domain2.m_maxX) && qFuzzyIsNull(domain1.m_maxY - domain2.m_maxY) @@ -234,13 +234,13 @@ bool QT_CHARTS_AUTOTEST_EXPORT operator== (const LogXYDomain &domain1, const Log } -bool QT_CHARTS_AUTOTEST_EXPORT operator!= (const LogXYDomain &domain1, const LogXYDomain &domain2) +bool Q_AUTOTEST_EXPORT operator!= (const LogXYDomain &domain1, const LogXYDomain &domain2) { return !(domain1 == domain2); } -QDebug QT_CHARTS_AUTOTEST_EXPORT operator<<(QDebug dbg, const LogXYDomain &domain) +QDebug Q_AUTOTEST_EXPORT operator<<(QDebug dbg, const LogXYDomain &domain) { #ifdef QT_NO_TEXTSTREAM Q_UNUSED(domain) diff --git a/src/charts/domain/logxydomain_p.h b/src/charts/domain/logxydomain_p.h index 6952a5f..d855914 100644 --- a/src/charts/domain/logxydomain_p.h +++ b/src/charts/domain/logxydomain_p.h @@ -44,7 +44,7 @@ QT_CHARTS_BEGIN_NAMESPACE -class QT_CHARTS_AUTOTEST_EXPORT LogXYDomain: public AbstractDomain +class Q_AUTOTEST_EXPORT LogXYDomain: public AbstractDomain { Q_OBJECT public: @@ -55,9 +55,9 @@ public: void setRange(qreal minX, qreal maxX, qreal minY, qreal maxY); - friend bool QT_CHARTS_AUTOTEST_EXPORT operator== (const LogXYDomain &domain1, const LogXYDomain &domain2); - friend bool QT_CHARTS_AUTOTEST_EXPORT operator!= (const LogXYDomain &domain1, const LogXYDomain &domain2); - friend QDebug QT_CHARTS_AUTOTEST_EXPORT operator<<(QDebug dbg, const LogXYDomain &domain); + friend bool Q_AUTOTEST_EXPORT operator== (const LogXYDomain &domain1, const LogXYDomain &domain2); + friend bool Q_AUTOTEST_EXPORT operator!= (const LogXYDomain &domain1, const LogXYDomain &domain2); + friend QDebug Q_AUTOTEST_EXPORT operator<<(QDebug dbg, const LogXYDomain &domain); void zoomIn(const QRectF &rect); void zoomOut(const QRectF &rect); diff --git a/src/charts/domain/logxypolardomain.cpp b/src/charts/domain/logxypolardomain.cpp index 6982db5..e6dc5c4 100644 --- a/src/charts/domain/logxypolardomain.cpp +++ b/src/charts/domain/logxypolardomain.cpp @@ -222,7 +222,7 @@ void LogXYPolarDomain::handleHorizontalAxisBaseChanged(qreal baseX) // operators -bool QT_CHARTS_AUTOTEST_EXPORT operator== (const LogXYPolarDomain &domain1, const LogXYPolarDomain &domain2) +bool Q_AUTOTEST_EXPORT operator== (const LogXYPolarDomain &domain1, const LogXYPolarDomain &domain2) { return (qFuzzyIsNull(domain1.m_maxX - domain2.m_maxX) && qFuzzyIsNull(domain1.m_maxY - domain2.m_maxY) @@ -231,13 +231,13 @@ bool QT_CHARTS_AUTOTEST_EXPORT operator== (const LogXYPolarDomain &domain1, cons } -bool QT_CHARTS_AUTOTEST_EXPORT operator!= (const LogXYPolarDomain &domain1, const LogXYPolarDomain &domain2) +bool Q_AUTOTEST_EXPORT operator!= (const LogXYPolarDomain &domain1, const LogXYPolarDomain &domain2) { return !(domain1 == domain2); } -QDebug QT_CHARTS_AUTOTEST_EXPORT operator<<(QDebug dbg, const LogXYPolarDomain &domain) +QDebug Q_AUTOTEST_EXPORT operator<<(QDebug dbg, const LogXYPolarDomain &domain) { #ifdef QT_NO_TEXTSTREAM Q_UNUSED(domain) diff --git a/src/charts/domain/logxypolardomain_p.h b/src/charts/domain/logxypolardomain_p.h index e26be97..fdf42b1 100644 --- a/src/charts/domain/logxypolardomain_p.h +++ b/src/charts/domain/logxypolardomain_p.h @@ -44,7 +44,7 @@ QT_CHARTS_BEGIN_NAMESPACE -class QT_CHARTS_AUTOTEST_EXPORT LogXYPolarDomain: public PolarDomain +class Q_AUTOTEST_EXPORT LogXYPolarDomain: public PolarDomain { Q_OBJECT public: @@ -55,9 +55,9 @@ public: void setRange(qreal minX, qreal maxX, qreal minY, qreal maxY); - friend bool QT_CHARTS_AUTOTEST_EXPORT operator== (const LogXYPolarDomain &domain1, const LogXYPolarDomain &domain2); - friend bool QT_CHARTS_AUTOTEST_EXPORT operator!= (const LogXYPolarDomain &domain1, const LogXYPolarDomain &domain2); - friend QDebug QT_CHARTS_AUTOTEST_EXPORT operator<<(QDebug dbg, const LogXYPolarDomain &domain); + friend bool Q_AUTOTEST_EXPORT operator== (const LogXYPolarDomain &domain1, const LogXYPolarDomain &domain2); + friend bool Q_AUTOTEST_EXPORT operator!= (const LogXYPolarDomain &domain1, const LogXYPolarDomain &domain2); + friend QDebug Q_AUTOTEST_EXPORT operator<<(QDebug dbg, const LogXYPolarDomain &domain); void zoomIn(const QRectF &rect); void zoomOut(const QRectF &rect); diff --git a/src/charts/domain/polardomain_p.h b/src/charts/domain/polardomain_p.h index 3af22cb..bcb4b6e 100644 --- a/src/charts/domain/polardomain_p.h +++ b/src/charts/domain/polardomain_p.h @@ -44,7 +44,7 @@ QT_CHARTS_BEGIN_NAMESPACE -class QT_CHARTS_AUTOTEST_EXPORT PolarDomain: public AbstractDomain +class Q_AUTOTEST_EXPORT PolarDomain: public AbstractDomain { Q_OBJECT public: diff --git a/src/charts/domain/xlogydomain.cpp b/src/charts/domain/xlogydomain.cpp index ff7c44e..172a9de 100644 --- a/src/charts/domain/xlogydomain.cpp +++ b/src/charts/domain/xlogydomain.cpp @@ -221,7 +221,7 @@ void XLogYDomain::handleVerticalAxisBaseChanged(qreal baseY) // operators -bool QT_CHARTS_AUTOTEST_EXPORT operator== (const XLogYDomain &domain1, const XLogYDomain &domain2) +bool Q_AUTOTEST_EXPORT operator== (const XLogYDomain &domain1, const XLogYDomain &domain2) { return (qFuzzyIsNull(domain1.m_maxX - domain2.m_maxX) && qFuzzyIsNull(domain1.m_maxY - domain2.m_maxY) @@ -230,13 +230,13 @@ bool QT_CHARTS_AUTOTEST_EXPORT operator== (const XLogYDomain &domain1, const XLo } -bool QT_CHARTS_AUTOTEST_EXPORT operator!= (const XLogYDomain &domain1, const XLogYDomain &domain2) +bool Q_AUTOTEST_EXPORT operator!= (const XLogYDomain &domain1, const XLogYDomain &domain2) { return !(domain1 == domain2); } -QDebug QT_CHARTS_AUTOTEST_EXPORT operator<<(QDebug dbg, const XLogYDomain &domain) +QDebug Q_AUTOTEST_EXPORT operator<<(QDebug dbg, const XLogYDomain &domain) { #ifdef QT_NO_TEXTSTREAM Q_UNUSED(domain) diff --git a/src/charts/domain/xlogydomain_p.h b/src/charts/domain/xlogydomain_p.h index b2a814b..f0f7bed 100644 --- a/src/charts/domain/xlogydomain_p.h +++ b/src/charts/domain/xlogydomain_p.h @@ -44,7 +44,7 @@ QT_CHARTS_BEGIN_NAMESPACE -class QT_CHARTS_AUTOTEST_EXPORT XLogYDomain: public AbstractDomain +class Q_AUTOTEST_EXPORT XLogYDomain: public AbstractDomain { Q_OBJECT public: @@ -55,9 +55,9 @@ public: void setRange(qreal minX, qreal maxX, qreal minY, qreal maxY); - friend bool QT_CHARTS_AUTOTEST_EXPORT operator== (const XLogYDomain &domain1, const XLogYDomain &domain2); - friend bool QT_CHARTS_AUTOTEST_EXPORT operator!= (const XLogYDomain &domain1, const XLogYDomain &domain2); - friend QDebug QT_CHARTS_AUTOTEST_EXPORT operator<<(QDebug dbg, const XLogYDomain &domain); + friend bool Q_AUTOTEST_EXPORT operator== (const XLogYDomain &domain1, const XLogYDomain &domain2); + friend bool Q_AUTOTEST_EXPORT operator!= (const XLogYDomain &domain1, const XLogYDomain &domain2); + friend QDebug Q_AUTOTEST_EXPORT operator<<(QDebug dbg, const XLogYDomain &domain); void zoomIn(const QRectF &rect); void zoomOut(const QRectF &rect); diff --git a/src/charts/domain/xlogypolardomain.cpp b/src/charts/domain/xlogypolardomain.cpp index 0a0ee16..f437f9d 100644 --- a/src/charts/domain/xlogypolardomain.cpp +++ b/src/charts/domain/xlogypolardomain.cpp @@ -217,7 +217,7 @@ void XLogYPolarDomain::handleVerticalAxisBaseChanged(qreal baseY) // operators -bool QT_CHARTS_AUTOTEST_EXPORT operator== (const XLogYPolarDomain &domain1, const XLogYPolarDomain &domain2) +bool Q_AUTOTEST_EXPORT operator== (const XLogYPolarDomain &domain1, const XLogYPolarDomain &domain2) { return (qFuzzyIsNull(domain1.m_maxX - domain2.m_maxX) && qFuzzyIsNull(domain1.m_maxY - domain2.m_maxY) @@ -226,13 +226,13 @@ bool QT_CHARTS_AUTOTEST_EXPORT operator== (const XLogYPolarDomain &domain1, cons } -bool QT_CHARTS_AUTOTEST_EXPORT operator!= (const XLogYPolarDomain &domain1, const XLogYPolarDomain &domain2) +bool Q_AUTOTEST_EXPORT operator!= (const XLogYPolarDomain &domain1, const XLogYPolarDomain &domain2) { return !(domain1 == domain2); } -QDebug QT_CHARTS_AUTOTEST_EXPORT operator<<(QDebug dbg, const XLogYPolarDomain &domain) +QDebug Q_AUTOTEST_EXPORT operator<<(QDebug dbg, const XLogYPolarDomain &domain) { #ifdef QT_NO_TEXTSTREAM Q_UNUSED(domain) diff --git a/src/charts/domain/xlogypolardomain_p.h b/src/charts/domain/xlogypolardomain_p.h index 5bbec9f..dfc3405 100644 --- a/src/charts/domain/xlogypolardomain_p.h +++ b/src/charts/domain/xlogypolardomain_p.h @@ -44,7 +44,7 @@ QT_CHARTS_BEGIN_NAMESPACE -class QT_CHARTS_AUTOTEST_EXPORT XLogYPolarDomain: public PolarDomain +class Q_AUTOTEST_EXPORT XLogYPolarDomain: public PolarDomain { Q_OBJECT public: @@ -55,9 +55,9 @@ public: void setRange(qreal minX, qreal maxX, qreal minY, qreal maxY); - friend bool QT_CHARTS_AUTOTEST_EXPORT operator== (const XLogYPolarDomain &domain1, const XLogYPolarDomain &domain2); - friend bool QT_CHARTS_AUTOTEST_EXPORT operator!= (const XLogYPolarDomain &domain1, const XLogYPolarDomain &domain2); - friend QDebug QT_CHARTS_AUTOTEST_EXPORT operator<<(QDebug dbg, const XLogYPolarDomain &domain); + friend bool Q_AUTOTEST_EXPORT operator== (const XLogYPolarDomain &domain1, const XLogYPolarDomain &domain2); + friend bool Q_AUTOTEST_EXPORT operator!= (const XLogYPolarDomain &domain1, const XLogYPolarDomain &domain2); + friend QDebug Q_AUTOTEST_EXPORT operator<<(QDebug dbg, const XLogYPolarDomain &domain); void zoomIn(const QRectF &rect); void zoomOut(const QRectF &rect); diff --git a/src/charts/domain/xydomain.cpp b/src/charts/domain/xydomain.cpp index 9502486..da54b4f 100644 --- a/src/charts/domain/xydomain.cpp +++ b/src/charts/domain/xydomain.cpp @@ -183,7 +183,7 @@ QPointF XYDomain::calculateDomainPoint(const QPointF &point) const // operators -bool QT_CHARTS_AUTOTEST_EXPORT operator== (const XYDomain &domain1, const XYDomain &domain2) +bool Q_AUTOTEST_EXPORT operator== (const XYDomain &domain1, const XYDomain &domain2) { return (qFuzzyCompare(domain1.m_maxX, domain2.m_maxX) && qFuzzyCompare(domain1.m_maxY, domain2.m_maxY) @@ -192,13 +192,13 @@ bool QT_CHARTS_AUTOTEST_EXPORT operator== (const XYDomain &domain1, const XYDoma } -bool QT_CHARTS_AUTOTEST_EXPORT operator!= (const XYDomain &domain1, const XYDomain &domain2) +bool Q_AUTOTEST_EXPORT operator!= (const XYDomain &domain1, const XYDomain &domain2) { return !(domain1 == domain2); } -QDebug QT_CHARTS_AUTOTEST_EXPORT operator<<(QDebug dbg, const XYDomain &domain) +QDebug Q_AUTOTEST_EXPORT operator<<(QDebug dbg, const XYDomain &domain) { #ifdef QT_NO_TEXTSTREAM Q_UNUSED(domain) diff --git a/src/charts/domain/xydomain_p.h b/src/charts/domain/xydomain_p.h index b21ae15..c4d51a9 100644 --- a/src/charts/domain/xydomain_p.h +++ b/src/charts/domain/xydomain_p.h @@ -44,7 +44,7 @@ QT_CHARTS_BEGIN_NAMESPACE -class QT_CHARTS_AUTOTEST_EXPORT XYDomain: public AbstractDomain +class Q_AUTOTEST_EXPORT XYDomain: public AbstractDomain { Q_OBJECT public: @@ -55,9 +55,9 @@ public: void setRange(qreal minX, qreal maxX, qreal minY, qreal maxY); - friend bool QT_CHARTS_AUTOTEST_EXPORT operator== (const XYDomain &Domain1, const XYDomain &Domain2); - friend bool QT_CHARTS_AUTOTEST_EXPORT operator!= (const XYDomain &Domain1, const XYDomain &Domain2); - friend QDebug QT_CHARTS_AUTOTEST_EXPORT operator<<(QDebug dbg, const XYDomain &AbstractDomain); + friend bool Q_AUTOTEST_EXPORT operator== (const XYDomain &Domain1, const XYDomain &Domain2); + friend bool Q_AUTOTEST_EXPORT operator!= (const XYDomain &Domain1, const XYDomain &Domain2); + friend QDebug Q_AUTOTEST_EXPORT operator<<(QDebug dbg, const XYDomain &AbstractDomain); void zoomIn(const QRectF &rect); void zoomOut(const QRectF &rect); diff --git a/src/charts/domain/xypolardomain.cpp b/src/charts/domain/xypolardomain.cpp index 61bb9f9..8715bda 100644 --- a/src/charts/domain/xypolardomain.cpp +++ b/src/charts/domain/xypolardomain.cpp @@ -163,7 +163,7 @@ qreal XYPolarDomain::toRadialCoordinate(qreal value, bool &ok) const // operators -bool QT_CHARTS_AUTOTEST_EXPORT operator== (const XYPolarDomain &domain1, const XYPolarDomain &domain2) +bool Q_AUTOTEST_EXPORT operator== (const XYPolarDomain &domain1, const XYPolarDomain &domain2) { return (qFuzzyCompare(domain1.m_maxX, domain2.m_maxX) && qFuzzyCompare(domain1.m_maxY, domain2.m_maxY) @@ -172,13 +172,13 @@ bool QT_CHARTS_AUTOTEST_EXPORT operator== (const XYPolarDomain &domain1, const X } -bool QT_CHARTS_AUTOTEST_EXPORT operator!= (const XYPolarDomain &domain1, const XYPolarDomain &domain2) +bool Q_AUTOTEST_EXPORT operator!= (const XYPolarDomain &domain1, const XYPolarDomain &domain2) { return !(domain1 == domain2); } -QDebug QT_CHARTS_AUTOTEST_EXPORT operator<<(QDebug dbg, const XYPolarDomain &domain) +QDebug Q_AUTOTEST_EXPORT operator<<(QDebug dbg, const XYPolarDomain &domain) { #ifdef QT_NO_TEXTSTREAM Q_UNUSED(domain) diff --git a/src/charts/domain/xypolardomain_p.h b/src/charts/domain/xypolardomain_p.h index a29acab..a7bc55c 100644 --- a/src/charts/domain/xypolardomain_p.h +++ b/src/charts/domain/xypolardomain_p.h @@ -43,7 +43,7 @@ QT_CHARTS_BEGIN_NAMESPACE -class QT_CHARTS_AUTOTEST_EXPORT XYPolarDomain: public PolarDomain +class Q_AUTOTEST_EXPORT XYPolarDomain: public PolarDomain { Q_OBJECT public: @@ -54,9 +54,9 @@ public: void setRange(qreal minX, qreal maxX, qreal minY, qreal maxY); - friend bool QT_CHARTS_AUTOTEST_EXPORT operator== (const XYPolarDomain &Domain1, const XYPolarDomain &Domain2); - friend bool QT_CHARTS_AUTOTEST_EXPORT operator!= (const XYPolarDomain &Domain1, const XYPolarDomain &Domain2); - friend QDebug QT_CHARTS_AUTOTEST_EXPORT operator<<(QDebug dbg, const XYPolarDomain &AbstractDomain); + friend bool Q_AUTOTEST_EXPORT operator== (const XYPolarDomain &Domain1, const XYPolarDomain &Domain2); + friend bool Q_AUTOTEST_EXPORT operator!= (const XYPolarDomain &Domain1, const XYPolarDomain &Domain2); + friend QDebug Q_AUTOTEST_EXPORT operator<<(QDebug dbg, const XYPolarDomain &AbstractDomain); void zoomIn(const QRectF &rect); void zoomOut(const QRectF &rect); diff --git a/src/charts/qchartglobal.h b/src/charts/qchartglobal.h index 969d784..823b9ec 100644 --- a/src/charts/qchartglobal.h +++ b/src/charts/qchartglobal.h @@ -48,19 +48,11 @@ # define QT_CHARTS_EXPORT Q_DECL_IMPORT #endif -#if defined(BUILD_PRIVATE_UNIT_TESTS) && defined(QT_CHARTS_LIBRARY) -# define QT_CHARTS_AUTOTEST_EXPORT Q_DECL_EXPORT -#elif defined(BUILD_PRIVATE_UNIT_TESTS) && !defined(QT_CHARTS_LIBRARY) -# define QT_CHARTS_AUTOTEST_EXPORT Q_DECL_IMPORT -#else -# define QT_CHARTS_AUTOTEST_EXPORT -#endif - #ifdef QT_CHARTS_STATICLIB # undef QT_CHARTS_EXPORT -# undef QT_CHARTS_AUTOTEST_EXPORT +# undef Q_AUTOTEST_EXPORT # define QT_CHARTS_EXPORT -# define QT_CHARTS_AUTOTEST_EXPORT +# define Q_AUTOTEST_EXPORT #endif #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/auto.pro b/tests/auto/auto.pro index b9da92b..7ed84cb 100644 --- a/tests/auto/auto.pro +++ b/tests/auto/auto.pro @@ -34,3 +34,8 @@ qtHaveModule(quick) { SUBDIRS += qml \ qml-qtquicktest } + +!contains(QT_CONFIG, private_tests): SUBDIRS -= \ + domain \ + chartdataset + diff --git a/tests/auto/chartdataset/tst_chartdataset.cpp b/tests/auto/chartdataset/tst_chartdataset.cpp index ac6658f..12652d6 100644 --- a/tests/auto/chartdataset/tst_chartdataset.cpp +++ b/tests/auto/chartdataset/tst_chartdataset.cpp @@ -26,27 +26,6 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -#ifndef BUILD_PRIVATE_UNIT_TESTS -#include - -class tst_ChartDataSet: public QObject { - - Q_OBJECT - -private Q_SLOTS: - void skip(); - -}; - -void tst_ChartDataSet::skip() -{ - QSKIP("This test requires the debug version of library"); -} - -QTEST_MAIN(tst_ChartDataSet) -#include "tst_chartdataset.moc" - -#else #include #include @@ -404,4 +383,3 @@ void tst_ChartDataSet::detachAxis() QTEST_MAIN(tst_ChartDataSet) #include "tst_chartdataset.moc" -#endif diff --git a/tests/auto/domain/tst_domain.cpp b/tests/auto/domain/tst_domain.cpp index 0b67c98..4449794 100644 --- a/tests/auto/domain/tst_domain.cpp +++ b/tests/auto/domain/tst_domain.cpp @@ -26,29 +26,6 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -#ifndef BUILD_PRIVATE_UNIT_TESTS - -#include - -class tst_Domain: public QObject { - - Q_OBJECT - -private Q_SLOTS: - void skip(); - -}; - -void tst_Domain::skip() -{ - QSKIP("This test requires the debug version of library"); -} - -QTEST_MAIN(tst_Domain) -#include "tst_domain.moc" - -#else - #include #include #include @@ -753,4 +730,3 @@ void tst_Domain::move() QTEST_MAIN(tst_Domain) #include "tst_domain.moc" -#endif