summaryrefslogtreecommitdiffstats
path: root/tests/benchmarks/corelib/tools
diff options
context:
space:
mode:
authorJoão Abecasis <joao.abecasis@nokia.com>2012-02-05 21:25:31 +0100
committerJoão Abecasis <joao.abecasis@nokia.com>2012-02-05 21:26:33 +0100
commitd065dfd454890c332482a6109ed34a989e50809b (patch)
tree0d3e9c5367c1fad7d089d368182374e8d1d46ca1 /tests/benchmarks/corelib/tools
parent632840cb0f5ad355d87fc040b015d04af86371ec (diff)
parent9f54846d951838361f4188b423e7aa7c7b9a9540 (diff)
Merge remote-tracking branch 'gerrit/master' into containers
Conflicts: src/corelib/tools/qstring.cpp Change-Id: I23d214bf33c2badfae1876da3cc7d6d8f6e635fb
Diffstat (limited to 'tests/benchmarks/corelib/tools')
-rw-r--r--tests/benchmarks/corelib/tools/containers-associative/main.cpp4
-rw-r--r--tests/benchmarks/corelib/tools/containers-sequential/main.cpp4
-rw-r--r--tests/benchmarks/corelib/tools/qalgorithms/.gitignore1
-rw-r--r--tests/benchmarks/corelib/tools/qalgorithms/qalgorithms.pro3
-rw-r--r--tests/benchmarks/corelib/tools/qalgorithms/tst_qalgorithms.cpp141
-rw-r--r--tests/benchmarks/corelib/tools/qbytearray/main.cpp4
-rw-r--r--tests/benchmarks/corelib/tools/qchar/main.cpp4
-rw-r--r--tests/benchmarks/corelib/tools/qcontiguouscache/main.cpp4
-rw-r--r--tests/benchmarks/corelib/tools/qhash/main.cpp (renamed from tests/benchmarks/corelib/tools/qhash/qhash_string.cpp)95
-rw-r--r--tests/benchmarks/corelib/tools/qhash/main.h (renamed from tests/benchmarks/corelib/tools/qhash/qhash_string.h)16
-rw-r--r--tests/benchmarks/corelib/tools/qhash/outofline.cpp30
-rw-r--r--tests/benchmarks/corelib/tools/qhash/paths_small_data.txt (renamed from tests/benchmarks/corelib/tools/qhash/data.txt)0
-rw-r--r--tests/benchmarks/corelib/tools/qhash/qhash.pro2
-rw-r--r--tests/benchmarks/corelib/tools/qlist/main.cpp4
-rw-r--r--tests/benchmarks/corelib/tools/qrect/main.cpp4
-rw-r--r--tests/benchmarks/corelib/tools/qregexp/main.cpp4
-rw-r--r--tests/benchmarks/corelib/tools/qstring/data.h4
-rw-r--r--tests/benchmarks/corelib/tools/qstring/generatelist.pl4
-rw-r--r--tests/benchmarks/corelib/tools/qstring/generatelist_char.pl4
-rw-r--r--tests/benchmarks/corelib/tools/qstring/main.cpp4
-rw-r--r--tests/benchmarks/corelib/tools/qstringbuilder/main.cpp4
-rw-r--r--tests/benchmarks/corelib/tools/qstringlist/main.cpp4
-rw-r--r--tests/benchmarks/corelib/tools/qvector/main.cpp4
-rw-r--r--tests/benchmarks/corelib/tools/qvector/outofline.cpp4
-rw-r--r--tests/benchmarks/corelib/tools/qvector/qrawvector.h5
-rw-r--r--tests/benchmarks/corelib/tools/tools.pro3
26 files changed, 269 insertions, 91 deletions
diff --git a/tests/benchmarks/corelib/tools/containers-associative/main.cpp b/tests/benchmarks/corelib/tools/containers-associative/main.cpp
index 3e9dfe3568..7f2e7b68ca 100644
--- a/tests/benchmarks/corelib/tools/containers-associative/main.cpp
+++ b/tests/benchmarks/corelib/tools/containers-associative/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/corelib/tools/containers-sequential/main.cpp b/tests/benchmarks/corelib/tools/containers-sequential/main.cpp
index ae05a164a2..ee13a63a57 100644
--- a/tests/benchmarks/corelib/tools/containers-sequential/main.cpp
+++ b/tests/benchmarks/corelib/tools/containers-sequential/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/corelib/tools/qalgorithms/.gitignore b/tests/benchmarks/corelib/tools/qalgorithms/.gitignore
new file mode 100644
index 0000000000..379c13eb9b
--- /dev/null
+++ b/tests/benchmarks/corelib/tools/qalgorithms/.gitignore
@@ -0,0 +1 @@
+tst_qalgorithms
diff --git a/tests/benchmarks/corelib/tools/qalgorithms/qalgorithms.pro b/tests/benchmarks/corelib/tools/qalgorithms/qalgorithms.pro
new file mode 100644
index 0000000000..00b63f9863
--- /dev/null
+++ b/tests/benchmarks/corelib/tools/qalgorithms/qalgorithms.pro
@@ -0,0 +1,3 @@
+TARGET = tst_qalgorithms
+QT = core testlib
+SOURCES = tst_qalgorithms.cpp
diff --git a/tests/benchmarks/corelib/tools/qalgorithms/tst_qalgorithms.cpp b/tests/benchmarks/corelib/tools/qalgorithms/tst_qalgorithms.cpp
new file mode 100644
index 0000000000..d36f8e101c
--- /dev/null
+++ b/tests/benchmarks/corelib/tools/qalgorithms/tst_qalgorithms.cpp
@@ -0,0 +1,141 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Robin Burchell <robin+qt@viroteck.net>
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this
+** file. Please review the following information to ensure the GNU Lesser
+** General Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtTest/QtTest>
+
+#include <iostream>
+#include <iomanip>
+#include <sstream>
+#include <algorithm>
+#include <qalgorithms.h>
+#include <QStringList>
+#include <QString>
+#include <QVector>
+
+using namespace std;
+
+class tst_QAlgorithms : public QObject
+{
+ Q_OBJECT
+private slots:
+ void stableSort_data();
+ void stableSort();
+
+ void sort_data();
+ void sort();
+};
+
+template <typename DataType>
+QVector<DataType> generateData(QString dataSetType, const int length)
+{
+ QVector<DataType> container;
+ if (dataSetType == "Random") {
+ for (int i = 0; i < length; ++i)
+ container.append(rand());
+ } else if (dataSetType == "Ascending") {
+ for (int i = 0; i < length; ++i)
+ container.append(i);
+ } else if (dataSetType == "Descending") {
+ for (int i = 0; i < length; ++i)
+ container.append(length - i);
+ } else if (dataSetType == "Equal") {
+ for (int i = 0; i < length; ++i)
+ container.append(43);
+ } else if (dataSetType == "Duplicates") {
+ for (int i = 0; i < length; ++i)
+ container.append(i % 10);
+ } else if (dataSetType == "Almost Sorted") {
+ for (int i = 0; i < length; ++i)
+ container.append(i);
+ for (int i = 0; i<= length / 10; ++i) {
+ const int iswap = i * 9;
+ DataType tmp = container.at(iswap);
+ container[iswap] = container.at(iswap + 1);
+ container[iswap + 1] = tmp;
+ }
+ }
+
+ return container;
+}
+
+Q_DECLARE_METATYPE(QVector<int>)
+
+void tst_QAlgorithms::stableSort_data()
+{
+ const int dataSize = 5000;
+ QTest::addColumn<QVector<int> >("unsorted");
+ QTest::newRow("Equal") << (generateData<int>("Equal", dataSize));
+ QTest::newRow("Ascending") << (generateData<int>("Ascending", dataSize));
+ QTest::newRow("Descending") << (generateData<int>("Descending", dataSize));
+ QTest::newRow("Duplicates") << (generateData<int>("Duplicates", dataSize));
+ QTest::newRow("Almost Sorted") << (generateData<int>("Almost Sorted", dataSize));
+}
+
+void tst_QAlgorithms::stableSort()
+{
+ QFETCH(QVector<int>, unsorted);
+
+ QBENCHMARK {
+ QVector<int> sorted = unsorted;
+ qStableSort(sorted.begin(), sorted.end());
+ }
+}
+
+void tst_QAlgorithms::sort_data()
+{
+ stableSort_data();
+}
+
+void tst_QAlgorithms::sort()
+{
+ QFETCH(QVector<int>, unsorted);
+
+ QBENCHMARK {
+ QVector<int> sorted = unsorted;
+ qSort(sorted.begin(), sorted.end());
+ }
+}
+
+
+QTEST_MAIN(tst_QAlgorithms)
+#include "tst_qalgorithms.moc"
+
diff --git a/tests/benchmarks/corelib/tools/qbytearray/main.cpp b/tests/benchmarks/corelib/tools/qbytearray/main.cpp
index 61a7855884..72e07ad445 100644
--- a/tests/benchmarks/corelib/tools/qbytearray/main.cpp
+++ b/tests/benchmarks/corelib/tools/qbytearray/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/corelib/tools/qchar/main.cpp b/tests/benchmarks/corelib/tools/qchar/main.cpp
index 3abf7584bb..80456453c9 100644
--- a/tests/benchmarks/corelib/tools/qchar/main.cpp
+++ b/tests/benchmarks/corelib/tools/qchar/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/corelib/tools/qcontiguouscache/main.cpp b/tests/benchmarks/corelib/tools/qcontiguouscache/main.cpp
index b6b064e012..db0c9f39b2 100644
--- a/tests/benchmarks/corelib/tools/qcontiguouscache/main.cpp
+++ b/tests/benchmarks/corelib/tools/qcontiguouscache/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/corelib/tools/qhash/qhash_string.cpp b/tests/benchmarks/corelib/tools/qhash/main.cpp
index 874a0c543a..6f3228d0eb 100644
--- a/tests/benchmarks/corelib/tools/qhash/qhash_string.cpp
+++ b/tests/benchmarks/corelib/tools/qhash/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,38 +34,12 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
-/*
-
-////////////////////////////////////////////////////////////////////
-
-This benchmark serves as reality check on the idea that hashing the complete
-string is a good idea.
-
- Executive summary: It is not a good idea.
-
-////////////////////////////////////////////////////////////////////
-
-********* Start testing of tst_QHash *********
-Config: Using QTest library 5.0.0, Qt 5.0.0
-PASS : tst_QHash::initTestCase()
-RESULT : tst_QHash::qhash_qt4():
- 0.041 msecs per iteration (total: 85, iterations: 2048)
-PASS : tst_QHash::qhash_qt4()
-RESULT : tst_QHash::qhash_faster():
- 0.0122 msecs per iteration (total: 100, iterations: 8192)
-PASS : tst_QHash::qhash_faster()
-PASS : tst_QHash::cleanupTestCase()
-Totals: 4 passed, 0 failed, 0 skipped
-
-////////////////////////////////////////////////////////////////////
-
-*/
-
-#include "qhash_string.h"
+#include "main.h"
#include <QFile>
#include <QHash>
@@ -81,51 +54,75 @@ class tst_QHash : public QObject
Q_OBJECT
private slots:
+ void qhash_qt4_data() { data(); }
void qhash_qt4();
+ void qhash_faster_data() { data(); }
void qhash_faster();
+ void javaString_data() { data(); }
+ void javaString();
private:
- QString data();
+ void data();
};
-const int N = 1000000;
-extern double s;
-
///////////////////// QHash /////////////////////
-QString tst_QHash::data()
+void tst_QHash::data()
{
- QFile file("data.txt");
- file.open(QIODevice::ReadOnly);
- return QString::fromLatin1(file.readAll());
+ QFile smallPathsData("paths_small_data.txt");
+ smallPathsData.open(QIODevice::ReadOnly);
+
+ QTest::addColumn<QStringList>("items");
+ QTest::newRow("paths-small")
+ << QString::fromLatin1(smallPathsData.readAll()).split(QLatin1Char('\n'));
}
void tst_QHash::qhash_qt4()
{
- QStringList items = data().split(QLatin1Char('\n'));
+ QFETCH(QStringList, items);
+ QStringList realitems = items; // for copy/paste ease between benchmarks
QHash<QString, int> hash;
-
+
QBENCHMARK {
- for (int i = 0, n = items.size(); i != n; ++i) {
- hash[items.at(i)] = i;
+ for (int i = 0, n = realitems.size(); i != n; ++i) {
+ hash[realitems.at(i)] = i;
}
}
}
void tst_QHash::qhash_faster()
{
- QList<String> items;
- foreach (const QString &s, data().split(QLatin1Char('\n')))
- items.append(s);
+ QFETCH(QStringList, items);
QHash<String, int> hash;
-
+
+ QList<String> realitems;
+ foreach (const QString &s, items)
+ realitems.append(s);
+
QBENCHMARK {
- for (int i = 0, n = items.size(); i != n; ++i) {
- hash[items.at(i)] = i;
+ for (int i = 0, n = realitems.size(); i != n; ++i) {
+ hash[realitems.at(i)] = i;
}
}
}
+void tst_QHash::javaString()
+{
+ QFETCH(QStringList, items);
+ QHash<JavaString, int> hash;
+
+ QList<JavaString> realitems;
+ foreach (const QString &s, items)
+ realitems.append(s);
+
+ QBENCHMARK {
+ for (int i = 0, n = realitems.size(); i != n; ++i) {
+ hash[realitems.at(i)] = i;
+ }
+ }
+}
+
+
QTEST_MAIN(tst_QHash)
-#include "qhash_string.moc"
+#include "main.moc"
diff --git a/tests/benchmarks/corelib/tools/qhash/qhash_string.h b/tests/benchmarks/corelib/tools/qhash/main.h
index 94f142914b..c4cf94e190 100644
--- a/tests/benchmarks/corelib/tools/qhash/qhash_string.h
+++ b/tests/benchmarks/corelib/tools/qhash/main.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtTest module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -50,3 +50,15 @@ struct String : QString
QT_BEGIN_NAMESPACE
uint qHash(const String &);
QT_END_NAMESPACE
+
+
+struct JavaString : QString
+{
+ JavaString() {}
+ JavaString(const QString &s) : QString(s) {}
+};
+
+QT_BEGIN_NAMESPACE
+uint qHash(const JavaString &);
+QT_END_NAMESPACE
+
diff --git a/tests/benchmarks/corelib/tools/qhash/outofline.cpp b/tests/benchmarks/corelib/tools/qhash/outofline.cpp
index 11a5f9e733..162c604a35 100644
--- a/tests/benchmarks/corelib/tools/qhash/outofline.cpp
+++ b/tests/benchmarks/corelib/tools/qhash/outofline.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtTest module of the Qt Toolkit.
**
@@ -35,11 +34,12 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
-#include "qhash_string.h"
+#include "main.h"
static void doHash(const unsigned short *p, uint &h)
{
@@ -87,4 +87,28 @@ uint qHash(const String &str)
return h;
}
+// The Java's hashing algorithm for strings is a variation of D. J. Bernstein
+// hashing algorithm appeared here http://cr.yp.to/cdb/cdb.txt
+// and informally known as DJB33XX - DJB's 33 Times Xor.
+// Java uses DJB31XA, that is, 31 Times Add.
+// The original algorithm was a loop around "(h << 5) + h ^ c",
+// which is indeed "h * 33 ^ c"; it was then changed to
+// "(h << 5) - h ^ c", so "h * 31 ^ c", and the XOR changed to a sum:
+// "(h << 5) - h + c", which can save some assembly instructions.
+// Still, we can avoid writing the multiplication as "(h << 5) - h"
+// -- the compiler will turn it into a shift and an addition anyway
+// (for instance, gcc 4.4 does that even at -O0).
+uint qHash(const JavaString &str)
+{
+ const unsigned short *p = (unsigned short *)str.constData();
+ const int len = str.size();
+
+ uint h = 0;
+
+ for (int i = 0; i < len; ++i)
+ h = 31 * h + p[i];
+
+ return h;
+}
+
QT_END_NAMESPACE
diff --git a/tests/benchmarks/corelib/tools/qhash/data.txt b/tests/benchmarks/corelib/tools/qhash/paths_small_data.txt
index d5acd28820..d5acd28820 100644
--- a/tests/benchmarks/corelib/tools/qhash/data.txt
+++ b/tests/benchmarks/corelib/tools/qhash/paths_small_data.txt
diff --git a/tests/benchmarks/corelib/tools/qhash/qhash.pro b/tests/benchmarks/corelib/tools/qhash/qhash.pro
index 51d3e7f253..40f661c116 100644
--- a/tests/benchmarks/corelib/tools/qhash/qhash.pro
+++ b/tests/benchmarks/corelib/tools/qhash/qhash.pro
@@ -1,5 +1,5 @@
TARGET = tst_hash
QT = core testlib
INCLUDEPATH += .
-SOURCES += qhash_string.cpp outofline.cpp
+SOURCES += main.cpp outofline.cpp
CONFIG += release
diff --git a/tests/benchmarks/corelib/tools/qlist/main.cpp b/tests/benchmarks/corelib/tools/qlist/main.cpp
index d3380b188c..b5fcfea3e6 100644
--- a/tests/benchmarks/corelib/tools/qlist/main.cpp
+++ b/tests/benchmarks/corelib/tools/qlist/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtCore module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/corelib/tools/qrect/main.cpp b/tests/benchmarks/corelib/tools/qrect/main.cpp
index 59174e4f08..ba81c7bb92 100644
--- a/tests/benchmarks/corelib/tools/qrect/main.cpp
+++ b/tests/benchmarks/corelib/tools/qrect/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/corelib/tools/qregexp/main.cpp b/tests/benchmarks/corelib/tools/qregexp/main.cpp
index 32e8e72577..d26731edba 100644
--- a/tests/benchmarks/corelib/tools/qregexp/main.cpp
+++ b/tests/benchmarks/corelib/tools/qregexp/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/corelib/tools/qstring/data.h b/tests/benchmarks/corelib/tools/qstring/data.h
index 925ce3663a..bf39284cb4 100644
--- a/tests/benchmarks/corelib/tools/qstring/data.h
+++ b/tests/benchmarks/corelib/tools/qstring/data.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/corelib/tools/qstring/generatelist.pl b/tests/benchmarks/corelib/tools/qstring/generatelist.pl
index 1f10b638b2..0cb67fc737 100644
--- a/tests/benchmarks/corelib/tools/qstring/generatelist.pl
+++ b/tests/benchmarks/corelib/tools/qstring/generatelist.pl
@@ -1,7 +1,6 @@
#!/usr/bin/perl
## Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-## All rights reserved.
-## Contact: Nokia Corporation (qt-info@nokia.com)
+## Contact: http://www.qt-project.org/
##
## This file is part of the QtCore module of the Qt Toolkit.
##
@@ -34,6 +33,7 @@
##
##
##
+##
## $QT_END_LICENSE$
#
# Parses a file (passed as argument) that contains a dump of pairs of
diff --git a/tests/benchmarks/corelib/tools/qstring/generatelist_char.pl b/tests/benchmarks/corelib/tools/qstring/generatelist_char.pl
index ad6595ab5c..9d980f9ed4 100644
--- a/tests/benchmarks/corelib/tools/qstring/generatelist_char.pl
+++ b/tests/benchmarks/corelib/tools/qstring/generatelist_char.pl
@@ -1,8 +1,7 @@
#!/usr/bin/perl
# -*- mode: utf-8; tabs: nil -*-
## Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-## All rights reserved.
-## Contact: Nokia Corporation (qt-info@nokia.com)
+## Contact: http://www.qt-project.org/
##
## This file is part of the QtCore module of the Qt Toolkit.
##
@@ -35,6 +34,7 @@
##
##
##
+##
## $QT_END_LICENSE$
#
# Parses a file (passed as argument) that contains a dump of pairs of
diff --git a/tests/benchmarks/corelib/tools/qstring/main.cpp b/tests/benchmarks/corelib/tools/qstring/main.cpp
index ab23fa5f9b..9d5c43c290 100644
--- a/tests/benchmarks/corelib/tools/qstring/main.cpp
+++ b/tests/benchmarks/corelib/tools/qstring/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/corelib/tools/qstringbuilder/main.cpp b/tests/benchmarks/corelib/tools/qstringbuilder/main.cpp
index b1ec5dace8..cd82ca746f 100644
--- a/tests/benchmarks/corelib/tools/qstringbuilder/main.cpp
+++ b/tests/benchmarks/corelib/tools/qstringbuilder/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/corelib/tools/qstringlist/main.cpp b/tests/benchmarks/corelib/tools/qstringlist/main.cpp
index 696f0fc6da..48bf7f1fc5 100644
--- a/tests/benchmarks/corelib/tools/qstringlist/main.cpp
+++ b/tests/benchmarks/corelib/tools/qstringlist/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/corelib/tools/qvector/main.cpp b/tests/benchmarks/corelib/tools/qvector/main.cpp
index 38c1f4ac46..ee50935832 100644
--- a/tests/benchmarks/corelib/tools/qvector/main.cpp
+++ b/tests/benchmarks/corelib/tools/qvector/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/corelib/tools/qvector/outofline.cpp b/tests/benchmarks/corelib/tools/qvector/outofline.cpp
index a30a7e786a..bf929780a5 100644
--- a/tests/benchmarks/corelib/tools/qvector/outofline.cpp
+++ b/tests/benchmarks/corelib/tools/qvector/outofline.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtTest module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/corelib/tools/qvector/qrawvector.h b/tests/benchmarks/corelib/tools/qvector/qrawvector.h
index 3bd75164d5..159dfbf8dc 100644
--- a/tests/benchmarks/corelib/tools/qvector/qrawvector.h
+++ b/tests/benchmarks/corelib/tools/qvector/qrawvector.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtCore module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -60,7 +60,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Core)
diff --git a/tests/benchmarks/corelib/tools/tools.pro b/tests/benchmarks/corelib/tools/tools.pro
index d5bf8301f9..ea9059e759 100644
--- a/tests/benchmarks/corelib/tools/tools.pro
+++ b/tests/benchmarks/corelib/tools/tools.pro
@@ -10,6 +10,7 @@ SUBDIRS = \
qstring \
qstringbuilder \
qstringlist \
- qvector
+ qvector \
+ qalgorithms
!*g++*: SUBDIRS -= qstring