diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2016-10-13 09:18:05 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2016-10-19 06:21:51 +0000 |
commit | f939e7ea7375dbc051c81abf7b24c6fd5304cbbb (patch) | |
tree | 5f7d1692b017cb5f8fd35ea92285b23e69cfeb50 /src/testlib/qbenchmarkmeasurement_p.h | |
parent | 6a7b683817e7427cf952130b7726833fd5be74ce (diff) |
Testlib: Move classes inheriting QBenchmarkMeasurerBase to separate header
QBenchmarkTimeMeasurer uses the 3rd party header cycle_p.h which may
include windows.h on Windows (32bit). This can cause clashes in qmltest,
which uses QBenchmarkMeasurerBase. Move the derived classes to a separate
header to prevent this.
Change-Id: I943a11c32a575594e6e79e722e8809b42de35092
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/testlib/qbenchmarkmeasurement_p.h')
-rw-r--r-- | src/testlib/qbenchmarkmeasurement_p.h | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/src/testlib/qbenchmarkmeasurement_p.h b/src/testlib/qbenchmarkmeasurement_p.h index 1444439e11..8dbfd4b618 100644 --- a/src/testlib/qbenchmarkmeasurement_p.h +++ b/src/testlib/qbenchmarkmeasurement_p.h @@ -51,8 +51,6 @@ // We mean it. // -#include <QtCore/qelapsedtimer.h> -#include <QtTest/private/cycle_p.h> #include <QtTest/qbenchmark.h> QT_BEGIN_NAMESPACE @@ -73,40 +71,6 @@ public: virtual QTest::QBenchmarkMetric metricType() = 0; }; -class QBenchmarkTimeMeasurer : public QBenchmarkMeasurerBase -{ -public: - void start(); - qint64 checkpoint(); - qint64 stop(); - bool isMeasurementAccepted(qint64 measurement); - int adjustIterationCount(int sugestion); - int adjustMedianCount(int suggestion); - bool needsWarmupIteration(); - QTest::QBenchmarkMetric metricType(); -private: - QElapsedTimer time; -}; - -#ifdef HAVE_TICK_COUNTER // defined in 3rdparty/cycle_p.h - -class QBenchmarkTickMeasurer : public QBenchmarkMeasurerBase -{ -public: - void start(); - qint64 checkpoint(); - qint64 stop(); - bool isMeasurementAccepted(qint64 measurement); - int adjustIterationCount(int); - int adjustMedianCount(int suggestion); - bool needsWarmupIteration(); - QTest::QBenchmarkMetric metricType(); -private: - CycleCounterTicks startTicks; -}; - -#endif - QT_END_NAMESPACE #endif // QBENCHMARKMEASUREMENT_P_H |