diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2019-07-08 12:32:29 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2019-07-08 13:20:48 +0200 |
commit | 3622ebaac51abd2e4d1541120ae3b6e42932359f (patch) | |
tree | 580aa25716bfc88d57f15ad68f7bfa727aebc400 /tests/benchmarks | |
parent | f955bd8ced8b93d142b7f755665946424c6d3644 (diff) | |
parent | c39910993eaf6a7d68fbbe366d990f3f972533ca (diff) |
Merge remote-tracking branch 'origin/dev' into wip/qt6
Change-Id: I02cbc4f77a82100b96cdb90c160ce0207f180d7f
Diffstat (limited to 'tests/benchmarks')
-rw-r--r-- | tests/benchmarks/corelib/tools/qvector/qrawvector.h | 7 | ||||
-rw-r--r-- | tests/benchmarks/network/access/qnetworkreply/tst_qnetworkreply.cpp | 2 | ||||
-rw-r--r-- | tests/benchmarks/opengl/main.cpp | 5 |
3 files changed, 4 insertions, 10 deletions
diff --git a/tests/benchmarks/corelib/tools/qvector/qrawvector.h b/tests/benchmarks/corelib/tools/qvector/qrawvector.h index c7173b5b8d..16a911c63a 100644 --- a/tests/benchmarks/corelib/tools/qvector/qrawvector.h +++ b/tests/benchmarks/corelib/tools/qvector/qrawvector.h @@ -32,7 +32,6 @@ #include <QtCore/qiterator.h> #include <QtCore/qdebug.h> #include <QtCore/qatomic.h> -#include <QtCore/qalgorithms.h> #include <QtCore/qlist.h> #include <QtCore/private/qtools_p.h> @@ -263,9 +262,9 @@ public: //static QRawVector<T> fromList(const QList<T> &list); static inline QRawVector<T> fromStdVector(const std::vector<T> &vector) - { QRawVector<T> tmp; qCopy(vector.begin(), vector.end(), std::back_inserter(tmp)); return tmp; } + { QRawVector<T> tmp; std::copy(vector.begin(), vector.end(), std::back_inserter(tmp)); return tmp; } inline std::vector<T> toStdVector() const - { std::vector<T> tmp; qCopy(constBegin(), constEnd(), std::back_inserter(tmp)); return tmp; } + { std::vector<T> tmp; std::copy(constBegin(), constEnd(), std::back_inserter(tmp)); return tmp; } private: T *allocate(int alloc); @@ -568,7 +567,7 @@ typename QRawVector<T>::iterator QRawVector<T>::erase(iterator abegin, iterator int l = int(aend - m_begin); int n = l - f; if (QTypeInfo<T>::isComplex) { - qCopy(m_begin + l, m_begin + m_size, m_begin + f); + std::copy(m_begin + l, m_begin + m_size, m_begin + f); T *i = m_begin + m_size; T *b = m_begin + m_size - n; while (i != b) { diff --git a/tests/benchmarks/network/access/qnetworkreply/tst_qnetworkreply.cpp b/tests/benchmarks/network/access/qnetworkreply/tst_qnetworkreply.cpp index b2f4cbd7ba..c182ef7ebf 100644 --- a/tests/benchmarks/network/access/qnetworkreply/tst_qnetworkreply.cpp +++ b/tests/benchmarks/network/access/qnetworkreply/tst_qnetworkreply.cpp @@ -908,7 +908,7 @@ void tst_qnetworkreply::httpsRequestChain() qint64 average = (elapsed / count); - qSort(helper.timeList); + std::sort(helper.timeList.begin(), helper.timeList.end()); qint64 median = helper.timeList.at(5); qDebug() << "Total:" << elapsed << " Average:" << average << " Median:" << median; diff --git a/tests/benchmarks/opengl/main.cpp b/tests/benchmarks/opengl/main.cpp index 5008f1592b..0886c0e55b 100644 --- a/tests/benchmarks/opengl/main.cpp +++ b/tests/benchmarks/opengl/main.cpp @@ -76,7 +76,6 @@ void OpenGLBench::initTestCase() QPainter p(pb); p.setRenderHint(QPainter::Antialiasing); - p.setRenderHint(QPainter::HighQualityAntialiasing); p.drawImage(0, 0, QImage(256, 256, QImage::Format_ARGB32_Premultiplied)); } @@ -120,7 +119,6 @@ void OpenGLBench::imageDrawing() QPainter p(pb); p.setRenderHint(QPainter::SmoothPixmapTransform, smoothPixmapTransform); p.setRenderHint(QPainter::Antialiasing, highQualityAntialiasing); - p.setRenderHint(QPainter::HighQualityAntialiasing, highQualityAntialiasing); QBENCHMARK { if (pixmap) { @@ -182,7 +180,6 @@ void OpenGLBench::pathDrawing() dummy.addRect(-1, -1, 2, 2); QPainter p(pb); p.setRenderHint(QPainter::Antialiasing, highQualityAntialiasing); - p.setRenderHint(QPainter::HighQualityAntialiasing, highQualityAntialiasing); p.translate(pb->width() / 2, pb->height() / 2); p.rotate(30); p.drawPath(dummy); @@ -196,7 +193,6 @@ void OpenGLBench::pathDrawing() QBENCHMARK { p.setRenderHint(QPainter::Antialiasing, highQualityAntialiasing); - p.setRenderHint(QPainter::HighQualityAntialiasing, highQualityAntialiasing); p.rotate(0.01); p.drawPath(path); @@ -227,7 +223,6 @@ void OpenGLBench::startupCost() QGLPixelBuffer buffer(512, 512); QPainter p(&buffer); p.setRenderHint(QPainter::Antialiasing, highQualityAntialiasing); - p.setRenderHint(QPainter::HighQualityAntialiasing, highQualityAntialiasing); p.translate(buffer.width() / 2, buffer.height() / 2); p.drawPath(path); |