summaryrefslogtreecommitdiffstats
path: root/tests/benchmarks/corelib
diff options
context:
space:
mode:
authorAxel Waggershauser <awagger@gmail.com>2013-03-15 00:42:15 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-03-16 20:22:50 +0100
commitb11317a64339f5a4bcffc8234ecaf15c7fb416f2 (patch)
treef81e40ee49f5109b4100048d131d5bb922b448aa /tests/benchmarks/corelib
parent72367a94a750355eb748793ce8c365373a332c9c (diff)
Whitespace cleanup: remove trailing whitespace
Remove all trailing whitespace from the following list of files: *.cpp *.h *.conf *.qdoc *.pro *.pri *.mm *.rc *.pl *.qps *.xpm *.txt *README excluding 3rdparty, test-data and auto generated code. Note A): the only non 3rdparty c++-files that still have trailing whitespace after this change are: * src/corelib/codecs/cp949codetbl_p.h * src/corelib/codecs/qjpunicode.cpp * src/corelib/codecs/qbig5codec.cpp * src/corelib/xml/qxmlstream_p.h * src/tools/qdoc/qmlparser/qqmljsgrammar.cpp * src/tools/uic/ui4.cpp * tests/auto/other/qtokenautomaton/tokenizers/* * tests/benchmarks/corelib/tools/qstring/data.cpp * util/lexgen/tokenizer.cpp Note B): in about 30 files some overlapping 'leading tab' and 'TAB character in non-leading whitespace' issues have been fixed to make the sanity bot happy. Plus some general ws-fixes here and there as asked for during review. Change-Id: Ia713113c34d82442d6ce4d93d8b1cf545075d11d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Diffstat (limited to 'tests/benchmarks/corelib')
-rw-r--r--tests/benchmarks/corelib/io/qdir/tree/bench_qdir_tree.cpp6
-rw-r--r--tests/benchmarks/corelib/io/qdiriterator/qfilesystemiterator.cpp14
-rw-r--r--tests/benchmarks/corelib/io/qfile/main.cpp16
-rw-r--r--tests/benchmarks/corelib/tools/containers-associative/main.cpp16
-rw-r--r--tests/benchmarks/corelib/tools/qregexp/main.cpp10
-rw-r--r--tests/benchmarks/corelib/tools/qvector/main.cpp2
-rw-r--r--tests/benchmarks/corelib/tools/qvector/qrawvector.h2
7 files changed, 33 insertions, 33 deletions
diff --git a/tests/benchmarks/corelib/io/qdir/tree/bench_qdir_tree.cpp b/tests/benchmarks/corelib/io/qdir/tree/bench_qdir_tree.cpp
index 9a82711b84..37f52a3dce 100644
--- a/tests/benchmarks/corelib/io/qdir/tree/bench_qdir_tree.cpp
+++ b/tests/benchmarks/corelib/io/qdir/tree/bench_qdir_tree.cpp
@@ -123,14 +123,14 @@ private slots:
for (int i=0;i<1000;i++) {
if ((i % 10) == 0)
QVERIFY(fs.createDirectory(QString("%1/directory%2").arg(musicprefix).arg(i/10)));
- qint64 size = fs.createFileWithContent(QString("%1/directory%2/file%3").arg(musicprefix).arg(i/10).arg(i));
+ qint64 size = fs.createFileWithContent(QString("%1/directory%2/file%3").arg(musicprefix).arg(i/10).arg(i));
QVERIFY(size > 0);
musicsize += size;
}
//Use case: photos - 1000 files in 1 directory
QVERIFY(fs.createDirectory(photoprefix));
for (int i=0;i<1000;i++) {
- qint64 size = fs.createFileWithContent(QString("%1/file%2").arg(photoprefix).arg(i));
+ qint64 size = fs.createFileWithContent(QString("%1/file%2").arg(photoprefix).arg(i));
QVERIFY(size > 0);
photosize += size;
}
@@ -141,7 +141,7 @@ private slots:
QVERIFY(fs.createDirectory(QString("%1/directory%2").arg(sourceprefix).arg(i/100)));
if ((i % 10) == 0)
QVERIFY(fs.createDirectory(QString("%1/directory%2/subdirectory%3").arg(sourceprefix).arg(i/100).arg(i/10)));
- qint64 size = fs.createFileWithContent(QString("%1/directory%2/subdirectory%3/file%4").arg(sourceprefix).arg(i/100).arg(i/10).arg(i));
+ qint64 size = fs.createFileWithContent(QString("%1/directory%2/subdirectory%3/file%4").arg(sourceprefix).arg(i/100).arg(i/10).arg(i));
QVERIFY(size > 0);
sourcesize += size;
}
diff --git a/tests/benchmarks/corelib/io/qdiriterator/qfilesystemiterator.cpp b/tests/benchmarks/corelib/io/qdiriterator/qfilesystemiterator.cpp
index 598153e3ce..bb4a921fc7 100644
--- a/tests/benchmarks/corelib/io/qdiriterator/qfilesystemiterator.cpp
+++ b/tests/benchmarks/corelib/io/qdiriterator/qfilesystemiterator.cpp
@@ -368,7 +368,7 @@ bool QFileSystemIteratorPrivate::shouldFollowDirectory(const QFileInfo &fileInfo
// If we're doing flat iteration, we're done.
if (!(iteratorFlags & QFileSystemIterator::Subdirectories))
return false;
-
+
// Never follow non-directory entries
if (!fileInfo.isDir())
return false;
@@ -378,7 +378,7 @@ bool QFileSystemIteratorPrivate::shouldFollowDirectory(const QFileInfo &fileInfo
if (fileInfo.fileName() == QLatin1String(".") || fileInfo.fileName() == QLatin1String(".."))
return false;
-
+
// Check symlinks
if (fileInfo.isSymLink() && !(iteratorFlags & QFileSystemIterator::FollowSymlinks)) {
// Follow symlinks only if FollowSymlinks was passed
@@ -388,10 +388,10 @@ bool QFileSystemIteratorPrivate::shouldFollowDirectory(const QFileInfo &fileInfo
// Stop link loops
if (visitedLinks.contains(fileInfo.canonicalFilePath()))
return false;
-
+
return true;
}
-
+
/*!
\internal
@@ -454,7 +454,7 @@ bool QFileSystemIteratorPrivate::matchesFilters(const QAbstractFileEngineIterato
return false;
}
#endif
-
+
bool dotOrDotDot = (fileName == QLatin1String(".") || fileName == QLatin1String(".."));
if ((filters & QDir::NoDotAndDotDot) && dotOrDotDot)
return false;
@@ -495,7 +495,7 @@ bool QFileSystemIteratorPrivate::matchesFilters(const QAbstractFileEngineIterato
|| (!fi.exists() && fi.isSymLink()))) {
return false;
}
-
+
return true;
}
#endif
@@ -608,7 +608,7 @@ bool QFileSystemIterator::atEnd() const
This function is provided for the convenience when iterating single
directories. For recursive iteration, you should call filePath() or
fileInfo() instead.
-
+
\sa filePath(), fileInfo()
*/
QString QFileSystemIterator::fileName() const
diff --git a/tests/benchmarks/corelib/io/qfile/main.cpp b/tests/benchmarks/corelib/io/qfile/main.cpp
index 4eb123f00c..ef5fd36254 100644
--- a/tests/benchmarks/corelib/io/qfile/main.cpp
+++ b/tests/benchmarks/corelib/io/qfile/main.cpp
@@ -184,9 +184,9 @@ void tst_qfile::readBigFile_QFSFileEngine()
QSKIP("This test requires -developer-build.");
#endif
}
-void tst_qfile::readBigFile_posix()
-{
- readBigFile();
+void tst_qfile::readBigFile_posix()
+{
+ readBigFile();
}
void tst_qfile::readBigFile_Win32() { readBigFile(); }
@@ -509,13 +509,13 @@ void tst_qfile::readSmallFiles_QFSFileEngine()
QSKIP("This test requires -developer-build.");
#endif
}
-void tst_qfile::readSmallFiles_posix()
+void tst_qfile::readSmallFiles_posix()
{
- readSmallFiles();
+ readSmallFiles();
}
-void tst_qfile::readSmallFiles_Win32()
-{
- readSmallFiles();
+void tst_qfile::readSmallFiles_Win32()
+{
+ readSmallFiles();
}
void tst_qfile::readSmallFiles_QFile_data()
diff --git a/tests/benchmarks/corelib/tools/containers-associative/main.cpp b/tests/benchmarks/corelib/tools/containers-associative/main.cpp
index e4511f4935..d2275ddb92 100644
--- a/tests/benchmarks/corelib/tools/containers-associative/main.cpp
+++ b/tests/benchmarks/corelib/tools/containers-associative/main.cpp
@@ -52,7 +52,7 @@ private slots:
void lookup();
};
-template <typename T>
+template <typename T>
void testInsert(int size)
{
T container;
@@ -69,7 +69,7 @@ void tst_associative_containers::insert_data()
QTest::addColumn<int>("size");
for (int size = 10; size < 20000; size += 100) {
-
+
const QByteArray sizeString = QByteArray::number(size);
QTest::newRow(QByteArray("hash--" + sizeString).constData()) << true << size;
@@ -86,9 +86,9 @@ void tst_associative_containers::insert()
QMap<int, int> testMap;
if (useHash) {
- testInsert<QHash<int, int> >(size);
+ testInsert<QHash<int, int> >(size);
} else {
- testInsert<QMap<int, int> >(size);
+ testInsert<QMap<int, int> >(size);
}
}
@@ -101,7 +101,7 @@ void tst_associative_containers::lookup_data()
QTest::addColumn<int>("size");
for (int size = 10; size < 20000; size += 100) {
-
+
const QByteArray sizeString = QByteArray::number(size);
QTest::newRow(QByteArray("hash--" + sizeString).constData()) << true << size;
@@ -109,11 +109,11 @@ void tst_associative_containers::lookup_data()
}
}
-template <typename T>
+template <typename T>
void testLookup(int size)
{
T container;
-
+
for (int i = 0; i < size; ++i)
container.insert(i, i);
@@ -122,7 +122,7 @@ void testLookup(int size)
QBENCHMARK {
for (int i = 0; i < size; ++i)
val = container.value(i);
-
+
}
}
diff --git a/tests/benchmarks/corelib/tools/qregexp/main.cpp b/tests/benchmarks/corelib/tools/qregexp/main.cpp
index a34888ab13..3f8ebbecc5 100644
--- a/tests/benchmarks/corelib/tools/qregexp/main.cpp
+++ b/tests/benchmarks/corelib/tools/qregexp/main.cpp
@@ -139,13 +139,13 @@ void tst_qregexp::escape_data()
QTest::newRow("escape 0") << "Hello world" << "Hello world";
QTest::newRow("escape 1") << "(Hello world)" << "\\(Hello world\\)";
- {
+ {
QString s;
for (int i = 0; i < 10; ++i)
s += "(escape)";
QTest::newRow("escape 10") << s << QRegExp::escape(s);
}
- {
+ {
QString s;
for (int i = 0; i < 100; ++i)
s += "(escape)";
@@ -242,7 +242,7 @@ void tst_qregexp::escape_new2()
*quotedData = c;
++quotedData;
}
- quoted.resize(pattern.size() + escaped);
+ quoted.resize(pattern.size() + escaped);
verify(quoted, expected);
}
@@ -329,7 +329,7 @@ void tst_qregexp::escape_new4()
const QLatin1Char backslash('\\');
QString quoted(n * 2, backslash);
QChar *quotedData = quoted.data();
- for (int j = 0; j != i; ++j)
+ for (int j = 0; j != i; ++j)
*quotedData++ = *patternData++;
int escaped = 0;
for (; i != n; ++i) {
@@ -342,7 +342,7 @@ void tst_qregexp::escape_new4()
++quotedData;
++patternData;
}
- quoted.resize(n + escaped);
+ quoted.resize(n + escaped);
verify(quoted, expected);
// "return quoted"
}
diff --git a/tests/benchmarks/corelib/tools/qvector/main.cpp b/tests/benchmarks/corelib/tools/qvector/main.cpp
index 3c6defb572..f7325f7998 100644
--- a/tests/benchmarks/corelib/tools/qvector/main.cpp
+++ b/tests/benchmarks/corelib/tools/qvector/main.cpp
@@ -83,7 +83,7 @@ qvector_const_read_access:
xorl %eax, %eax
.L183:
! fldl s
-! faddl 16(%edx,%eax,8)
+! faddl 16(%edx,%eax,8)
! addl $1, %eax
! cmpl $10000, %eax
! fstpl s
diff --git a/tests/benchmarks/corelib/tools/qvector/qrawvector.h b/tests/benchmarks/corelib/tools/qvector/qrawvector.h
index 3f0d72a231..f358909eb1 100644
--- a/tests/benchmarks/corelib/tools/qvector/qrawvector.h
+++ b/tests/benchmarks/corelib/tools/qvector/qrawvector.h
@@ -100,7 +100,7 @@ public:
static T *fromBase(void *d)
{ return (T*)((char*)d + offsetOfTypedData()); }
- inline QRawVector()
+ inline QRawVector()
{ m_begin = fromBase(0); m_alloc = m_size = 0; realloc(m_size, m_alloc, true); }
explicit QRawVector(int size);
QRawVector(int size, const T &t);