summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Burchell <robin.burchell@collabora.com>2012-01-21 13:54:36 +0200
committerQt by Nokia <qt-info@nokia.com>2012-01-21 13:04:57 +0100
commit642155703e9d91db6229f3863b885104e49f0b61 (patch)
tree4e8be960bcb3f57cf049d6d9f6956d048e0cf0a3
parent3b42024fcc49ad0603bc3a601ebe32b015d6a381 (diff)
Minor style fixups.
Add spaces where necessary, and pull braces back to the same line. Change-Id: If543686c9727a110f8a91f1a88e08d5d2ac12284 Reviewed-by: Richard J. Moore <rich@kde.org>
-rw-r--r--tests/auto/corelib/tools/qalgorithms/tst_qalgorithms.cpp29
1 files changed, 12 insertions, 17 deletions
diff --git a/tests/auto/corelib/tools/qalgorithms/tst_qalgorithms.cpp b/tests/auto/corelib/tools/qalgorithms/tst_qalgorithms.cpp
index 5735c4043b..d88fb9a82f 100644
--- a/tests/auto/corelib/tools/qalgorithms/tst_qalgorithms.cpp
+++ b/tests/auto/corelib/tools/qalgorithms/tst_qalgorithms.cpp
@@ -105,29 +105,24 @@ QVector<DataType> generateData(QString dataSetType, const int length)
{
QVector<DataType> container;
if (dataSetType == "Random") {
- for(int i=0; i < length; ++i)
+ for (int i = 0; i < length; ++i)
container.append(rand());
- }
- else if (dataSetType == "Ascending") {
- for (int i=0; i < length; ++i)
+ } 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)
+ } 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)
+ } 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)
+ } 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)
+ } else if (dataSetType == "Almost Sorted") {
+ for (int i = 0; i < length; ++i)
container.append(i);
- for(int i = 0; i<= length / 10; ++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);