summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/concurrent/qtconcurrentfilter/tst_qtconcurrentfilter.cpp23
-rw-r--r--tests/auto/concurrent/qtconcurrentiteratekernel/tst_qtconcurrentiteratekernel.cpp10
-rw-r--r--tests/auto/concurrent/qtconcurrentmap/tst_qtconcurrentmap.cpp6
-rw-r--r--tests/auto/concurrent/qtconcurrentrun/tst_qtconcurrentrun.cpp6
-rw-r--r--tests/auto/corelib/global/qrand/tst_qrand.cpp2
-rw-r--r--tests/auto/corelib/io/qfile/stdinprocess/main.cpp2
-rw-r--r--tests/auto/corelib/io/qfile/tst_qfile.cpp6
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessEchoGui/main_win.cpp4
-rw-r--r--tests/auto/corelib/io/qprocess/testSoftExit/main_unix.cpp2
-rw-r--r--tests/auto/corelib/io/qprocess/testSoftExit/main_win.cpp2
-rw-r--r--tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp2
-rw-r--r--tests/auto/corelib/plugin/quuid/testProcessUniqueness/main.cpp2
-rw-r--r--tests/auto/corelib/statemachine/qstate/tst_qstate.cpp16
-rw-r--r--tests/auto/corelib/thread/qfuture/tst_qfuture.cpp32
-rw-r--r--tests/auto/corelib/thread/qfuturewatcher/tst_qfuturewatcher.cpp12
-rw-r--r--tests/auto/corelib/thread/qthread/tst_qthread.cpp2
-rw-r--r--tests/auto/corelib/thread/qthreadpool/tst_qthreadpool.cpp2
-rw-r--r--tests/auto/corelib/tools/qcryptographichash/tst_qcryptographichash.cpp6
-rw-r--r--tests/auto/corelib/tools/qmargins/tst_qmargins.cpp2
-rw-r--r--tests/auto/corelib/tools/qqueue/tst_qqueue.cpp18
-rw-r--r--tests/auto/corelib/tools/qsharedpointer/externaltests.pri2
-rw-r--r--tests/auto/dbus/qdbusmetaobject/tst_qdbusmetaobject.cpp26
-rw-r--r--tests/auto/dbus/qdbusxmlparser/tst_qdbusxmlparser.cpp4
-rw-r--r--tests/auto/gui/image/qicon/tst_qicon.cpp2
-rw-r--r--tests/auto/gui/image/qimageiohandler/tst_qimageiohandler.cpp2
-rw-r--r--tests/auto/gui/image/qimagereader/images/black.xpm30
-rw-r--r--tests/auto/gui/image/qpicture/tst_qpicture.cpp39
-rw-r--r--tests/auto/gui/kernel/qtouchevent/tst_qtouchevent.cpp6
-rw-r--r--tests/auto/gui/painting/qpathclipper/paths.cpp14
-rw-r--r--tests/auto/gui/text/qstatictext/tst_qstatictext.cpp2
-rw-r--r--tests/auto/gui/text/qsyntaxhighlighter/tst_qsyntaxhighlighter.cpp10
-rw-r--r--tests/auto/gui/text/qtextformat/tst_qtextformat.cpp2
-rw-r--r--tests/auto/gui/text/qtextscriptengine/generate/main.cpp2
-rw-r--r--tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp898
-rw-r--r--tests/auto/network/access/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp6
-rw-r--r--tests/auto/network/access/qnetworkdiskcache/tst_qnetworkdiskcache.cpp2
-rw-r--r--tests/auto/network/access/qnetworkreply/echo/main.cpp2
-rw-r--r--tests/auto/network/bearer/qnetworkconfiguration/tst_qnetworkconfiguration.cpp8
-rw-r--r--tests/auto/network/bearer/qnetworkconfigurationmanager/tst_qnetworkconfigurationmanager.cpp4
-rw-r--r--tests/auto/network/bearer/qnetworksession/test/tst_qnetworksession.cpp60
-rw-r--r--tests/auto/network/kernel/qhostaddress/tst_qhostaddress.cpp2
-rw-r--r--tests/auto/network/socket/qlocalsocket/tst_qlocalsocket.cpp6
-rw-r--r--tests/auto/network/socket/qtcpsocket/stressTest/Test.cpp4
-rw-r--r--tests/auto/network/socket/qtcpsocket/stressTest/main.cpp2
-rw-r--r--tests/auto/network/socket/qudpsocket/udpServer/main.cpp6
-rw-r--r--tests/auto/network/ssl/qsslerror/tst_qsslerror.cpp2
-rw-r--r--tests/auto/other/collections/tst_collections.cpp2
-rw-r--r--tests/auto/other/lancelot/scripts/background.qps26
-rw-r--r--tests/auto/other/lancelot/scripts/bitmaps.qps4
-rw-r--r--tests/auto/other/lancelot/scripts/clippaths.qps12
-rw-r--r--tests/auto/other/lancelot/scripts/cliprects.qps12
-rw-r--r--tests/auto/other/lancelot/scripts/conical_gradients.qps2
-rw-r--r--tests/auto/other/lancelot/scripts/dashes.qps38
-rw-r--r--tests/auto/other/lancelot/scripts/deviceclipping.qps2
-rw-r--r--tests/auto/other/lancelot/scripts/pixmap_scaling.qps38
-rw-r--r--tests/auto/other/lancelot/scripts/pixmap_subpixel.qps12
-rw-r--r--tests/auto/other/lancelot/scripts/pixmaps.qps10
-rw-r--r--tests/auto/other/lancelot/scripts/rasterops.qps4
-rw-r--r--tests/auto/other/lancelot/scripts/sizes.qps6
-rw-r--r--tests/auto/other/lancelot/scripts/text.qps50
-rw-r--r--tests/auto/other/lancelot/scripts/tiled_pixmap.qps10
-rw-r--r--tests/auto/other/macgui/guitest.cpp22
-rw-r--r--tests/auto/other/macgui/guitest.h8
-rw-r--r--tests/auto/other/macgui/tst_macgui.cpp6
-rw-r--r--tests/auto/other/macnativeevents/tst_macnativeevents.cpp2
-rw-r--r--tests/auto/other/qnetworkaccessmanager_and_qprogressdialog/tst_qnetworkaccessmanager_and_qprogressdialog.cpp2
-rw-r--r--tests/auto/other/windowsmobile/test/tst_windowsmobile.cpp2
-rw-r--r--tests/auto/other/windowsmobile/testQMenuBar/main.cpp2
-rw-r--r--tests/auto/sql/kernel/qsql/tst_qsql.cpp148
-rwxr-xr-xtests/auto/test.pl2
-rw-r--r--tests/auto/testlib/selftests/datetime/tst_datetime.cpp2
-rw-r--r--tests/auto/tools/moc/gadgetwithnoenums.h30
-rw-r--r--tests/auto/tools/moc/task189996.h10
-rw-r--r--tests/auto/tools/moc/template-gtgt.h4
-rw-r--r--tests/auto/widgets/dialogs/qerrormessage/tst_qerrormessage.cpp2
-rw-r--r--tests/auto/widgets/dialogs/qwizard/tst_qwizard.cpp6
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp2
-rw-r--r--tests/auto/widgets/itemviews/qtablewidget/tst_qtablewidget.cpp2
-rw-r--r--tests/auto/widgets/kernel/qapplication/wincmdline/main.cpp7
-rw-r--r--tests/auto/widgets/kernel/qformlayout/tst_qformlayout.cpp6
-rw-r--r--tests/auto/widgets/kernel/qlayout/tst_qlayout.cpp12
-rw-r--r--tests/auto/widgets/kernel/qtooltip/tst_qtooltip.cpp2
-rw-r--r--tests/auto/widgets/styles/qmacstyle/tst_qmacstyle.cpp4
-rw-r--r--tests/auto/widgets/styles/qstyle/tst_qstyle.cpp4
-rw-r--r--tests/auto/widgets/styles/qstyleoption/tst_qstyleoption.cpp6
-rw-r--r--tests/auto/widgets/util/qundogroup/tst_qundogroup.cpp2
-rw-r--r--tests/auto/widgets/util/qundostack/tst_qundostack.cpp92
-rw-r--r--tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp4
-rw-r--r--tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp10
-rw-r--r--tests/auto/widgets/widgets/qscrollarea/tst_qscrollarea.cpp2
-rw-r--r--tests/auto/widgets/widgets/qsplitter/tst_qsplitter.cpp14
-rw-r--r--tests/auto/widgets/widgets/qtabwidget/tst_qtabwidget.cpp4
-rw-r--r--tests/auto/xml/dom/qdom/tst_qdom.cpp18
-rw-r--r--tests/auto/xml/sax/qxml/tst_qxml.cpp6
-rw-r--r--tests/auto/xml/sax/qxmlinputsource/tst_qxmlinputsource.cpp4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/parser/parser.cpp2
-rw-r--r--tests/baselineserver/shared/lookup3.cpp32
-rw-r--r--tests/benchmarks/README48
-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
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractitemcontainer.cpp14
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractitemview.cpp23
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractscrollarea.cpp14
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractscrollarea.h4
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/backgrounditem.cpp1
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/backgrounditem.h8
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/button.cpp22
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/button.h8
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/commandline.cpp4
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/commandline.h2
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/dummydatagen.cpp22
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/dummydatagen.h6
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/gvbwidget.h2
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/iconitem.cpp6
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/iconitem.h2
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/itemrecyclinglist.cpp12
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/itemrecyclinglist.h2
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/label.cpp16
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/label.h2
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listitem.cpp74
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listitemcache.cpp4
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listitemcache.h2
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listitemcontainer.cpp6
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listmodel.cpp2
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listwidget.cpp8
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/mainview.cpp18
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/mainview.h6
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/menu.cpp24
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/menu.h6
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/recycledlistitem.cpp4
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/resourcemoninterface.h16
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/scrollbar.cpp36
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/scrollbar.h6
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/scroller.cpp10
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/settings.h8
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/simplelist.cpp10
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/simplelistview.cpp24
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/simplelistview.h2
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/themeevent.cpp4
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/themeevent.h2
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/topbar.cpp156
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/topbar.h31
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/webview.cpp28
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/webview_p.h2
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/main.cpp2
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/mainwindow.h2
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/view.h2
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chiptester.h4
-rw-r--r--tests/benchmarks/gui/image/blendbench/main.cpp2
-rw-r--r--tests/benchmarks/gui/image/qimagereader/images/black.xpm30
-rw-r--r--tests/benchmarks/gui/itemviews/qtableview/tst_qtableview.cpp14
-rw-r--r--tests/benchmarks/gui/painting/qtbench/benchmarktests.h2
-rw-r--r--tests/benchmarks/gui/text/qtext/main.cpp2
-rw-r--r--tests/manual/bearerex/bearerex.cpp42
-rw-r--r--tests/manual/bearerex/bearerex.h8
-rw-r--r--tests/manual/bearerex/xqlistwidget.cpp4
-rw-r--r--tests/manual/bearerex/xqlistwidget.h4
-rw-r--r--tests/manual/inputmethodhints/inputmethodhints.h2
-rw-r--r--tests/manual/qcursor/grab_override/mainwindow.h4
-rw-r--r--tests/manual/qtouchevent/touchwidget.cpp2
-rw-r--r--tests/manual/repaint/mainwindow/main.cpp10
-rw-r--r--tests/manual/repaint/scrollarea/main.cpp4
-rw-r--r--tests/manual/repaint/splitter/main.cpp2
-rw-r--r--tests/manual/repaint/tableview/main.cpp5
-rw-r--r--tests/manual/repaint/task141091/main.cpp11
-rw-r--r--tests/manual/repaint/widget/main.cpp8
171 files changed, 1466 insertions, 1484 deletions
diff --git a/tests/auto/concurrent/qtconcurrentfilter/tst_qtconcurrentfilter.cpp b/tests/auto/concurrent/qtconcurrentfilter/tst_qtconcurrentfilter.cpp
index 69d1535ccf..4ce11f208f 100644
--- a/tests/auto/concurrent/qtconcurrentfilter/tst_qtconcurrentfilter.cpp
+++ b/tests/auto/concurrent/qtconcurrentfilter/tst_qtconcurrentfilter.cpp
@@ -100,7 +100,6 @@ void tst_QtConcurrentFilter::filter()
QCOMPARE(vector, QVector<int>() << 2 << 4);
}
-
// function
{
QList<int> list;
@@ -554,7 +553,6 @@ void tst_QtConcurrentFilter::filteredReduced()
int sum = QtConcurrent::filteredReduced<int>(vector, KeepEvenIntegers(), IntSumReduce());
QCOMPARE(sum, 6);
}
-
{
int sum = QtConcurrent::filteredReduced<int>(list.begin(),
list.end(),
@@ -1396,43 +1394,42 @@ void tst_QtConcurrentFilter::filteredReduced()
// ### the same as above, with an initial result value
}
-bool filterfn(int i)
-{
+bool filterfn(int i)
+{
return (i % 2);
-}
+}
void tst_QtConcurrentFilter::resultAt()
{
- QList<int> ints;
+ QList<int> ints;
for (int i=0; i < 1000; ++i)
ints << i;
QFuture<int> future = QtConcurrent::filtered(ints, filterfn);
- future.waitForFinished();
+ future.waitForFinished();
-
for (int i = 0; i < future.resultCount(); ++i) {
QCOMPARE(future.resultAt(i), ints.at(i * 2 + 1));
}
}
-bool waitFilterfn(const int &i)
-{
+bool waitFilterfn(const int &i)
+{
QTest::qWait(1);
return (i % 2);
-}
+}
void tst_QtConcurrentFilter::incrementalResults()
{
const int count = 200;
- QList<int> ints;
+ QList<int> ints;
for (int i=0; i < count; ++i)
ints << i;
QFuture<int> future = QtConcurrent::filtered(ints, waitFilterfn);
-
+
QList<int> results;
while (future.isFinished() == false) {
diff --git a/tests/auto/concurrent/qtconcurrentiteratekernel/tst_qtconcurrentiteratekernel.cpp b/tests/auto/concurrent/qtconcurrentiteratekernel/tst_qtconcurrentiteratekernel.cpp
index 3613e8df60..33133e876f 100644
--- a/tests/auto/concurrent/qtconcurrentiteratekernel/tst_qtconcurrentiteratekernel.cpp
+++ b/tests/auto/concurrent/qtconcurrentiteratekernel/tst_qtconcurrentiteratekernel.cpp
@@ -112,7 +112,7 @@ public:
return false;
}
bool runIteration(TestIterator it, int index , void *result)
- {
+ {
return runIterations(it, index, index + 1, result);
}
@@ -132,7 +132,7 @@ public:
return false;
}
bool runIteration(TestIterator it, int index , void *result)
- {
+ {
return runIterations(it, index, index + 1, result);
}
};
@@ -166,7 +166,7 @@ public:
return false;
}
bool runIteration(TestIterator it, int index , void *result)
- {
+ {
return runIterations(it, index, index + 1, result);
}
};
@@ -217,13 +217,13 @@ public:
if (100 >= begin && 100 < end) {
throttling = true;
}
-
+
QTest::qWait(1);
return false;
}
bool runIteration(TestIterator it, int index , void *result)
- {
+ {
return runIterations(it, index, index + 1, result);
}
diff --git a/tests/auto/concurrent/qtconcurrentmap/tst_qtconcurrentmap.cpp b/tests/auto/concurrent/qtconcurrentmap/tst_qtconcurrentmap.cpp
index eeacf2ccbb..1743ec3459 100644
--- a/tests/auto/concurrent/qtconcurrentmap/tst_qtconcurrentmap.cpp
+++ b/tests/auto/concurrent/qtconcurrentmap/tst_qtconcurrentmap.cpp
@@ -2226,12 +2226,12 @@ int mapper(const int &i)
void tst_QtConcurrentMap::incrementalResults()
{
const int count = 200;
- QList<int> ints;
+ QList<int> ints;
for (int i=0; i < count; ++i)
ints << i;
QFuture<int> future = QtConcurrent::mapped(ints, mapper);
-
+
QList<int> results;
while (future.isFinished() == false) {
@@ -2311,7 +2311,7 @@ void tst_QtConcurrentMap::stlContainers()
QCOMPARE(list2.size(), (std::vector<int>::size_type)(2));
QtConcurrent::mapped(list, mapper).waitForFinished();
-
+
QtConcurrent::blockingMap(list, multiplyBy2Immutable);
}
diff --git a/tests/auto/concurrent/qtconcurrentrun/tst_qtconcurrentrun.cpp b/tests/auto/concurrent/qtconcurrentrun/tst_qtconcurrentrun.cpp
index ab1b0e9d06..8a289ff4e1 100644
--- a/tests/auto/concurrent/qtconcurrentrun/tst_qtconcurrentrun.cpp
+++ b/tests/auto/concurrent/qtconcurrentrun/tst_qtconcurrentrun.cpp
@@ -137,10 +137,10 @@ public:
void tst_QtConcurrentRun::returnValue()
{
QFuture<int> f;
-
+
f = run(returnInt0);
QCOMPARE(f.result(), 10);
-
+
A a;
f = run(&a, &A::member0);
QCOMPARE(f.result(), 10);
@@ -214,7 +214,7 @@ void tst_QtConcurrentRun::functionObject()
{
QFuture<void> f;
TestClass c;
-
+
f = run(c);
f = run(&c);
f = run(c, 10);
diff --git a/tests/auto/corelib/global/qrand/tst_qrand.cpp b/tests/auto/corelib/global/qrand/tst_qrand.cpp
index 6f64ad74b2..4cbbb8de0f 100644
--- a/tests/auto/corelib/global/qrand/tst_qrand.cpp
+++ b/tests/auto/corelib/global/qrand/tst_qrand.cpp
@@ -64,7 +64,7 @@ void tst_QRand::testqrand()
for (int i=0; i<numTestValues; ++i)
if (generatedNumbers[i] != qrand())
generatesSameSequence = false;
-
+
QVERIFY(generatesSameSequence);
for (unsigned int seed=1; seed < 10; seed+=100) {
diff --git a/tests/auto/corelib/io/qfile/stdinprocess/main.cpp b/tests/auto/corelib/io/qfile/stdinprocess/main.cpp
index 1c22da45b3..9ca531f615 100644
--- a/tests/auto/corelib/io/qfile/stdinprocess/main.cpp
+++ b/tests/auto/corelib/io/qfile/stdinprocess/main.cpp
@@ -50,7 +50,7 @@ int main(int argc, char *argv[])
printf("echos all its input to its output.\n");
return 1;
}
-
+
QFile file;
if (strcmp(argv[1], "all") == 0) {
diff --git a/tests/auto/corelib/io/qfile/tst_qfile.cpp b/tests/auto/corelib/io/qfile/tst_qfile.cpp
index 0d27246d82..929865d4d6 100644
--- a/tests/auto/corelib/io/qfile/tst_qfile.cpp
+++ b/tests/auto/corelib/io/qfile/tst_qfile.cpp
@@ -1322,7 +1322,7 @@ void tst_QFile::copyFallback()
QVERIFY(QFile::exists("file-copy-destination.txt"));
QVERIFY(!file.isOpen());
- file.close();
+ file.close();
QFile::setPermissions("file-copy-destination.txt",
QFile::ReadOwner | QFile::WriteOwner);
}
@@ -2928,8 +2928,8 @@ void tst_QFile::map()
// exotic test to make sure that multiple maps work
// note: windows ce does not reference count mutliple maps
- // it's essentially just the same reference but it
- // cause a resource lock on the file which prevents it
+ // it's essentially just the same reference but it
+ // cause a resource lock on the file which prevents it
// from being removed uchar *memory1 = file.map(0, file.size());
uchar *memory1 = file.map(0, file.size());
QCOMPARE(file.error(), QFile::NoError);
diff --git a/tests/auto/corelib/io/qprocess/testProcessEchoGui/main_win.cpp b/tests/auto/corelib/io/qprocess/testProcessEchoGui/main_win.cpp
index 270666deb6..df96e1cbf3 100644
--- a/tests/auto/corelib/io/qprocess/testProcessEchoGui/main_win.cpp
+++ b/tests/auto/corelib/io/qprocess/testProcessEchoGui/main_win.cpp
@@ -50,8 +50,8 @@ int APIENTRY WinMain(HINSTANCE /* hInstance */,
HANDLE hStdin = GetStdHandle(STD_INPUT_HANDLE);
HANDLE hStdout = GetStdHandle(STD_OUTPUT_HANDLE);
-
- HANDLE hStderr = GetStdHandle(STD_ERROR_HANDLE);
+
+ HANDLE hStderr = GetStdHandle(STD_ERROR_HANDLE);
for (;;) {
diff --git a/tests/auto/corelib/io/qprocess/testSoftExit/main_unix.cpp b/tests/auto/corelib/io/qprocess/testSoftExit/main_unix.cpp
index 02cc31168b..c7f5f88f9c 100644
--- a/tests/auto/corelib/io/qprocess/testSoftExit/main_unix.cpp
+++ b/tests/auto/corelib/io/qprocess/testSoftExit/main_unix.cpp
@@ -55,7 +55,7 @@ int main()
printf("Ready\n");
fflush(stdout);
-
+
for (int i = 0; i < 5; ++i)
sleep(1);
return 0;
diff --git a/tests/auto/corelib/io/qprocess/testSoftExit/main_win.cpp b/tests/auto/corelib/io/qprocess/testSoftExit/main_win.cpp
index bed8d921b3..e478a18bd6 100644
--- a/tests/auto/corelib/io/qprocess/testSoftExit/main_win.cpp
+++ b/tests/auto/corelib/io/qprocess/testSoftExit/main_win.cpp
@@ -53,6 +53,6 @@ int main()
if (msg.message == WM_CLOSE)
PostQuitMessage(0);
}
-
+
return int(msg.wParam);
}
diff --git a/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp b/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp
index 11dbc1e9c1..515a10426c 100644
--- a/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp
+++ b/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp
@@ -402,7 +402,7 @@ void tst_QResourceEngine::checkUnregisterResource_data()
QTest::addColumn<int>("size");
QTest::newRow("currentdir.txt") << QFINDTESTDATA("runtime_resource.rcc") << QString("/check_unregister/")
- << QString(":/check_unregister/runtime_resource/test/abc/123/+++/currentdir.txt")
+ << QString(":/check_unregister/runtime_resource/test/abc/123/+++/currentdir.txt")
<< (int)QFileInfo(QFINDTESTDATA("testqrc/currentdir.txt")).size();
}
diff --git a/tests/auto/corelib/plugin/quuid/testProcessUniqueness/main.cpp b/tests/auto/corelib/plugin/quuid/testProcessUniqueness/main.cpp
index 651fa3b1db..21e067bc73 100644
--- a/tests/auto/corelib/plugin/quuid/testProcessUniqueness/main.cpp
+++ b/tests/auto/corelib/plugin/quuid/testProcessUniqueness/main.cpp
@@ -47,7 +47,7 @@ int main(int argc, char **argv)
{
Q_UNUSED(argc)
Q_UNUSED(argv)
-
+
// First, break QUuid.
qrand();
diff --git a/tests/auto/corelib/statemachine/qstate/tst_qstate.cpp b/tests/auto/corelib/statemachine/qstate/tst_qstate.cpp
index 9d7bbd4f5c..ae32731cbc 100644
--- a/tests/auto/corelib/statemachine/qstate/tst_qstate.cpp
+++ b/tests/auto/corelib/statemachine/qstate/tst_qstate.cpp
@@ -77,7 +77,7 @@ public:
public slots:
void slot() { called = true; }
-
+
};
void tst_QState::assignProperty()
@@ -89,7 +89,7 @@ void tst_QState::assignProperty()
QState *s1 = new QState(&machine);
s1->assignProperty(object, "fooBar", 20);
-
+
machine.setInitialState(s1);
machine.start();
QCoreApplication::processEvents();
@@ -107,7 +107,7 @@ void tst_QState::assignPropertyTwice()
QState *s1 = new QState(&machine);
s1->assignProperty(object, "fooBar", 20);
s1->assignProperty(object, "fooBar", 30);
-
+
machine.setInitialState(s1);
machine.start();
QCoreApplication::processEvents();
@@ -118,7 +118,7 @@ void tst_QState::assignPropertyTwice()
class EventTestTransition: public QAbstractTransition
{
public:
- EventTestTransition(QEvent::Type type, QState *targetState)
+ EventTestTransition(QEvent::Type type, QState *targetState)
: QAbstractTransition(), m_type(type)
{
setTargetState(targetState);
@@ -134,18 +134,18 @@ protected:
private:
QEvent::Type m_type;
-
+
};
-void tst_QState::historyInitialState()
+void tst_QState::historyInitialState()
{
QStateMachine machine;
QState *s1 = new QState(&machine);
-
+
QState *s2 = new QState(&machine);
QHistoryState *h1 = new QHistoryState(s2);
-
+
s2->setInitialState(h1);
QState *s3 = new QState(s2);
diff --git a/tests/auto/corelib/thread/qfuture/tst_qfuture.cpp b/tests/auto/corelib/thread/qfuture/tst_qfuture.cpp
index c9a41b29f8..c86befdf1b 100644
--- a/tests/auto/corelib/thread/qfuture/tst_qfuture.cpp
+++ b/tests/auto/corelib/thread/qfuture/tst_qfuture.cpp
@@ -243,13 +243,13 @@ void tst_QFuture::resultStore()
store.addResult(2, &int2); // add result at index 2
QCOMPARE(store.contains(2), false); // but 1 is missing, so this 2 won't be reported yet.
- store.addResult(1, &int1);
+ store.addResult(1, &int1);
QCOMPARE(store.contains(1), true);
QCOMPARE(store.contains(2), true); // 2 should be visible now.
- store.addResult(4, &int0);
- store.addResult(5, &int0);
- store.addResult(7, &int0);
+ store.addResult(4, &int0);
+ store.addResult(5, &int0);
+ store.addResult(7, &int0);
QCOMPARE(store.contains(4), false);
QCOMPARE(store.contains(5), false);
QCOMPARE(store.contains(7), false);
@@ -273,9 +273,9 @@ void tst_QFuture::resultStore()
store.addResult(0, &int0);
QCOMPARE(store.contains(0), true);
-
+
store.addResult(2, &int0);
- QCOMPARE(store.contains(2), false);
+ QCOMPARE(store.contains(2), false);
store.addCanceledResult(1); // report no result at 1
@@ -289,7 +289,7 @@ void tst_QFuture::resultStore()
store.addResult(6, &int0);
store.addResult(7, &int0);
QCOMPARE(store.contains(3), false);
-
+
store.addCanceledResult(4);
store.addCanceledResult(5);
@@ -311,10 +311,10 @@ void tst_QFuture::resultStore()
store.addResult(0, &int0);
QCOMPARE(store.count(), 1); // result 0 becomes available
QCOMPARE(store.contains(0), true);
-
+
store.addResult(2, &int0);
QCOMPARE(store.count(), 1);
- QCOMPARE(store.contains(2), false);
+ QCOMPARE(store.contains(2), false);
store.addCanceledResult(1);
QCOMPARE(store.count(), 2); // result 2 is renamed to 1 and becomes available
@@ -332,7 +332,7 @@ void tst_QFuture::resultStore()
store.addResult(7, &int0);
QCOMPARE(store.count(), 3);
QCOMPARE(store.contains(3), false);
-
+
store.addCanceledResult(4);
store.addCanceledResult(5);
QCOMPARE(store.count(), 5); // 6 and 7 is renamed to 3 and 4 and becomes available
@@ -347,13 +347,13 @@ void tst_QFuture::resultStore()
QCOMPARE(store.contains(6), false);
QCOMPARE(store.contains(7), false);
}
-
+
{
// test resultCount in non-filtered mode. It should always be possible
// to iterate through the results 0 to resultCount.
QtPrivate::ResultStore<int> store;
store.addResult(0, &int0);
-
+
QCOMPARE(store.count(), 1);
store.addResult(2, &int0);
@@ -440,7 +440,7 @@ void tst_QFuture::resultStore()
store.addCanceledResults(0, 3);
QCOMPARE(store.count(), 2); // results at 3 and 4 become available at index 0, 1
- store.addResult(5, &int0);
+ store.addResult(5, &int0);
QCOMPARE(store.count(), 3);// result 5 becomes available at index 2
}
@@ -1112,9 +1112,9 @@ void tst_QFuture::iterators()
for (int i = 0; i < resultCount; ++i) {
e.reportResult(i);
}
-
+
e.reportFinished();
-
+
{
QFutureIterator<int> it(f);
QFutureIterator<int> it2(it);
@@ -1122,7 +1122,7 @@ void tst_QFuture::iterators()
{
QFutureIterator<int> it(f);
-
+
for (int i = 0; i < resultCount - 1; ++i) {
QVERIFY(it.hasNext());
QCOMPARE(it.peekNext(), i);
diff --git a/tests/auto/corelib/thread/qfuturewatcher/tst_qfuturewatcher.cpp b/tests/auto/corelib/thread/qfuturewatcher/tst_qfuturewatcher.cpp
index 467dd4b348..b2b0eace34 100644
--- a/tests/auto/corelib/thread/qfuturewatcher/tst_qfuturewatcher.cpp
+++ b/tests/auto/corelib/thread/qfuturewatcher/tst_qfuturewatcher.cpp
@@ -797,7 +797,7 @@ public:
ResultReadyTester(QFutureWatcher<int> *watcher)
:m_watcher(watcher), filter(false), ok(true), count(0)
{
-
+
}
public slots:
void resultReadyAt(int index)
@@ -834,7 +834,7 @@ void tst_QFutureWatcher::incrementalMapResults()
connect(&watcher, SIGNAL(resultReadyAt(int)), &resultReadyTester, SLOT(resultReadyAt(int)));
const int count = 10000;
- QList<int> ints;
+ QList<int> ints;
for (int i = 0; i < count; ++i)
ints << i;
@@ -846,7 +846,7 @@ void tst_QFutureWatcher::incrementalMapResults()
QCOMPARE(resultReadyTester.count, count);
QVERIFY(resultReadyTester.ok);
QVERIFY(watcher.isFinished());
- future.waitForFinished();
+ future.waitForFinished();
}
bool filterer(int i)
@@ -873,7 +873,7 @@ void tst_QFutureWatcher::incrementalFilterResults()
connect(&watcher, SIGNAL(resultReadyAt(int)), &resultReadyTester, SLOT(resultReadyAt(int)));
const int count = 10000;
- QList<int> ints;
+ QList<int> ints;
for (int i = 0; i < count; ++i)
ints << i;
@@ -885,12 +885,12 @@ void tst_QFutureWatcher::incrementalFilterResults()
QCOMPARE(resultReadyTester.count, count / 2);
QVERIFY(resultReadyTester.ok);
QVERIFY(watcher.isFinished());
- future.waitForFinished();
+ future.waitForFinished();
}
void tst_QFutureWatcher::qfutureSynchronizer()
{
- int taskCount = 1000;
+ int taskCount = 1000;
QTime t;
t.start();
diff --git a/tests/auto/corelib/thread/qthread/tst_qthread.cpp b/tests/auto/corelib/thread/qthread/tst_qthread.cpp
index e6d824be96..7fbb5e9f5f 100644
--- a/tests/auto/corelib/thread/qthread/tst_qthread.cpp
+++ b/tests/auto/corelib/thread/qthread/tst_qthread.cpp
@@ -1026,7 +1026,7 @@ void tst_QThread::exitAndExec()
thread.sem2.acquire();
int v = thread.value;
QCOMPARE(v, 556);
-
+
//test that the thread is running by executing queued connected signal there
Syncronizer sync1;
sync1.moveToThread(&thread);
diff --git a/tests/auto/corelib/thread/qthreadpool/tst_qthreadpool.cpp b/tests/auto/corelib/thread/qthreadpool/tst_qthreadpool.cpp
index 57a43a2b33..a93a94a470 100644
--- a/tests/auto/corelib/thread/qthreadpool/tst_qthreadpool.cpp
+++ b/tests/auto/corelib/thread/qthreadpool/tst_qthreadpool.cpp
@@ -783,7 +783,7 @@ void tst_QThreadPool::waitForDoneTimeout()
public:
QMutex mutex;
BlockedTask() { setAutoDelete(false); }
-
+
void run()
{
mutex.lock();
diff --git a/tests/auto/corelib/tools/qcryptographichash/tst_qcryptographichash.cpp b/tests/auto/corelib/tools/qcryptographichash/tst_qcryptographichash.cpp
index e941ceb456..de252a5d5e 100644
--- a/tests/auto/corelib/tools/qcryptographichash/tst_qcryptographichash.cpp
+++ b/tests/auto/corelib/tools/qcryptographichash/tst_qcryptographichash.cpp
@@ -169,19 +169,19 @@ void tst_QCryptographicHash::sha1()
// A9993E36 4706816A BA3E2571 7850C26C 9CD0D89D
QCOMPARE(QCryptographicHash::hash("abc", QCryptographicHash::Sha1).toHex().toUpper(),
QByteArray("A9993E364706816ABA3E25717850C26C9CD0D89D"));
-
+
// SHA1("abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq") =
// 84983E44 1C3BD26E BAAE4AA1 F95129E5 E54670F1
QCOMPARE(QCryptographicHash::hash("abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
QCryptographicHash::Sha1).toHex().toUpper(),
QByteArray("84983E441C3BD26EBAAE4AA1F95129E5E54670F1"));
-
+
// SHA1(A million repetitions of "a") =
// 34AA973C D4C4DAA4 F61EEB2B DBAD2731 6534016F
QByteArray as;
for (int i = 0; i < 1000000; ++i)
as += 'a';
- QCOMPARE(QCryptographicHash::hash(as, QCryptographicHash::Sha1).toHex().toUpper(),
+ QCOMPARE(QCryptographicHash::hash(as, QCryptographicHash::Sha1).toHex().toUpper(),
QByteArray("34AA973CD4C4DAA4F61EEB2BDBAD27316534016F"));
}
diff --git a/tests/auto/corelib/tools/qmargins/tst_qmargins.cpp b/tests/auto/corelib/tools/qmargins/tst_qmargins.cpp
index 80311079d4..d22e771b79 100644
--- a/tests/auto/corelib/tools/qmargins/tst_qmargins.cpp
+++ b/tests/auto/corelib/tools/qmargins/tst_qmargins.cpp
@@ -74,7 +74,7 @@ void tst_QMargins::getSetCheck()
margins.setRight(5);
QVERIFY(!margins.isNull());
QCOMPARE(margins, QMargins(5, 0, 5, 0));
-}
+}
void tst_QMargins::operators()
{
diff --git a/tests/auto/corelib/tools/qqueue/tst_qqueue.cpp b/tests/auto/corelib/tools/qqueue/tst_qqueue.cpp
index 88de03e4bf..2fdde3c613 100644
--- a/tests/auto/corelib/tools/qqueue/tst_qqueue.cpp
+++ b/tests/auto/corelib/tools/qqueue/tst_qqueue.cpp
@@ -63,15 +63,15 @@ void tst_QQueue::enqueue_dequeue_data()
void tst_QQueue::enqueue_dequeue()
{
- QFETCH(int, num_items);
-
- int *values = new int[num_items];
- QQueue<int> queue_v;
- QQueue<int*> queue_p;
+ QFETCH(int, num_items);
+
+ int *values = new int[num_items];
+ QQueue<int> queue_v;
+ QQueue<int*> queue_p;
QVERIFY(queue_v.empty());
QVERIFY(queue_p.empty());
-
+
for (int i = 0; i < num_items; i++ ) {
values[i] = i;
queue_p.enqueue(values + i);
@@ -84,11 +84,11 @@ void tst_QQueue::enqueue_dequeue()
v = queue_v.head();
p = queue_p.head();
QCOMPARE(*p, v);
- QCOMPARE(v, i);
+ QCOMPARE(v, i);
v = queue_v.dequeue();
p = queue_p.dequeue();
- QCOMPARE(*p, v);
- QCOMPARE(v, values[i]);
+ QCOMPARE(*p, v);
+ QCOMPARE(v, values[i]);
}
QVERIFY(queue_v.empty());
QVERIFY(queue_p.empty());
diff --git a/tests/auto/corelib/tools/qsharedpointer/externaltests.pri b/tests/auto/corelib/tools/qsharedpointer/externaltests.pri
index 10d30e3c76..b3a01f7990 100644
--- a/tests/auto/corelib/tools/qsharedpointer/externaltests.pri
+++ b/tests/auto/corelib/tools/qsharedpointer/externaltests.pri
@@ -4,4 +4,4 @@ cleanedQMAKESPEC = $$replace(QMAKESPEC, \\\\, /)
DEFINES += DEFAULT_MAKESPEC=\\\"$$cleanedQMAKESPEC\\\"
cross_compile:DEFINES += QTEST_NO_RTTI QTEST_CROSS_COMPILED
-wince*:DEFINES += QTEST_CROSS_COMPILED QTEST_NO_RTTI
+wince*:DEFINES += QTEST_CROSS_COMPILED QTEST_NO_RTTI
diff --git a/tests/auto/dbus/qdbusmetaobject/tst_qdbusmetaobject.cpp b/tests/auto/dbus/qdbusmetaobject/tst_qdbusmetaobject.cpp
index 7b7ad1800c..6340f0f7a6 100644
--- a/tests/auto/dbus/qdbusmetaobject/tst_qdbusmetaobject.cpp
+++ b/tests/auto/dbus/qdbusmetaobject/tst_qdbusmetaobject.cpp
@@ -442,7 +442,7 @@ void tst_QDBusMetaObject::types()
class MethodTest1: public QObject
{
Q_OBJECT
-
+
public slots:
void method() { }
};
@@ -452,7 +452,7 @@ const char MethodTest1_xml[] =
class MethodTest2: public QObject
{
Q_OBJECT
-
+
public slots:
void method(int) { }
};
@@ -462,7 +462,7 @@ const char MethodTest2_xml[] =
class MethodTest3: public QObject
{
Q_OBJECT
-
+
public slots:
void method(int input0) { Q_UNUSED(input0); }
};
@@ -472,7 +472,7 @@ const char MethodTest3_xml[] =
class MethodTest4: public QObject
{
Q_OBJECT
-
+
public slots:
int method() { return 0; }
};
@@ -484,7 +484,7 @@ const char MethodTest4_xml2[] =
class MethodTest5: public QObject
{
Q_OBJECT
-
+
public slots:
int method(int input0) { return input0; }
};
@@ -497,7 +497,7 @@ const char MethodTest5_xml[] =
class MethodTest6: public QObject
{
Q_OBJECT
-
+
public slots:
int method(int input0, int input1) { Q_UNUSED(input0); return input1; }
};
@@ -511,7 +511,7 @@ const char MethodTest6_xml[] =
class MethodTest7: public QObject
{
Q_OBJECT
-
+
public slots:
int method(int input0, int input1, int &output1) { output1 = input1; return input0; }
};
@@ -526,7 +526,7 @@ const char MethodTest7_xml[] =
class MethodTest8: public QObject
{
Q_OBJECT
-
+
public slots:
int method(int input0, int input1, int &output1, int &output2) { output1 = output2 = input1; return input0; }
};
@@ -542,7 +542,7 @@ const char MethodTest8_xml[] =
class MethodTest9: public QObject
{
Q_OBJECT
-
+
public slots:
Q_NOREPLY void method(int) { }
};
@@ -577,7 +577,7 @@ void tst_QDBusMetaObject::methods()
class SignalTest1: public QObject
{
Q_OBJECT
-
+
signals:
void signal();
};
@@ -587,7 +587,7 @@ const char SignalTest1_xml[] =
class SignalTest2: public QObject
{
Q_OBJECT
-
+
signals:
void signal(int);
};
@@ -597,7 +597,7 @@ const char SignalTest2_xml[] =
class SignalTest3: public QObject
{
Q_OBJECT
-
+
signals:
void signal(int output0);
};
@@ -607,7 +607,7 @@ const char SignalTest3_xml[] =
class SignalTest4: public QObject
{
Q_OBJECT
-
+
signals:
void signal(int output0, int);
};
diff --git a/tests/auto/dbus/qdbusxmlparser/tst_qdbusxmlparser.cpp b/tests/auto/dbus/qdbusxmlparser/tst_qdbusxmlparser.cpp
index 08b8ce3db3..8c94f87fd6 100644
--- a/tests/auto/dbus/qdbusxmlparser/tst_qdbusxmlparser.cpp
+++ b/tests/auto/dbus/qdbusxmlparser/tst_qdbusxmlparser.cpp
@@ -96,7 +96,7 @@ void tst_QDBusXmlParser::parsing_data()
QTest::newRow("null") << QString() << 0 << 0 << 0 << introspection;
QTest::newRow("empty") << QString("") << 0 << 0 << 0 << introspection;
-
+
QTest::newRow("junk") << "<junk/>" << 0 << 0 << 0 << introspection;
QTest::newRow("interface-inside-junk") << "<junk><interface name=\"iface.iface1\" /></junk>"
<< 0 << 0 << 0 << introspection;
@@ -429,7 +429,7 @@ void tst_QDBusXmlParser::signals__data()
QTest::newRow("one-out-no-direction") <<
"<signal name=\"Signal\">"
"<arg type=\"s\"/>"
- "</signal>" << map;
+ "</signal>" << map;
// two args with name
signal.outputArgs << arg("i", "bar");
diff --git a/tests/auto/gui/image/qicon/tst_qicon.cpp b/tests/auto/gui/image/qicon/tst_qicon.cpp
index 11fd5f9b2e..c21f725b55 100644
--- a/tests/auto/gui/image/qicon/tst_qicon.cpp
+++ b/tests/auto/gui/image/qicon/tst_qicon.cpp
@@ -80,7 +80,7 @@ private:
const static QIcon staticIcon;
};
-// Creating an icon statically should not cause a crash.
+// Creating an icon statically should not cause a crash.
// But we do not officially support this. See QTBUG-8666
const QIcon tst_QIcon::staticIcon = QIcon::fromTheme("edit-find");
diff --git a/tests/auto/gui/image/qimageiohandler/tst_qimageiohandler.cpp b/tests/auto/gui/image/qimageiohandler/tst_qimageiohandler.cpp
index d76e954ccd..f7d8eef721 100644
--- a/tests/auto/gui/image/qimageiohandler/tst_qimageiohandler.cpp
+++ b/tests/auto/gui/image/qimageiohandler/tst_qimageiohandler.cpp
@@ -63,7 +63,7 @@ class MyImageIOHandler : public QImageIOHandler
{
public:
MyImageIOHandler() : QImageIOHandler() { }
- bool canRead() const { return true; }
+ bool canRead() const { return true; }
bool read(QImage *) { return true; }
};
diff --git a/tests/auto/gui/image/qimagereader/images/black.xpm b/tests/auto/gui/image/qimagereader/images/black.xpm
index d7925bf211..4a1f4ec861 100644
--- a/tests/auto/gui/image/qimagereader/images/black.xpm
+++ b/tests/auto/gui/image/qimagereader/images/black.xpm
@@ -15,21 +15,21 @@ static char * ddd_xpm[] = {
"+ c white m white g white g4 white s Light ",
"* c DarkGreen m black g grey25 g4 grey25 s Eye ",
/* Pixels */
-" . . ",
-" . .. ",
-" . . ",
-" .. . ",
-" .. .. .. ",
-" .. . . . ",
-" . . . . .. ",
-" . .X. . ",
-" . *.X.* .. ",
-" .. .. .XXX. .. ... ",
-" . .X...XXX...X. . ",
-" .. ..XXX.XXX.XXX. .. ",
-" .....XXXX...XXXX. . ",
-" .. ..XXXXXXXXX.. .. ",
-" ...XXXXXXX..... ",
+" . . ",
+" . .. ",
+" . . ",
+" .. . ",
+" .. .. .. ",
+" .. . . . ",
+" . . . . .. ",
+" . .X. . ",
+" . *.X.* .. ",
+" .. .. .XXX. .. ... ",
+" . .X...XXX...X. . ",
+" .. ..XXX.XXX.XXX. .. ",
+" .....XXXX...XXXX. . ",
+" .. ..XXXXXXXXX.. .. ",
+" ...XXXXXXX..... ",
" ......... ",
" .XXXXXXX. ",
" .....XXX..... ",
diff --git a/tests/auto/gui/image/qpicture/tst_qpicture.cpp b/tests/auto/gui/image/qpicture/tst_qpicture.cpp
index 3e628981b6..2e766c5bf5 100644
--- a/tests/auto/gui/image/qpicture/tst_qpicture.cpp
+++ b/tests/auto/gui/image/qpicture/tst_qpicture.cpp
@@ -174,28 +174,28 @@ void tst_QPicture::operator_lt_lt()
{
// streaming of null pictures
{
- QPicture pic1, pic2;
- QByteArray ba( 100, 0 );
- QDataStream str1( &ba, QIODevice::WriteOnly );
- str1 << pic1;
- QDataStream str2( &ba, QIODevice::ReadOnly );
- str2 >> pic2;
- QVERIFY( pic2.isNull() );
+ QPicture pic1, pic2;
+ QByteArray ba( 100, 0 );
+ QDataStream str1( &ba, QIODevice::WriteOnly );
+ str1 << pic1;
+ QDataStream str2( &ba, QIODevice::ReadOnly );
+ str2 >> pic2;
+ QVERIFY( pic2.isNull() );
}
// picture with a simple line, checking bitwise equality
{
- QPicture pic1, pic2;
- QPainter p( &pic1 );
- p.drawLine( 10, 20, 30, 40 );
- p.end();
- QByteArray ba( 10 * pic1.size(), 0 );
- QDataStream str1( &ba, QIODevice::WriteOnly );
- str1 << pic1;
- QDataStream str2( &ba, QIODevice::ReadOnly );
- str2 >> pic2;
- QCOMPARE( pic1.size(), pic2.size() );
- QVERIFY( memcmp( pic1.data(), pic2.data(), pic1.size() ) == 0 );
+ QPicture pic1, pic2;
+ QPainter p( &pic1 );
+ p.drawLine( 10, 20, 30, 40 );
+ p.end();
+ QByteArray ba( 10 * pic1.size(), 0 );
+ QDataStream str1( &ba, QIODevice::WriteOnly );
+ str1 << pic1;
+ QDataStream str2( &ba, QIODevice::ReadOnly );
+ str2 >> pic2;
+ QCOMPARE( pic1.size(), pic2.size() );
+ QVERIFY( memcmp( pic1.data(), pic2.data(), pic1.size() ) == 0 );
}
}
@@ -268,7 +268,6 @@ void tst_QPicture::boundaryValues_data()
QTest::newRow("min x, max y") << INT_MIN << INT_MAX;
QTest::newRow("max x, min y") << INT_MAX << INT_MIN;
-
}
void tst_QPicture::boundaryValues()
@@ -283,8 +282,6 @@ void tst_QPicture::boundaryValues()
painter.drawPoint(QPoint(x, y));
painter.end();
-
-
}
diff --git a/tests/auto/gui/kernel/qtouchevent/tst_qtouchevent.cpp b/tests/auto/gui/kernel/qtouchevent/tst_qtouchevent.cpp
index 9aebe135ef..5934776c5b 100644
--- a/tests/auto/gui/kernel/qtouchevent/tst_qtouchevent.cpp
+++ b/tests/auto/gui/kernel/qtouchevent/tst_qtouchevent.cpp
@@ -414,7 +414,7 @@ void tst_QTouchEvent::touchBeginPropagatesWhenIgnored()
// QGraphicsView
{
QGraphicsScene scene;
- tst_QTouchEventGraphicsItem root, child, grandchild;
+ tst_QTouchEventGraphicsItem root, child, grandchild;
QGraphicsView view(&scene);
scene.addItem(&root);
root.setPos(100, 100);
@@ -778,7 +778,7 @@ void tst_QTouchEvent::multiPointRawEventTranslationOnTouchScreen()
QVERIFY(rightWidget.seenTouchBegin);
QVERIFY(!rightWidget.seenTouchUpdate);
QVERIFY(!rightWidget.seenTouchEnd);
- QCOMPARE(leftWidget.touchBeginPoints.count(), 1);
+ QCOMPARE(leftWidget.touchBeginPoints.count(), 1);
QCOMPARE(rightWidget.touchBeginPoints.count(), 1);
{
QTouchEvent::TouchPoint leftTouchPoint = leftWidget.touchBeginPoints.first();
@@ -1633,4 +1633,4 @@ void tst_QTouchEvent::testMultiDevice()
QTEST_MAIN(tst_QTouchEvent)
-#include "tst_qtouchevent.moc"
+#include "tst_qtouchevent.moc"
diff --git a/tests/auto/gui/painting/qpathclipper/paths.cpp b/tests/auto/gui/painting/qpathclipper/paths.cpp
index d7f0d6d59b..3bc2484578 100644
--- a/tests/auto/gui/painting/qpathclipper/paths.cpp
+++ b/tests/auto/gui/painting/qpathclipper/paths.cpp
@@ -127,7 +127,7 @@ QPainterPath Paths::body()
path.cubicTo(105.28125,81.341000, 89.784000,65.812500, 70.531250,65.812500);
path.lineTo(54.437500,65.812500);
path.closeSubpath();
-
+
return path;
}
@@ -143,7 +143,7 @@ QPainterPath Paths::mailbox()
path.lineTo(443.62570,100.11509);
path.lineTo(355.22951,136.82424);
path.closeSubpath();
-
+
return path;
}
@@ -271,7 +271,7 @@ QPainterPath Paths::lips()
path.cubicTo(283.58862,123.78263, 270.15105,136.64382, 243.62716,155.61729);
path.cubicTo(217.47805,174.32266, 199.38332,176.65905, 177.02257,176.65905);
path.closeSubpath();
-
+
return path;
}
@@ -290,14 +290,14 @@ QPainterPath Paths::bezier2()
QPainterPath path;
path.moveTo(200,200);
path.cubicTo(200,125, 500,100, 500,500);
-
+
return path;
}
QPainterPath Paths::random1()
{
QPainterPath path;
-
+
path.moveTo(65.714286,91.428571);
path.lineTo(217.14286, 102.85714);
path.cubicTo(219.04762, 106.66666,
@@ -341,7 +341,7 @@ QPainterPath Paths::random1()
QPainterPath Paths::random2()
{
QPainterPath path;
-
+
path.moveTo(314.28571,160);
path.cubicTo(434.28571,125.71429,
505.71429,200,
@@ -573,7 +573,7 @@ QPainterPath Paths::triangle1()
}
QPainterPath Paths::triangle2()
-{
+{
QPainterPath path;
path.moveTo(0, 120);
diff --git a/tests/auto/gui/text/qstatictext/tst_qstatictext.cpp b/tests/auto/gui/text/qstatictext/tst_qstatictext.cpp
index f62e5f188b..46f97840af 100644
--- a/tests/auto/gui/text/qstatictext/tst_qstatictext.cpp
+++ b/tests/auto/gui/text/qstatictext/tst_qstatictext.cpp
@@ -224,7 +224,7 @@ void tst_QStaticText::drawToRect()
#endif
QVERIFY(imageDrawText.toImage() != m_whiteSquare);
- QCOMPARE(imageDrawStaticText, imageDrawText);
+ QCOMPARE(imageDrawStaticText, imageDrawText);
}
void tst_QStaticText::prepareToCorrectData()
diff --git a/tests/auto/gui/text/qsyntaxhighlighter/tst_qsyntaxhighlighter.cpp b/tests/auto/gui/text/qsyntaxhighlighter/tst_qsyntaxhighlighter.cpp
index fa2a2985f0..5484c9ed93 100644
--- a/tests/auto/gui/text/qsyntaxhighlighter/tst_qsyntaxhighlighter.cpp
+++ b/tests/auto/gui/text/qsyntaxhighlighter/tst_qsyntaxhighlighter.cpp
@@ -527,26 +527,26 @@ void tst_QSyntaxHighlighter::rehighlight()
void tst_QSyntaxHighlighter::rehighlightBlock()
{
TestHighlighter *hl = new TestHighlighter(doc);
-
+
cursor.movePosition(QTextCursor::Start);
cursor.beginEditBlock();
cursor.insertText("Hello");
cursor.insertBlock();
cursor.insertText("World");
cursor.endEditBlock();
-
+
hl->callCount = 0;
hl->highlightedText.clear();
QTextBlock block = doc->begin();
hl->rehighlightBlock(block);
-
+
QCOMPARE(hl->highlightedText, QString("Hello"));
QCOMPARE(hl->callCount, 1);
-
+
hl->callCount = 0;
hl->highlightedText.clear();
hl->rehighlightBlock(block.next());
-
+
QCOMPARE(hl->highlightedText, QString("World"));
QCOMPARE(hl->callCount, 1);
}
diff --git a/tests/auto/gui/text/qtextformat/tst_qtextformat.cpp b/tests/auto/gui/text/qtextformat/tst_qtextformat.cpp
index f7b4456c43..1eb073d3b4 100644
--- a/tests/auto/gui/text/qtextformat/tst_qtextformat.cpp
+++ b/tests/auto/gui/text/qtextformat/tst_qtextformat.cpp
@@ -72,7 +72,7 @@ private slots:
/*! \internal
This (used to) trigger a crash in:
-
+
QDataStream &operator>>(QDataStream &stream, QTextFormat &fmt)
which is most easily produced through QSettings.
diff --git a/tests/auto/gui/text/qtextscriptengine/generate/main.cpp b/tests/auto/gui/text/qtextscriptengine/generate/main.cpp
index 1dcdc28d81..f3fa42ec2e 100644
--- a/tests/auto/gui/text/qtextscriptengine/generate/main.cpp
+++ b/tests/auto/gui/text/qtextscriptengine/generate/main.cpp
@@ -81,7 +81,7 @@ void MyEdit::setText(const QString &str)
result = "Using font '" + e->fontEngine(e->layoutData->items[0])->fontDef.family + "'\n\n";
result += "{ { ";
- for (int i = 0; i < str.length(); ++i)
+ for (int i = 0; i < str.length(); ++i)
result += "0x" + QString::number(str.at(i).unicode(), 16) + ", ";
result += "0x0 },\n { ";
for (int i = 0; i < e->layoutData->items[0].num_glyphs; ++i)
diff --git a/tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp b/tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp
index 2e2c965cc9..eebac28323 100644
--- a/tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp
+++ b/tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp
@@ -48,7 +48,7 @@
class tst_QTextScriptEngine : public QObject
{
-Q_OBJECT
+ Q_OBJECT
public:
tst_QTextScriptEngine();
@@ -210,93 +210,93 @@ void tst_QTextScriptEngine::devanagari_data()
{
if (QFontDatabase().families(QFontDatabase::Devanagari).contains("Raghindi")) {
QFont f("Raghindi");
- const ShapeTable shape_table [] = {
- // Ka
- { { 0x0915, 0x0 },
- { 0x0080, 0x0 } },
- // Ka Halant
- { { 0x0915, 0x094d, 0x0 },
- { 0x0080, 0x0051, 0x0 } },
- // Ka Halant Ka
- { { 0x0915, 0x094d, 0x0915, 0x0 },
- { 0x00c8, 0x0080, 0x0 } },
- // Ka MatraI
- { { 0x0915, 0x093f, 0x0 },
- { 0x01d1, 0x0080, 0x0 } },
- // Ra Halant Ka
- { { 0x0930, 0x094d, 0x0915, 0x0 },
- { 0x0080, 0x005b, 0x0 } },
- // Ra Halant Ka MatraI
- { { 0x0930, 0x094d, 0x0915, 0x093f, 0x0 },
- { 0x01d1, 0x0080, 0x005b, 0x0 } },
- // MatraI
- { { 0x093f, 0x0 },
- { 0x01d4, 0x029c, 0x0 } },
- // Ka Nukta
- { { 0x0915, 0x093c, 0x0 },
- { 0x00a4, 0x0 } },
- // Ka Halant Ra
- { { 0x0915, 0x094d, 0x0930, 0x0 },
- { 0x0110, 0x0 } },
- // Ka Halant Ra Halant Ka
- { { 0x0915, 0x094d, 0x0930, 0x094d, 0x0915, 0x0 },
- { 0x0158, 0x0080, 0x0 } },
- { { 0x0930, 0x094d, 0x200d, 0x0 },
- { 0x00e2, 0x0 } },
- { { 0x0915, 0x094d, 0x0930, 0x094d, 0x200d, 0x0 },
- { 0x0158, 0x0 } },
-
- { {0}, {0} }
- };
- prepareShapingTest(f, shape_table);
- } else
- QSKIP("couldn't find Raghindi");
+ const ShapeTable shape_table [] = {
+ // Ka
+ { { 0x0915, 0x0 },
+ { 0x0080, 0x0 } },
+ // Ka Halant
+ { { 0x0915, 0x094d, 0x0 },
+ { 0x0080, 0x0051, 0x0 } },
+ // Ka Halant Ka
+ { { 0x0915, 0x094d, 0x0915, 0x0 },
+ { 0x00c8, 0x0080, 0x0 } },
+ // Ka MatraI
+ { { 0x0915, 0x093f, 0x0 },
+ { 0x01d1, 0x0080, 0x0 } },
+ // Ra Halant Ka
+ { { 0x0930, 0x094d, 0x0915, 0x0 },
+ { 0x0080, 0x005b, 0x0 } },
+ // Ra Halant Ka MatraI
+ { { 0x0930, 0x094d, 0x0915, 0x093f, 0x0 },
+ { 0x01d1, 0x0080, 0x005b, 0x0 } },
+ // MatraI
+ { { 0x093f, 0x0 },
+ { 0x01d4, 0x029c, 0x0 } },
+ // Ka Nukta
+ { { 0x0915, 0x093c, 0x0 },
+ { 0x00a4, 0x0 } },
+ // Ka Halant Ra
+ { { 0x0915, 0x094d, 0x0930, 0x0 },
+ { 0x0110, 0x0 } },
+ // Ka Halant Ra Halant Ka
+ { { 0x0915, 0x094d, 0x0930, 0x094d, 0x0915, 0x0 },
+ { 0x0158, 0x0080, 0x0 } },
+ { { 0x0930, 0x094d, 0x200d, 0x0 },
+ { 0x00e2, 0x0 } },
+ { { 0x0915, 0x094d, 0x0930, 0x094d, 0x200d, 0x0 },
+ { 0x0158, 0x0 } },
+
+ { {0}, {0} }
+ };
+ prepareShapingTest(f, shape_table);
+ } else
+ QSKIP("couldn't find Raghindi");
}
{
if (QFontDatabase().families(QFontDatabase::Devanagari).contains("Mangal")) {
QFont f("Mangal");
- const ShapeTable shape_table [] = {
- // Ka
- { { 0x0915, 0x0 },
- { 0x0080, 0x0 } },
- // Ka Halant
- { { 0x0915, 0x094d, 0x0 },
- { 0x0080, 0x0051, 0x0 } },
- // Ka Halant Ka
- { { 0x0915, 0x094d, 0x0915, 0x0 },
- { 0x00c8, 0x0080, 0x0 } },
- // Ka MatraI
- { { 0x0915, 0x093f, 0x0 },
- { 0x01d1, 0x0080, 0x0 } },
- // Ra Halant Ka
- { { 0x0930, 0x094d, 0x0915, 0x0 },
- { 0x0080, 0x005b, 0x0 } },
- // Ra Halant Ka MatraI
- { { 0x0930, 0x094d, 0x0915, 0x093f, 0x0 },
- { 0x01d1, 0x0080, 0x005b, 0x0 } },
- // MatraI
- { { 0x093f, 0x0 },
- { 0x01d4, 0x029c, 0x0 } },
- // Ka Nukta
- { { 0x0915, 0x093c, 0x0 },
- { 0x00a4, 0x0 } },
- // Ka Halant Ra
- { { 0x0915, 0x094d, 0x0930, 0x0 },
- { 0x0110, 0x0 } },
- // Ka Halant Ra Halant Ka
- { { 0x0915, 0x094d, 0x0930, 0x094d, 0x0915, 0x0 },
- { 0x0158, 0x0080, 0x0 } },
+ const ShapeTable shape_table [] = {
+ // Ka
+ { { 0x0915, 0x0 },
+ { 0x0080, 0x0 } },
+ // Ka Halant
+ { { 0x0915, 0x094d, 0x0 },
+ { 0x0080, 0x0051, 0x0 } },
+ // Ka Halant Ka
+ { { 0x0915, 0x094d, 0x0915, 0x0 },
+ { 0x00c8, 0x0080, 0x0 } },
+ // Ka MatraI
+ { { 0x0915, 0x093f, 0x0 },
+ { 0x01d1, 0x0080, 0x0 } },
+ // Ra Halant Ka
+ { { 0x0930, 0x094d, 0x0915, 0x0 },
+ { 0x0080, 0x005b, 0x0 } },
+ // Ra Halant Ka MatraI
+ { { 0x0930, 0x094d, 0x0915, 0x093f, 0x0 },
+ { 0x01d1, 0x0080, 0x005b, 0x0 } },
+ // MatraI
+ { { 0x093f, 0x0 },
+ { 0x01d4, 0x029c, 0x0 } },
+ // Ka Nukta
+ { { 0x0915, 0x093c, 0x0 },
+ { 0x00a4, 0x0 } },
+ // Ka Halant Ra
+ { { 0x0915, 0x094d, 0x0930, 0x0 },
+ { 0x0110, 0x0 } },
+ // Ka Halant Ra Halant Ka
+ { { 0x0915, 0x094d, 0x0930, 0x094d, 0x0915, 0x0 },
+ { 0x0158, 0x0080, 0x0 } },
{ { 0x92b, 0x94d, 0x930, 0x0 },
{ 0x125, 0x0 } },
{ { 0x92b, 0x93c, 0x94d, 0x930, 0x0 },
- { 0x149, 0x0 } },
- { {0}, {0} }
- };
- prepareShapingTest(f, shape_table);
- } else
- QSKIP("couldn't find mangal");
+ { 0x149, 0x0 } },
+ { {0}, {0} }
+ };
+ prepareShapingTest(f, shape_table);
+ } else
+ QSKIP("couldn't find mangal");
}
}
@@ -317,224 +317,224 @@ void tst_QTextScriptEngine::bengali_data()
{
if (QFontDatabase().families(QFontDatabase::Bengali).contains("Akaash")) {
QFont f("Akaash");
- const ShapeTable shape_table [] = {
- // Ka
- { { 0x0995, 0x0 },
- { 0x0151, 0x0 } },
- // Ka Halant
- { { 0x0995, 0x09cd, 0x0 },
- { 0x0151, 0x017d, 0x0 } },
- // Ka Halant Ka
- { { 0x0995, 0x09cd, 0x0995, 0x0 },
- { 0x019b, 0x0 } },
- // Ka MatraI
- { { 0x0995, 0x09bf, 0x0 },
- { 0x0173, 0x0151, 0x0 } },
- // Ra Halant Ka
- { { 0x09b0, 0x09cd, 0x0995, 0x0 },
- { 0x0151, 0x0276, 0x0 } },
- // Ra Halant Ka MatraI
- { { 0x09b0, 0x09cd, 0x0995, 0x09bf, 0x0 },
- { 0x0173, 0x0151, 0x0276, 0x0 } },
- // Ka Nukta
- { { 0x0995, 0x09bc, 0x0 },
- { 0x0151, 0x0171, 0x0 } },
- // Ka Halant Ra
- { { 0x0995, 0x09cd, 0x09b0, 0x0 },
- { 0x01f4, 0x0 } },
- // Ka Halant Ra Halant Ka
- { { 0x0995, 0x09cd, 0x09b0, 0x09cd, 0x0995, 0x0 },
- { 0x025c, 0x0276, 0x0151, 0x0 } },
- // Ya + Halant
- { { 0x09af, 0x09cd, 0x0 },
- { 0x016a, 0x017d, 0x0 } },
- // Da Halant Ya -> Da Ya-Phala
- { { 0x09a6, 0x09cd, 0x09af, 0x0 },
- { 0x01e5, 0x0 } },
- // A Halant Ya -> A Ya-phala
- { { 0x0985, 0x09cd, 0x09af, 0x0 },
- { 0x0145, 0x01cf, 0x0 } },
- // Na Halant Ka
- { { 0x09a8, 0x09cd, 0x0995, 0x0 },
- { 0x026f, 0x0151, 0x0 } },
- // Na Halant ZWNJ Ka
- { { 0x09a8, 0x09cd, 0x200c, 0x0995, 0x0 },
- { 0x0164, 0x017d, 0x0151, 0x0 } },
- // Na Halant ZWJ Ka
- { { 0x09a8, 0x09cd, 0x200d, 0x0995, 0x0 },
- { 0x026f, 0x0151, 0x0 } },
- // Ka Halant ZWNJ Ka
- { { 0x0995, 0x09cd, 0x200c, 0x0995, 0x0 },
- { 0x0151, 0x017d, 0x0151, 0x0 } },
- // Ka Halant ZWJ Ka
- { { 0x0995, 0x09cd, 0x200d, 0x0995, 0x0 },
- { 0x025c, 0x0151, 0x0 } },
- // Na Halant Ra
- { { 0x09a8, 0x09cd, 0x09b0, 0x0 },
- { 0x0207, 0x0 } },
- // Na Halant ZWNJ Ra
- { { 0x09a8, 0x09cd, 0x200c, 0x09b0, 0x0 },
- { 0x0164, 0x017d, 0x016b, 0x0 } },
- // Na Halant ZWJ Ra
- { { 0x09a8, 0x09cd, 0x200d, 0x09b0, 0x0 },
- { 0x026f, 0x016b, 0x0 } },
- // Na Halant Ba
- { { 0x09a8, 0x09cd, 0x09ac, 0x0 },
- { 0x022f, 0x0 } },
- // Na Halant ZWNJ Ba
- { { 0x09a8, 0x09cd, 0x200c, 0x09ac, 0x0 },
- { 0x0164, 0x017d, 0x0167, 0x0 } },
- // Na Halant ZWJ Ba
- { { 0x09a8, 0x09cd, 0x200d, 0x09ac, 0x0 },
- { 0x026f, 0x0167, 0x0 } },
- // Na Halant Dha
- { { 0x09a8, 0x09cd, 0x09a7, 0x0 },
- { 0x01d3, 0x0 } },
- // Na Halant ZWNJ Dha
- { { 0x09a8, 0x09cd, 0x200c, 0x09a7, 0x0 },
- { 0x0164, 0x017d, 0x0163, 0x0 } },
- // Na Halant ZWJ Dha
- { { 0x09a8, 0x09cd, 0x200d, 0x09a7, 0x0 },
- { 0x026f, 0x0163, 0x0 } },
- // Ra Halant Ka MatraAU
- { { 0x09b0, 0x09cd, 0x0995, 0x09cc, 0x0 },
- { 0x0179, 0x0151, 0x0276, 0x017e, 0x0 } },
- // Ra Halant Ba Halant Ba
- { { 0x09b0, 0x09cd, 0x09ac, 0x09cd, 0x09ac, 0x0 },
- { 0x0232, 0x0276, 0x0 } },
+ const ShapeTable shape_table [] = {
+ // Ka
+ { { 0x0995, 0x0 },
+ { 0x0151, 0x0 } },
+ // Ka Halant
+ { { 0x0995, 0x09cd, 0x0 },
+ { 0x0151, 0x017d, 0x0 } },
+ // Ka Halant Ka
+ { { 0x0995, 0x09cd, 0x0995, 0x0 },
+ { 0x019b, 0x0 } },
+ // Ka MatraI
+ { { 0x0995, 0x09bf, 0x0 },
+ { 0x0173, 0x0151, 0x0 } },
+ // Ra Halant Ka
+ { { 0x09b0, 0x09cd, 0x0995, 0x0 },
+ { 0x0151, 0x0276, 0x0 } },
+ // Ra Halant Ka MatraI
+ { { 0x09b0, 0x09cd, 0x0995, 0x09bf, 0x0 },
+ { 0x0173, 0x0151, 0x0276, 0x0 } },
+ // Ka Nukta
+ { { 0x0995, 0x09bc, 0x0 },
+ { 0x0151, 0x0171, 0x0 } },
+ // Ka Halant Ra
+ { { 0x0995, 0x09cd, 0x09b0, 0x0 },
+ { 0x01f4, 0x0 } },
+ // Ka Halant Ra Halant Ka
+ { { 0x0995, 0x09cd, 0x09b0, 0x09cd, 0x0995, 0x0 },
+ { 0x025c, 0x0276, 0x0151, 0x0 } },
+ // Ya + Halant
+ { { 0x09af, 0x09cd, 0x0 },
+ { 0x016a, 0x017d, 0x0 } },
+ // Da Halant Ya -> Da Ya-Phala
+ { { 0x09a6, 0x09cd, 0x09af, 0x0 },
+ { 0x01e5, 0x0 } },
+ // A Halant Ya -> A Ya-phala
+ { { 0x0985, 0x09cd, 0x09af, 0x0 },
+ { 0x0145, 0x01cf, 0x0 } },
+ // Na Halant Ka
+ { { 0x09a8, 0x09cd, 0x0995, 0x0 },
+ { 0x026f, 0x0151, 0x0 } },
+ // Na Halant ZWNJ Ka
+ { { 0x09a8, 0x09cd, 0x200c, 0x0995, 0x0 },
+ { 0x0164, 0x017d, 0x0151, 0x0 } },
+ // Na Halant ZWJ Ka
+ { { 0x09a8, 0x09cd, 0x200d, 0x0995, 0x0 },
+ { 0x026f, 0x0151, 0x0 } },
+ // Ka Halant ZWNJ Ka
+ { { 0x0995, 0x09cd, 0x200c, 0x0995, 0x0 },
+ { 0x0151, 0x017d, 0x0151, 0x0 } },
+ // Ka Halant ZWJ Ka
+ { { 0x0995, 0x09cd, 0x200d, 0x0995, 0x0 },
+ { 0x025c, 0x0151, 0x0 } },
+ // Na Halant Ra
+ { { 0x09a8, 0x09cd, 0x09b0, 0x0 },
+ { 0x0207, 0x0 } },
+ // Na Halant ZWNJ Ra
+ { { 0x09a8, 0x09cd, 0x200c, 0x09b0, 0x0 },
+ { 0x0164, 0x017d, 0x016b, 0x0 } },
+ // Na Halant ZWJ Ra
+ { { 0x09a8, 0x09cd, 0x200d, 0x09b0, 0x0 },
+ { 0x026f, 0x016b, 0x0 } },
+ // Na Halant Ba
+ { { 0x09a8, 0x09cd, 0x09ac, 0x0 },
+ { 0x022f, 0x0 } },
+ // Na Halant ZWNJ Ba
+ { { 0x09a8, 0x09cd, 0x200c, 0x09ac, 0x0 },
+ { 0x0164, 0x017d, 0x0167, 0x0 } },
+ // Na Halant ZWJ Ba
+ { { 0x09a8, 0x09cd, 0x200d, 0x09ac, 0x0 },
+ { 0x026f, 0x0167, 0x0 } },
+ // Na Halant Dha
+ { { 0x09a8, 0x09cd, 0x09a7, 0x0 },
+ { 0x01d3, 0x0 } },
+ // Na Halant ZWNJ Dha
+ { { 0x09a8, 0x09cd, 0x200c, 0x09a7, 0x0 },
+ { 0x0164, 0x017d, 0x0163, 0x0 } },
+ // Na Halant ZWJ Dha
+ { { 0x09a8, 0x09cd, 0x200d, 0x09a7, 0x0 },
+ { 0x026f, 0x0163, 0x0 } },
+ // Ra Halant Ka MatraAU
+ { { 0x09b0, 0x09cd, 0x0995, 0x09cc, 0x0 },
+ { 0x0179, 0x0151, 0x0276, 0x017e, 0x0 } },
+ // Ra Halant Ba Halant Ba
+ { { 0x09b0, 0x09cd, 0x09ac, 0x09cd, 0x09ac, 0x0 },
+ { 0x0232, 0x0276, 0x0 } },
{ { 0x9b0, 0x9cd, 0x995, 0x9be, 0x982, 0x0 },
{ 0x151, 0x276, 0x172, 0x143, 0x0 } },
{ { 0x9b0, 0x9cd, 0x995, 0x9be, 0x983, 0x0 },
- { 0x151, 0x276, 0x172, 0x144, 0x0 } },
+ { 0x151, 0x276, 0x172, 0x144, 0x0 } },
// test decomposed two parts matras
{ { 0x995, 0x9c7, 0x9be, 0x0 },
{ 0x179, 0x151, 0x172, 0x0 } },
{ { 0x995, 0x9c7, 0x9d7, 0x0 },
{ 0x179, 0x151, 0x17e, 0x0 } },
- { {0}, {0} }
- };
- prepareShapingTest(f, shape_table);
- } else
- QSKIP("couldn't find Akaash");
+ { {0}, {0} }
+ };
+ prepareShapingTest(f, shape_table);
+ } else
+ QSKIP("couldn't find Akaash");
}
{
if (QFontDatabase().families(QFontDatabase::Bengali).contains("Mukti Narrow")) {
QFont f("Mukti Narrow");
- const ShapeTable shape_table [] = {
- // Ka
- { { 0x0995, 0x0 },
- { 0x0073, 0x0 } },
- // Ka Halant
- { { 0x0995, 0x09cd, 0x0 },
- { 0x00b9, 0x0 } },
- // Ka Halant Ka
- { { 0x0995, 0x09cd, 0x0995, 0x0 },
- { 0x0109, 0x0 } },
- // Ka MatraI
- { { 0x0995, 0x09bf, 0x0 },
- { 0x0095, 0x0073, 0x0 } },
- // Ra Halant Ka
- { { 0x09b0, 0x09cd, 0x0995, 0x0 },
- { 0x0073, 0x00e1, 0x0 } },
- // Ra Halant Ka MatraI
- { { 0x09b0, 0x09cd, 0x0995, 0x09bf, 0x0 },
- { 0x0095, 0x0073, 0x00e1, 0x0 } },
- // MatraI
- { { 0x09bf, 0x0 },
- { 0x0095, 0x01c8, 0x0 } },
- // Ka Nukta
- { { 0x0995, 0x09bc, 0x0 },
- { 0x0073, 0x0093, 0x0 } },
- // Ka Halant Ra
- { { 0x0995, 0x09cd, 0x09b0, 0x0 },
- { 0x00e5, 0x0 } },
- // Ka Halant Ra Halant Ka
+ const ShapeTable shape_table [] = {
+ // Ka
+ { { 0x0995, 0x0 },
+ { 0x0073, 0x0 } },
+ // Ka Halant
+ { { 0x0995, 0x09cd, 0x0 },
+ { 0x00b9, 0x0 } },
+ // Ka Halant Ka
+ { { 0x0995, 0x09cd, 0x0995, 0x0 },
+ { 0x0109, 0x0 } },
+ // Ka MatraI
+ { { 0x0995, 0x09bf, 0x0 },
+ { 0x0095, 0x0073, 0x0 } },
+ // Ra Halant Ka
+ { { 0x09b0, 0x09cd, 0x0995, 0x0 },
+ { 0x0073, 0x00e1, 0x0 } },
+ // Ra Halant Ka MatraI
+ { { 0x09b0, 0x09cd, 0x0995, 0x09bf, 0x0 },
+ { 0x0095, 0x0073, 0x00e1, 0x0 } },
+ // MatraI
+ { { 0x09bf, 0x0 },
+ { 0x0095, 0x01c8, 0x0 } },
+ // Ka Nukta
+ { { 0x0995, 0x09bc, 0x0 },
+ { 0x0073, 0x0093, 0x0 } },
+ // Ka Halant Ra
+ { { 0x0995, 0x09cd, 0x09b0, 0x0 },
+ { 0x00e5, 0x0 } },
+ // Ka Halant Ra Halant Ka
{ { 0x995, 0x9cd, 0x9b0, 0x9cd, 0x995, 0x0 },
- { 0x234, 0x24e, 0x73, 0x0 } },
- // Ya + Halant
- { { 0x09af, 0x09cd, 0x0 },
- { 0x00d2, 0x0 } },
- // Da Halant Ya -> Da Ya-Phala
- { { 0x09a6, 0x09cd, 0x09af, 0x0 },
- { 0x0084, 0x00e2, 0x0 } },
- // A Halant Ya -> A Ya-phala
- { { 0x0985, 0x09cd, 0x09af, 0x0 },
- { 0x0067, 0x00e2, 0x0 } },
- // Na Halant Ka
- { { 0x09a8, 0x09cd, 0x0995, 0x0 },
- { 0x0188, 0x0 } },
- // Na Halant ZWNJ Ka
+ { 0x234, 0x24e, 0x73, 0x0 } },
+ // Ya + Halant
+ { { 0x09af, 0x09cd, 0x0 },
+ { 0x00d2, 0x0 } },
+ // Da Halant Ya -> Da Ya-Phala
+ { { 0x09a6, 0x09cd, 0x09af, 0x0 },
+ { 0x0084, 0x00e2, 0x0 } },
+ // A Halant Ya -> A Ya-phala
+ { { 0x0985, 0x09cd, 0x09af, 0x0 },
+ { 0x0067, 0x00e2, 0x0 } },
+ // Na Halant Ka
+ { { 0x09a8, 0x09cd, 0x0995, 0x0 },
+ { 0x0188, 0x0 } },
+ // Na Halant ZWNJ Ka
{ { 0x9a8, 0x9cd, 0x200c, 0x995, 0x0 },
- { 0xcc, 0x73, 0x0 } },
- // Na Halant ZWJ Ka
+ { 0xcc, 0x73, 0x0 } },
+ // Na Halant ZWJ Ka
{ { 0x9a8, 0x9cd, 0x200d, 0x995, 0x0 },
- { 0x247, 0x73, 0x0 } },
- // Ka Halant ZWNJ Ka
+ { 0x247, 0x73, 0x0 } },
+ // Ka Halant ZWNJ Ka
{ { 0x9a8, 0x9cd, 0x200d, 0x995, 0x0 },
- { 0x247, 0x73, 0x0 } },
- // Ka Halant ZWJ Ka
+ { 0x247, 0x73, 0x0 } },
+ // Ka Halant ZWJ Ka
{ { 0x9a8, 0x9cd, 0x200d, 0x995, 0x0 },
- { 0x247, 0x73, 0x0 } },
- // Na Halant Ra
- { { 0x09a8, 0x09cd, 0x09b0, 0x0 },
- { 0x00f8, 0x0 } },
- // Na Halant ZWNJ Ra
- { { 0x09a8, 0x09cd, 0x200c, 0x09b0, 0x0 },
- { 0xcc, 0x8d, 0x0 } },
- // Na Halant ZWJ Ra
+ { 0x247, 0x73, 0x0 } },
+ // Na Halant Ra
+ { { 0x09a8, 0x09cd, 0x09b0, 0x0 },
+ { 0x00f8, 0x0 } },
+ // Na Halant ZWNJ Ra
+ { { 0x09a8, 0x09cd, 0x200c, 0x09b0, 0x0 },
+ { 0xcc, 0x8d, 0x0 } },
+ // Na Halant ZWJ Ra
{ { 0x9a8, 0x9cd, 0x200d, 0x9b0, 0x0 },
- { 0x247, 0x8d, 0x0 } },
- // Na Halant Ba
- { { 0x09a8, 0x09cd, 0x09ac, 0x0 },
- { 0x0139, 0x0 } },
- // Na Halant ZWNJ Ba
+ { 0x247, 0x8d, 0x0 } },
+ // Na Halant Ba
+ { { 0x09a8, 0x09cd, 0x09ac, 0x0 },
+ { 0x0139, 0x0 } },
+ // Na Halant ZWNJ Ba
{ { 0x9a8, 0x9cd, 0x200c, 0x9ac, 0x0 },
- { 0xcc, 0x89, 0x0 } },
- // Na Halant ZWJ Ba
+ { 0xcc, 0x89, 0x0 } },
+ // Na Halant ZWJ Ba
{ { 0x9a8, 0x9cd, 0x200d, 0x9ac, 0x0 },
- { 0x247, 0x89, 0x0 } },
- // Na Halant Dha
- { { 0x09a8, 0x09cd, 0x09a7, 0x0 },
- { 0x0145, 0x0 } },
- // Na Halant ZWNJ Dha
- { { 0x09a8, 0x09cd, 0x200c, 0x09a7, 0x0 },
- { 0xcc, 0x85, 0x0 } },
- // Na Halant ZWJ Dha
- { { 0x09a8, 0x09cd, 0x200d, 0x09a7, 0x0 },
- { 0x247, 0x85, 0x0 } },
- // Ra Halant Ka MatraAU
+ { 0x247, 0x89, 0x0 } },
+ // Na Halant Dha
+ { { 0x09a8, 0x09cd, 0x09a7, 0x0 },
+ { 0x0145, 0x0 } },
+ // Na Halant ZWNJ Dha
+ { { 0x09a8, 0x09cd, 0x200c, 0x09a7, 0x0 },
+ { 0xcc, 0x85, 0x0 } },
+ // Na Halant ZWJ Dha
+ { { 0x09a8, 0x09cd, 0x200d, 0x09a7, 0x0 },
+ { 0x247, 0x85, 0x0 } },
+ // Ra Halant Ka MatraAU
{ { 0x9b0, 0x9cd, 0x995, 0x9cc, 0x0 },
- { 0x232, 0x73, 0xe1, 0xa0, 0x0 } },
- // Ra Halant Ba Halant Ba
- { { 0x09b0, 0x09cd, 0x09ac, 0x09cd, 0x09ac, 0x0 },
- { 0x013b, 0x00e1, 0x0 } },
-
- { {0}, {0} }
- };
- prepareShapingTest(f, shape_table);
- } else
- QSKIP("couldn't find Mukti");
+ { 0x232, 0x73, 0xe1, 0xa0, 0x0 } },
+ // Ra Halant Ba Halant Ba
+ { { 0x09b0, 0x09cd, 0x09ac, 0x09cd, 0x09ac, 0x0 },
+ { 0x013b, 0x00e1, 0x0 } },
+
+ { {0}, {0} }
+ };
+ prepareShapingTest(f, shape_table);
+ } else
+ QSKIP("couldn't find Mukti");
}
{
if (QFontDatabase().families(QFontDatabase::Bengali).contains("Likhan")) {
QFont f("Likhan");
- const ShapeTable shape_table [] = {
+ const ShapeTable shape_table [] = {
{ { 0x9a8, 0x9cd, 0x9af, 0x0 },
{ 0x1ca, 0x0 } },
- { { 0x09b8, 0x09cd, 0x09af, 0x0 },
+ { { 0x09b8, 0x09cd, 0x09af, 0x0 },
{ 0x020e, 0x0 } },
- { { 0x09b6, 0x09cd, 0x09af, 0x0 },
+ { { 0x09b6, 0x09cd, 0x09af, 0x0 },
{ 0x01f4, 0x0 } },
- { { 0x09b7, 0x09cd, 0x09af, 0x0 },
+ { { 0x09b7, 0x09cd, 0x09af, 0x0 },
{ 0x01fe, 0x0 } },
- { { 0x09b0, 0x09cd, 0x09a8, 0x09cd, 0x200d, 0x0 },
+ { { 0x09b0, 0x09cd, 0x09a8, 0x09cd, 0x200d, 0x0 },
{ 0x10b, 0x167, 0x0 } },
- { {0}, {0} }
- };
- prepareShapingTest(f, shape_table);
- } else
- QSKIP("couldn't find Likhan");
+ { {0}, {0} }
+ };
+ prepareShapingTest(f, shape_table);
+ } else
+ QSKIP("couldn't find Likhan");
}
}
@@ -555,14 +555,14 @@ void tst_QTextScriptEngine::gurmukhi_data()
{
if (QFontDatabase().families(QFontDatabase::Gurmukhi).contains("Lohit Punjabi")) {
QFont f("Lohit Punjabi");
- const ShapeTable shape_table [] = {
- { { 0xA15, 0xA4D, 0xa39, 0x0 },
- { 0x3b, 0x8b, 0x0 } },
- { {0}, {0} }
- };
- prepareShapingTest(f, shape_table);
- } else
- QSKIP("couldn't find Lohit Punjabi");
+ const ShapeTable shape_table [] = {
+ { { 0xA15, 0xA4D, 0xa39, 0x0 },
+ { 0x3b, 0x8b, 0x0 } },
+ { {0}, {0} }
+ };
+ prepareShapingTest(f, shape_table);
+ } else
+ QSKIP("couldn't find Lohit Punjabi");
}
}
@@ -583,27 +583,27 @@ void tst_QTextScriptEngine::oriya_data()
{
if (QFontDatabase().families(QFontDatabase::Oriya).contains("utkal")) {
QFont f("utkal");
- const ShapeTable shape_table [] = {
+ const ShapeTable shape_table [] = {
{ { 0xb15, 0xb4d, 0xb24, 0xb4d, 0xb30, 0x0 },
- { 0x150, 0x125, 0x0 } },
+ { 0x150, 0x125, 0x0 } },
{ { 0xb24, 0xb4d, 0xb24, 0xb4d, 0xb2c, 0x0 },
- { 0x151, 0x120, 0x0 } },
+ { 0x151, 0x120, 0x0 } },
{ { 0xb28, 0xb4d, 0xb24, 0xb4d, 0xb2c, 0x0 },
- { 0x152, 0x120, 0x0 } },
+ { 0x152, 0x120, 0x0 } },
{ { 0xb28, 0xb4d, 0xb24, 0xb4d, 0xb2c, 0x0 },
- { 0x152, 0x120, 0x0 } },
+ { 0x152, 0x120, 0x0 } },
{ { 0xb28, 0xb4d, 0xb24, 0xb4d, 0xb30, 0x0 },
- { 0x176, 0x0 } },
+ { 0x176, 0x0 } },
{ { 0xb38, 0xb4d, 0xb24, 0xb4d, 0xb30, 0x0 },
- { 0x177, 0x0 } },
+ { 0x177, 0x0 } },
{ { 0xb28, 0xb4d, 0xb24, 0xb4d, 0xb30, 0xb4d, 0xb2f, 0x0 },
- { 0x176, 0x124, 0x0 } },
+ { 0x176, 0x124, 0x0 } },
{ {0}, {0} }
};
- prepareShapingTest(f, shape_table);
- } else
- QSKIP("couldn't find utkal");
+ prepareShapingTest(f, shape_table);
+ } else
+ QSKIP("couldn't find utkal");
}
}
@@ -624,51 +624,51 @@ void tst_QTextScriptEngine::tamil_data()
{
if (QFontDatabase().families(QFontDatabase::Tamil).contains("AkrutiTml1")) {
QFont f("AkrutiTml1");
- const ShapeTable shape_table [] = {
- { { 0x0b95, 0x0bc2, 0x0 },
- { 0x004e, 0x0 } },
- { { 0x0bae, 0x0bc2, 0x0 },
- { 0x009e, 0x0 } },
- { { 0x0b9a, 0x0bc2, 0x0 },
- { 0x0058, 0x0 } },
- { { 0x0b99, 0x0bc2, 0x0 },
- { 0x0053, 0x0 } },
- { { 0x0bb0, 0x0bc2, 0x0 },
- { 0x00a8, 0x0 } },
- { { 0x0ba4, 0x0bc2, 0x0 },
- { 0x008e, 0x0 } },
- { { 0x0b9f, 0x0bc2, 0x0 },
- { 0x0062, 0x0 } },
- { { 0x0b95, 0x0bc6, 0x0 },
- { 0x000a, 0x0031, 0x0 } },
- { { 0x0b95, 0x0bca, 0x0 },
- { 0x000a, 0x0031, 0x0007, 0x0 } },
- { { 0x0b95, 0x0bc6, 0x0bbe, 0x0 },
- { 0x000a, 0x0031, 0x007, 0x0 } },
- { { 0x0b95, 0x0bcd, 0x0bb7, 0x0 },
- { 0x0049, 0x0 } },
- { { 0x0b95, 0x0bcd, 0x0bb7, 0x0bca, 0x0 },
- { 0x000a, 0x0049, 0x007, 0x0 } },
- { { 0x0b95, 0x0bcd, 0x0bb7, 0x0bc6, 0x0bbe, 0x0 },
- { 0x000a, 0x0049, 0x007, 0x0 } },
- { { 0x0b9f, 0x0bbf, 0x0 },
- { 0x005f, 0x0 } },
- { { 0x0b9f, 0x0bc0, 0x0 },
- { 0x0060, 0x0 } },
- { { 0x0bb2, 0x0bc0, 0x0 },
- { 0x00ab, 0x0 } },
- { { 0x0bb2, 0x0bbf, 0x0 },
- { 0x00aa, 0x0 } },
- { { 0x0bb0, 0x0bcd, 0x0 },
- { 0x00a4, 0x0 } },
- { { 0x0bb0, 0x0bbf, 0x0 },
- { 0x00a5, 0x0 } },
- { { 0x0bb0, 0x0bc0, 0x0 },
- { 0x00a6, 0x0 } },
- { { 0x0b83, 0x0 },
- { 0x0025, 0x0 } },
- { { 0x0b83, 0x0b95, 0x0 },
- { 0x0025, 0x0031, 0x0 } },
+ const ShapeTable shape_table [] = {
+ { { 0x0b95, 0x0bc2, 0x0 },
+ { 0x004e, 0x0 } },
+ { { 0x0bae, 0x0bc2, 0x0 },
+ { 0x009e, 0x0 } },
+ { { 0x0b9a, 0x0bc2, 0x0 },
+ { 0x0058, 0x0 } },
+ { { 0x0b99, 0x0bc2, 0x0 },
+ { 0x0053, 0x0 } },
+ { { 0x0bb0, 0x0bc2, 0x0 },
+ { 0x00a8, 0x0 } },
+ { { 0x0ba4, 0x0bc2, 0x0 },
+ { 0x008e, 0x0 } },
+ { { 0x0b9f, 0x0bc2, 0x0 },
+ { 0x0062, 0x0 } },
+ { { 0x0b95, 0x0bc6, 0x0 },
+ { 0x000a, 0x0031, 0x0 } },
+ { { 0x0b95, 0x0bca, 0x0 },
+ { 0x000a, 0x0031, 0x0007, 0x0 } },
+ { { 0x0b95, 0x0bc6, 0x0bbe, 0x0 },
+ { 0x000a, 0x0031, 0x007, 0x0 } },
+ { { 0x0b95, 0x0bcd, 0x0bb7, 0x0 },
+ { 0x0049, 0x0 } },
+ { { 0x0b95, 0x0bcd, 0x0bb7, 0x0bca, 0x0 },
+ { 0x000a, 0x0049, 0x007, 0x0 } },
+ { { 0x0b95, 0x0bcd, 0x0bb7, 0x0bc6, 0x0bbe, 0x0 },
+ { 0x000a, 0x0049, 0x007, 0x0 } },
+ { { 0x0b9f, 0x0bbf, 0x0 },
+ { 0x005f, 0x0 } },
+ { { 0x0b9f, 0x0bc0, 0x0 },
+ { 0x0060, 0x0 } },
+ { { 0x0bb2, 0x0bc0, 0x0 },
+ { 0x00ab, 0x0 } },
+ { { 0x0bb2, 0x0bbf, 0x0 },
+ { 0x00aa, 0x0 } },
+ { { 0x0bb0, 0x0bcd, 0x0 },
+ { 0x00a4, 0x0 } },
+ { { 0x0bb0, 0x0bbf, 0x0 },
+ { 0x00a5, 0x0 } },
+ { { 0x0bb0, 0x0bc0, 0x0 },
+ { 0x00a6, 0x0 } },
+ { { 0x0b83, 0x0 },
+ { 0x0025, 0x0 } },
+ { { 0x0b83, 0x0b95, 0x0 },
+ { 0x0025, 0x0031, 0x0 } },
{ { 0xb95, 0xbc6, 0xbbe, 0x0 },
{ 0xa, 0x31, 0x7, 0x0 } },
{ { 0xb95, 0xbc7, 0xbbe, 0x0 },
@@ -676,11 +676,11 @@ void tst_QTextScriptEngine::tamil_data()
{ { 0xb95, 0xbc6, 0xbd7, 0x0 },
{ 0xa, 0x31, 0x40, 0x0 } },
- { {0}, {0} }
- };
- prepareShapingTest(f, shape_table);
- } else
- QSKIP("couldn't find AkrutiTml1");
+ { {0}, {0} }
+ };
+ prepareShapingTest(f, shape_table);
+ } else
+ QSKIP("couldn't find AkrutiTml1");
}
}
@@ -701,35 +701,35 @@ void tst_QTextScriptEngine::telugu_data()
{
if (QFontDatabase().families(QFontDatabase::Telugu).contains("Pothana2000")) {
QFont f("Pothana2000");
- const ShapeTable shape_table [] = {
+ const ShapeTable shape_table [] = {
{ { 0xc15, 0xc4d, 0x0 },
- { 0xbb, 0x0 } },
+ { 0xbb, 0x0 } },
{ { 0xc15, 0xc4d, 0xc37, 0x0 },
- { 0x4b, 0x0 } },
+ { 0x4b, 0x0 } },
{ { 0xc15, 0xc4d, 0xc37, 0xc4d, 0x0 },
- { 0xe0, 0x0 } },
+ { 0xe0, 0x0 } },
{ { 0xc15, 0xc4d, 0xc37, 0xc4d, 0xc23, 0x0 },
- { 0x4b, 0x91, 0x0 } },
+ { 0x4b, 0x91, 0x0 } },
{ { 0xc15, 0xc4d, 0xc30, 0x0 },
- { 0x5a, 0xb2, 0x0 } },
+ { 0x5a, 0xb2, 0x0 } },
{ { 0xc15, 0xc4d, 0xc30, 0xc4d, 0x0 },
- { 0xbb, 0xb2, 0x0 } },
+ { 0xbb, 0xb2, 0x0 } },
{ { 0xc15, 0xc4d, 0xc30, 0xc4d, 0xc15, 0x0 },
- { 0x5a, 0xb2, 0x83, 0x0 } },
+ { 0x5a, 0xb2, 0x83, 0x0 } },
{ { 0xc15, 0xc4d, 0xc30, 0xc3f, 0x0 },
- { 0xe2, 0xb2, 0x0 } },
+ { 0xe2, 0xb2, 0x0 } },
{ { 0xc15, 0xc4d, 0xc15, 0xc48, 0x0 },
{ 0xe6, 0xb3, 0x83, 0x0 } },
{ { 0xc15, 0xc4d, 0xc30, 0xc48, 0x0 },
- { 0xe6, 0xb3, 0x9f, 0x0 } },
+ { 0xe6, 0xb3, 0x9f, 0x0 } },
{ { 0xc15, 0xc46, 0xc56, 0x0 },
{ 0xe6, 0xb3, 0x0 } },
{ {0}, {0} }
};
- prepareShapingTest(f, shape_table);
- } else
- QSKIP("couldn't find Pothana2000");
+ prepareShapingTest(f, shape_table);
+ } else
+ QSKIP("couldn't find Pothana2000");
}
}
@@ -750,42 +750,42 @@ void tst_QTextScriptEngine::kannada_data()
{
if (QFontDatabase().families(QFontDatabase::Kannada).contains("Sampige")) {
QFont f("Sampige");
- const ShapeTable shape_table [] = {
- { { 0x0ca8, 0x0ccd, 0x0ca8, 0x0 },
- { 0x0049, 0x00ba, 0x0 } },
- { { 0x0ca8, 0x0ccd, 0x0ca1, 0x0 },
- { 0x0049, 0x00b3, 0x0 } },
- { { 0x0caf, 0x0cc2, 0x0 },
- { 0x004f, 0x005d, 0x0 } },
- { { 0x0ce0, 0x0 },
- { 0x006a, 0x0 } },
- { { 0x0ce6, 0x0ce7, 0x0ce8, 0x0 },
- { 0x006b, 0x006c, 0x006d, 0x0 } },
- { { 0x0cb5, 0x0ccb, 0x0 },
- { 0x015f, 0x0067, 0x0 } },
- { { 0x0cb0, 0x0ccd, 0x0cae, 0x0 },
- { 0x004e, 0x0082, 0x0 } },
- { { 0x0cb0, 0x0ccd, 0x0c95, 0x0 },
- { 0x0036, 0x0082, 0x0 } },
- { { 0x0c95, 0x0ccd, 0x0cb0, 0x0 },
- { 0x0036, 0x00c1, 0x0 } },
- { { 0x0cb0, 0x0ccd, 0x200d, 0x0c95, 0x0 },
- { 0x0050, 0x00a7, 0x0 } },
-
- { {0}, {0} }
- };
- prepareShapingTest(f, shape_table);
- } else
- QSKIP("couldn't find Sampige");
+ const ShapeTable shape_table [] = {
+ { { 0x0ca8, 0x0ccd, 0x0ca8, 0x0 },
+ { 0x0049, 0x00ba, 0x0 } },
+ { { 0x0ca8, 0x0ccd, 0x0ca1, 0x0 },
+ { 0x0049, 0x00b3, 0x0 } },
+ { { 0x0caf, 0x0cc2, 0x0 },
+ { 0x004f, 0x005d, 0x0 } },
+ { { 0x0ce0, 0x0 },
+ { 0x006a, 0x0 } },
+ { { 0x0ce6, 0x0ce7, 0x0ce8, 0x0 },
+ { 0x006b, 0x006c, 0x006d, 0x0 } },
+ { { 0x0cb5, 0x0ccb, 0x0 },
+ { 0x015f, 0x0067, 0x0 } },
+ { { 0x0cb0, 0x0ccd, 0x0cae, 0x0 },
+ { 0x004e, 0x0082, 0x0 } },
+ { { 0x0cb0, 0x0ccd, 0x0c95, 0x0 },
+ { 0x0036, 0x0082, 0x0 } },
+ { { 0x0c95, 0x0ccd, 0x0cb0, 0x0 },
+ { 0x0036, 0x00c1, 0x0 } },
+ { { 0x0cb0, 0x0ccd, 0x200d, 0x0c95, 0x0 },
+ { 0x0050, 0x00a7, 0x0 } },
+
+ { {0}, {0} }
+ };
+ prepareShapingTest(f, shape_table);
+ } else
+ QSKIP("couldn't find Sampige");
}
{
if (QFontDatabase().families(QFontDatabase::Kannada).contains("Tunga")) {
QFont f("Tunga");
- const ShapeTable shape_table [] = {
- { { 0x0cb7, 0x0cc6, 0x0 },
- { 0x00b0, 0x006c, 0x0 } },
- { { 0x0cb7, 0x0ccd, 0x0 },
- { 0x0163, 0x0 } },
+ const ShapeTable shape_table [] = {
+ { { 0x0cb7, 0x0cc6, 0x0 },
+ { 0x00b0, 0x006c, 0x0 } },
+ { { 0x0cb7, 0x0ccd, 0x0 },
+ { 0x0163, 0x0 } },
{ { 0xc95, 0xcbf, 0xcd5, 0x0 },
{ 0x114, 0x73, 0x0 } },
{ { 0xc95, 0xcc6, 0xcd5, 0x0 },
@@ -796,11 +796,11 @@ void tst_QTextScriptEngine::kannada_data()
{ 0x90, 0x6c, 0x69, 0x0 } },
{ { 0xc95, 0xcca, 0xcd5, 0x0 },
{ 0x90, 0x6c, 0x69, 0x73, 0x0 } },
- { {0}, {0} }
- };
- prepareShapingTest(f, shape_table);
- } else
- QSKIP("couldn't find Tunga");
+ { {0}, {0} }
+ };
+ prepareShapingTest(f, shape_table);
+ } else
+ QSKIP("couldn't find Tunga");
}
}
@@ -821,33 +821,33 @@ void tst_QTextScriptEngine::malayalam_data()
{
if (QFontDatabase().families(QFontDatabase::Malayalam).contains("AkrutiMal2")) {
QFont f("AkrutiMal2");
- const ShapeTable shape_table [] = {
- { { 0x0d15, 0x0d46, 0x0 },
- { 0x005e, 0x0034, 0x0 } },
- { { 0x0d15, 0x0d47, 0x0 },
- { 0x005f, 0x0034, 0x0 } },
- { { 0x0d15, 0x0d4b, 0x0 },
- { 0x005f, 0x0034, 0x0058, 0x0 } },
- { { 0x0d15, 0x0d48, 0x0 },
- { 0x0060, 0x0034, 0x0 } },
- { { 0x0d15, 0x0d4a, 0x0 },
- { 0x005e, 0x0034, 0x0058, 0x0 } },
- { { 0x0d30, 0x0d4d, 0x0d15, 0x0 },
- { 0x009e, 0x0034, 0x0 } },
- { { 0x0d15, 0x0d4d, 0x0d35, 0x0 },
- { 0x0034, 0x007a, 0x0 } },
- { { 0x0d15, 0x0d4d, 0x0d2f, 0x0 },
- { 0x0034, 0x00a2, 0x0 } },
- { { 0x0d1f, 0x0d4d, 0x0d1f, 0x0 },
- { 0x0069, 0x0 } },
- { { 0x0d26, 0x0d4d, 0x0d26, 0x0 },
- { 0x0074, 0x0 } },
- { { 0x0d30, 0x0d4d, 0x0 },
- { 0x009e, 0x0 } },
- { { 0x0d30, 0x0d4d, 0x200c, 0x0 },
- { 0x009e, 0x0 } },
- { { 0x0d30, 0x0d4d, 0x200d, 0x0 },
- { 0x009e, 0x0 } },
+ const ShapeTable shape_table [] = {
+ { { 0x0d15, 0x0d46, 0x0 },
+ { 0x005e, 0x0034, 0x0 } },
+ { { 0x0d15, 0x0d47, 0x0 },
+ { 0x005f, 0x0034, 0x0 } },
+ { { 0x0d15, 0x0d4b, 0x0 },
+ { 0x005f, 0x0034, 0x0058, 0x0 } },
+ { { 0x0d15, 0x0d48, 0x0 },
+ { 0x0060, 0x0034, 0x0 } },
+ { { 0x0d15, 0x0d4a, 0x0 },
+ { 0x005e, 0x0034, 0x0058, 0x0 } },
+ { { 0x0d30, 0x0d4d, 0x0d15, 0x0 },
+ { 0x009e, 0x0034, 0x0 } },
+ { { 0x0d15, 0x0d4d, 0x0d35, 0x0 },
+ { 0x0034, 0x007a, 0x0 } },
+ { { 0x0d15, 0x0d4d, 0x0d2f, 0x0 },
+ { 0x0034, 0x00a2, 0x0 } },
+ { { 0x0d1f, 0x0d4d, 0x0d1f, 0x0 },
+ { 0x0069, 0x0 } },
+ { { 0x0d26, 0x0d4d, 0x0d26, 0x0 },
+ { 0x0074, 0x0 } },
+ { { 0x0d30, 0x0d4d, 0x0 },
+ { 0x009e, 0x0 } },
+ { { 0x0d30, 0x0d4d, 0x200c, 0x0 },
+ { 0x009e, 0x0 } },
+ { { 0x0d30, 0x0d4d, 0x200d, 0x0 },
+ { 0x009e, 0x0 } },
{ { 0xd15, 0xd46, 0xd3e, 0x0 },
{ 0x5e, 0x34, 0x58, 0x0 } },
{ { 0xd15, 0xd47, 0xd3e, 0x0 },
@@ -856,11 +856,11 @@ void tst_QTextScriptEngine::malayalam_data()
{ 0x5e, 0x34, 0x65, 0x0 } },
{ { 0xd15, 0xd57, 0x0 },
{ 0x34, 0x65, 0x0 } },
- { {0}, {0} }
- };
- prepareShapingTest(f, shape_table);
- } else
- QSKIP("couldn't find AkrutiMal2");
+ { {0}, {0} }
+ };
+ prepareShapingTest(f, shape_table);
+ } else
+ QSKIP("couldn't find AkrutiMal2");
}
{
if (QFontDatabase().families(QFontDatabase::Malayalam).contains("Rachana")) {
@@ -879,7 +879,7 @@ void tst_QTextScriptEngine::malayalam_data()
{ {0}, {0} }
};
- prepareShapingTest(f, shape_table);
+ prepareShapingTest(f, shape_table);
} else
QSKIP("couldn't find Rachana");
}
@@ -917,7 +917,7 @@ void tst_QTextScriptEngine::sinhala_data()
{ 0x4a, 0x61, 0x42, 0x41, 0x0 } },
{ {0}, {0} }
};
- prepareShapingTest(f, shape_table);
+ prepareShapingTest(f, shape_table);
} else
QSKIP("couldn't find Malithi Web");
}
@@ -940,30 +940,30 @@ void tst_QTextScriptEngine::khmer_data()
{
if (QFontDatabase().families(QFontDatabase::Khmer).contains("Khmer OS")) {
QFont f("Khmer OS");
- const ShapeTable shape_table [] = {
- { { 0x179a, 0x17cd, 0x0 },
- { 0x24c, 0x27f, 0x0 } },
- { { 0x179f, 0x17c5, 0x0 },
- { 0x273, 0x203, 0x0 } },
- { { 0x1790, 0x17d2, 0x1784, 0x17c3, 0x0 },
- { 0x275, 0x242, 0x182, 0x0 } },
- { { 0x179a, 0x0 },
- { 0x24c, 0x0 } },
- { { 0x1781, 0x17d2, 0x1798, 0x17c2, 0x0 },
- { 0x274, 0x233, 0x197, 0x0 } },
- { { 0x1798, 0x17b6, 0x0 },
- { 0x1cb, 0x0 } },
- { { 0x179a, 0x17b8, 0x0 },
- { 0x24c, 0x26a, 0x0 } },
- { { 0x1787, 0x17b6, 0x0 },
- { 0x1ba, 0x0 } },
- { { 0x1798, 0x17d2, 0x1796, 0x17bb, 0x0 },
- { 0x24a, 0x195, 0x26d, 0x0 } },
- { {0}, {0} }
- };
- prepareShapingTest(f, shape_table);
- } else
- QSKIP("couldn't find Khmer OS");
+ const ShapeTable shape_table [] = {
+ { { 0x179a, 0x17cd, 0x0 },
+ { 0x24c, 0x27f, 0x0 } },
+ { { 0x179f, 0x17c5, 0x0 },
+ { 0x273, 0x203, 0x0 } },
+ { { 0x1790, 0x17d2, 0x1784, 0x17c3, 0x0 },
+ { 0x275, 0x242, 0x182, 0x0 } },
+ { { 0x179a, 0x0 },
+ { 0x24c, 0x0 } },
+ { { 0x1781, 0x17d2, 0x1798, 0x17c2, 0x0 },
+ { 0x274, 0x233, 0x197, 0x0 } },
+ { { 0x1798, 0x17b6, 0x0 },
+ { 0x1cb, 0x0 } },
+ { { 0x179a, 0x17b8, 0x0 },
+ { 0x24c, 0x26a, 0x0 } },
+ { { 0x1787, 0x17b6, 0x0 },
+ { 0x1ba, 0x0 } },
+ { { 0x1798, 0x17d2, 0x1796, 0x17bb, 0x0 },
+ { 0x24a, 0x195, 0x26d, 0x0 } },
+ { {0}, {0} }
+ };
+ prepareShapingTest(f, shape_table);
+ } else
+ QSKIP("couldn't find Khmer OS");
}
}
@@ -984,14 +984,14 @@ void tst_QTextScriptEngine::linearB_data()
{
if (QFontDatabase().families(QFontDatabase::Any).contains("Penuturesu")) {
QFont f("Penuturesu");
- const ShapeTable shape_table [] = {
- { { 0xd800, 0xdc01, 0xd800, 0xdc02, 0xd800, 0xdc03, 0 },
+ const ShapeTable shape_table [] = {
+ { { 0xd800, 0xdc01, 0xd800, 0xdc02, 0xd800, 0xdc03, 0 },
{ 0x5, 0x6, 0x7, 0 } },
- { {0}, {0} }
- };
- prepareShapingTest(f, shape_table);
- } else
- QSKIP("couldn't find Penuturesu");
+ { {0}, {0} }
+ };
+ prepareShapingTest(f, shape_table);
+ } else
+ QSKIP("couldn't find Penuturesu");
}
}
diff --git a/tests/auto/network/access/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp b/tests/auto/network/access/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp
index d629b30ca6..7bb435952b 100644
--- a/tests/auto/network/access/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp
+++ b/tests/auto/network/access/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp
@@ -875,17 +875,17 @@ void tst_QHttpNetworkConnection::getMultipleWithPipeliningAndMultiplePriorities(
request = new QHttpNetworkRequest("http://" + QtNetworkSettings::serverName() + "/qtest/rfc3252.txt", QHttpNetworkRequest::Get);
else
request = new QHttpNetworkRequest("http://" + QtNetworkSettings::serverName() + "/qtest/rfc3252.txt", QHttpNetworkRequest::Head);
-
+
if (i % 2 || i % 3)
request->setPipeliningAllowed(true);
-
+
if (i % 3)
request->setPriority(QHttpNetworkRequest::HighPriority);
else if (i % 5)
request->setPriority(QHttpNetworkRequest::NormalPriority);
else if (i % 7)
request->setPriority(QHttpNetworkRequest::LowPriority);
-
+
requests.append(request);
QHttpNetworkReply *reply = connection.sendRequest(*request);
replies.append(reply);
diff --git a/tests/auto/network/access/qnetworkdiskcache/tst_qnetworkdiskcache.cpp b/tests/auto/network/access/qnetworkdiskcache/tst_qnetworkdiskcache.cpp
index 55eb1fed82..54b560cc1b 100644
--- a/tests/auto/network/access/qnetworkdiskcache/tst_qnetworkdiskcache.cpp
+++ b/tests/auto/network/access/qnetworkdiskcache/tst_qnetworkdiskcache.cpp
@@ -79,7 +79,7 @@ private slots:
void oldCacheVersionFile_data();
void oldCacheVersionFile();
-
+
void sync();
void crashWhenParentingCache();
diff --git a/tests/auto/network/access/qnetworkreply/echo/main.cpp b/tests/auto/network/access/qnetworkreply/echo/main.cpp
index 6a4a959cdc..1f91c5da97 100644
--- a/tests/auto/network/access/qnetworkreply/echo/main.cpp
+++ b/tests/auto/network/access/qnetworkreply/echo/main.cpp
@@ -48,7 +48,7 @@ int main(int argc, char **)
printf("echos all its input to its output.\n");
return 1;
}
-
+
QFile file;
file.open(stdin, QFile::ReadWrite);
QByteArray data = file.readAll();
diff --git a/tests/auto/network/bearer/qnetworkconfiguration/tst_qnetworkconfiguration.cpp b/tests/auto/network/bearer/qnetworkconfiguration/tst_qnetworkconfiguration.cpp
index a38b5f5338..f4cbfbe8f2 100644
--- a/tests/auto/network/bearer/qnetworkconfiguration/tst_qnetworkconfiguration.cpp
+++ b/tests/auto/network/bearer/qnetworkconfiguration/tst_qnetworkconfiguration.cpp
@@ -96,7 +96,7 @@ void tst_QNetworkConfiguration::invalidPoint()
void tst_QNetworkConfiguration::comparison()
{
//test copy constructor and assignment operator
- //compare invalid connection points
+ //compare invalid connection points
QNetworkConfiguration pt1;
QVERIFY(!pt1.isValid());
QVERIFY(pt1.type() == QNetworkConfiguration::Invalid);
@@ -110,7 +110,7 @@ void tst_QNetworkConfiguration::comparison()
QVERIFY(pt1.state() == pt2.state());
QVERIFY(pt1.purpose() == pt2.purpose());
-
+
QNetworkConfiguration pt3;
pt3 = pt1;
QVERIFY(pt1==pt3);
@@ -170,12 +170,12 @@ void tst_QNetworkConfiguration::isRoamingAvailable()
{
QNetworkConfigurationManager manager;
QList<QNetworkConfiguration> configs = manager.allConfigurations();
-
+
//force update to get maximum list
QSignalSpy spy(&manager, SIGNAL(updateCompleted()));
manager.updateConfigurations(); //initiate scans
QTRY_VERIFY_WITH_TIMEOUT(spy.count() == 1, TestTimeOut); //wait for scan to complete
-
+
foreach(QNetworkConfiguration c, configs)
{
QVERIFY(QNetworkConfiguration::UserChoice != c.type());
diff --git a/tests/auto/network/bearer/qnetworkconfigurationmanager/tst_qnetworkconfigurationmanager.cpp b/tests/auto/network/bearer/qnetworkconfigurationmanager/tst_qnetworkconfigurationmanager.cpp
index 835b9aecfb..18aba51fe6 100644
--- a/tests/auto/network/bearer/qnetworkconfigurationmanager/tst_qnetworkconfigurationmanager.cpp
+++ b/tests/auto/network/bearer/qnetworkconfigurationmanager/tst_qnetworkconfigurationmanager.cpp
@@ -64,7 +64,7 @@ private slots:
#ifndef QT_NO_BEARERMANAGEMENT
void printConfigurationDetails(const QNetworkConfiguration& p)
{
- qDebug() << p.name() <<": isvalid->" <<p.isValid() << " type->"<< p.type() <<
+ qDebug() << p.name() <<": isvalid->" <<p.isValid() << " type->"<< p.type() <<
" roaming->" << p.isRoamingAvailable() << "identifier->" << p.identifier() <<
" purpose->" << p.purpose() << " state->" << p.state();
}
@@ -189,7 +189,7 @@ void tst_QNetworkConfigurationManager::configurationFromIdentifier()
QSignalSpy spy(&manager, SIGNAL(updateCompleted()));
manager.updateConfigurations(); //initiate scans
QTRY_VERIFY_WITH_TIMEOUT(spy.count() == 1, TestTimeOut); //wait for scan to complete
-
+
QList<QNetworkConfiguration> configs = manager.allConfigurations();
foreach(QNetworkConfiguration c, configs) {
diff --git a/tests/auto/network/bearer/qnetworksession/test/tst_qnetworksession.cpp b/tests/auto/network/bearer/qnetworksession/test/tst_qnetworksession.cpp
index 529f45f001..5dede11e5b 100644
--- a/tests/auto/network/bearer/qnetworksession/test/tst_qnetworksession.cpp
+++ b/tests/auto/network/bearer/qnetworksession/test/tst_qnetworksession.cpp
@@ -139,7 +139,7 @@ void tst_QNetworkSession::cleanupTestCase()
}
// Robustness test for calling interfaces in nonsense order / with nonsense parameters
-void tst_QNetworkSession::robustnessBombing()
+void tst_QNetworkSession::robustnessBombing()
{
QNetworkConfigurationManager mgr;
QNetworkSession testSession(mgr.defaultConfiguration());
@@ -199,18 +199,18 @@ void tst_QNetworkSession::invalidSession()
QVERIFY(!session.isOpen());
QVERIFY(session.state() == QNetworkSession::Invalid);
QVERIFY(session.error() == QNetworkSession::InvalidConfigurationError);
-
+
// 2. Verify that opening session with invalid configuration both 1) emits invalidconfigurationerror and 2) sets session's state as invalid.
QSignalSpy errorSpy(&session, SIGNAL(error(QNetworkSession::SessionError)));
session.open();
session.waitForOpened(1000); // Should bail out right away
- QVERIFY(errorSpy.count() == 1);
+ QVERIFY(errorSpy.count() == 1);
QNetworkSession::SessionError error =
qvariant_cast<QNetworkSession::SessionError> (errorSpy.first().at(0));
QVERIFY(error == QNetworkSession::InvalidConfigurationError);
QVERIFY(session.error() == QNetworkSession::InvalidConfigurationError);
QVERIFY(session.state() == QNetworkSession::Invalid);
-
+
#ifdef QNETWORKSESSION_MANUAL_TESTS
QNetworkConfiguration invalidatedConfig = suitableConfiguration("WLAN",QNetworkConfiguration::InternetAccessPoint);
@@ -354,7 +354,7 @@ void tst_QNetworkSession::repeatedOpenClose()
QNetworkSession permanentSession(config);
if (!openSession(&permanentSession) || !closeSession(&permanentSession))
QSKIP("Unable to open/close session, skipping this round of repeated open-close test.");
- for (int i = 0; i < repeatTimes; i++) {
+ for (int i = 0; i < repeatTimes; i++) {
qDebug() << "Opening, loop number " << i;
QVERIFY(openSession(&permanentSession));
qDebug() << "Closing, loop number, then waiting 5 seconds: " << i;
@@ -469,7 +469,7 @@ void tst_QNetworkSession::userChoiceSession()
QVERIFY(activeConfiguration.isValid());
QVERIFY(activeConfiguration.type() == QNetworkConfiguration::InternetAccessPoint);
-
+
//resetting ActiveConfiguration is ignored (read only property)
session.setSessionProperty("ActiveConfiguration", testIdentifier);
QVERIFY(session.sessionProperty("ActiveConfiguration").toString() != testIdentifier);
@@ -612,7 +612,7 @@ void tst_QNetworkSession::sessionOpenCloseStop()
QVERIFY(session.error() == QNetworkSession::UnknownSessionError);
session2.open();
-
+
QTRY_VERIFY_WITH_TIMEOUT(!sessionOpenedSpy2.isEmpty() || !errorSpy2.isEmpty(), TestTimeOut);
if (errorSpy2.isEmpty()) {
@@ -666,10 +666,10 @@ void tst_QNetworkSession::sessionOpenCloseStop()
QVERIFY(errorSpy.isEmpty());
QVERIFY(errorSpy2.isEmpty());
-
- // Wait for Disconnected state
+
+ // Wait for Disconnected state
QTRY_NOOP(session2.state() == QNetworkSession::Disconnected);
-
+
if (expectStateChange)
QTRY_VERIFY_WITH_TIMEOUT(stateChangedSpy2.count() >= 1 || !errorSpy2.isEmpty(), TestTimeOut);
@@ -722,14 +722,14 @@ void tst_QNetworkSession::sessionOpenCloseStop()
} else {
QFAIL("Unexpected amount of state changes when roaming.");
}
-
+
QTRY_VERIFY_WITH_TIMEOUT(session.state() == QNetworkSession::Roaming ||
session.state() == QNetworkSession::Connected ||
session.state() == QNetworkSession::Disconnected, TestTimeOut);
-
+
QTRY_VERIFY_WITH_TIMEOUT(stateChangedSpy.count() > 0, TestTimeOut);
- state = qvariant_cast<QNetworkSession::State>(stateChangedSpy.at(stateChangedSpy.count() - 1).at(0));
-
+ state = qvariant_cast<QNetworkSession::State>(stateChangedSpy.at(stateChangedSpy.count() - 1).at(0));
+
for (int i = 0; i < stateChangedSpy.count(); i++) {
QNetworkSession::State state_temp =
qvariant_cast<QNetworkSession::State>(stateChangedSpy.at(i).at(0));
@@ -753,7 +753,7 @@ void tst_QNetworkSession::sessionOpenCloseStop()
QTRY_VERIFY_WITH_TIMEOUT(errorSpy.isEmpty(),TestTimeOut);
if (stateChangedSpy.count() > 1) {
- state = qvariant_cast<QNetworkSession::State>(stateChangedSpy.at(stateChangedSpy.count() - 2).at(0));
+ state = qvariant_cast<QNetworkSession::State>(stateChangedSpy.at(stateChangedSpy.count() - 2).at(0));
QVERIFY(state == QNetworkSession::Roaming);
}
roamedSuccessfully = true;
@@ -778,7 +778,7 @@ void tst_QNetworkSession::sessionOpenCloseStop()
QVERIFY(!errorSpy.isEmpty());
} else {
QTest::qWait(2000); // Wait awhile to get all signals from platform
-
+
if (stateChangedSpy2.count() == 2) {
QNetworkSession::State state =
qvariant_cast<QNetworkSession::State>(stateChangedSpy2.at(0).at(0));
@@ -797,7 +797,7 @@ void tst_QNetworkSession::sessionOpenCloseStop()
QNetworkSession::State state =
qvariant_cast<QNetworkSession::State>(stateChangedSpy2.at(stateChangedSpy2.count() - 1).at(0));
- QVERIFY(state == QNetworkSession::Disconnected);
+ QVERIFY(state == QNetworkSession::Disconnected);
}
}
@@ -920,7 +920,7 @@ void tst_QNetworkSession::outOfProcessSession()
// Cannot read/write to processes on WinCE.
// Easiest alternative is to use sockets for IPC.
QLocalServer oopServer;
- // First remove possible earlier listening address which would cause listen to fail
+ // First remove possible earlier listening address which would cause listen to fail
// (e.g. previously abruptly ended unit test might cause this)
QLocalServer::removeServer("tst_qnetworksession");
oopServer.listen("tst_qnetworksession");
@@ -1034,7 +1034,7 @@ QNetworkConfiguration suitableConfiguration(QString bearerType, QNetworkConfigur
// qDebug() << "Dumping config because bearer mismatches (cellular): " << config.name();
discoveredConfigs.removeOne(config);
}
- } else if ((config.type() == QNetworkConfiguration::InternetAccessPoint) &&
+ } else if ((config.type() == QNetworkConfiguration::InternetAccessPoint) &&
bearerType != config.bearerTypeName()) {
// qDebug() << "Dumping config because bearer mismatches (WLAN): " << config.name();
discoveredConfigs.removeOne(config);
@@ -1109,12 +1109,12 @@ bool openSession(QNetworkSession *session) {
qDebug("tst_QNetworkSession::openSession() failure: QNetworkSession::error() - signal was detected.");
result = false;
}
- if (sessionInitState != QNetworkSession::Connected &&
+ if (sessionInitState != QNetworkSession::Connected &&
stateChangeSpy.isEmpty()) {
qDebug("tst_QNetworkSession::openSession() failure: QNetworkSession::stateChanged() - signals not detected.");
result = false;
}
- if (configInitState != QNetworkConfiguration::Active &&
+ if (configInitState != QNetworkConfiguration::Active &&
configChangeSpy.isEmpty()) {
qDebug("tst_QNetworkSession::openSession() failure: QNetworkConfigurationManager::configurationChanged() - signals not detected.");
result = false;
@@ -1132,7 +1132,7 @@ bool openSession(QNetworkSession *session) {
qDebug() << "tst_QNetworkSession::openSession() name of the configuration is: " << session->configuration().name();
qDebug() << "tst_QNetworkSession::openSession() configuration state is: " << session->configuration().state();
qDebug() << "tst_QNetworkSession::openSession() session state is: " << session->state();
-
+
return result;
}
@@ -1146,26 +1146,26 @@ bool closeSession(QNetworkSession *session, bool lastSessionOnConfiguration) {
qDebug("tst_QNetworkSession::closeSession() failure: NULL session given");
return false;
}
-
+
qDebug() << "tst_QNetworkSession::closeSession() name of the configuration to be closed: " << session->configuration().name();
qDebug() << "tst_QNetworkSession::closeSession() state of the configuration to be closed: " << session->configuration().state();
qDebug() << "tst_QNetworkSession::closeSession() state of the session to be closed: " << session->state();
-
- if (session->state() != QNetworkSession::Connected ||
+
+ if (session->state() != QNetworkSession::Connected ||
!session->isOpen()) {
qDebug("tst_QNetworkSession::closeSession() failure: session is not opened.");
return false;
- }
+ }
QNetworkConfigurationManager mgr;
QSignalSpy sessionClosedSpy(session, SIGNAL(closed()));
QSignalSpy sessionStateChangedSpy(session, SIGNAL(stateChanged(QNetworkSession::State)));
QSignalSpy sessionErrorSpy(session, SIGNAL(error(QNetworkSession::SessionError)));
QSignalSpy configChangeSpy(&mgr, SIGNAL(configurationChanged(QNetworkConfiguration)));
-
+
bool result = true;
session->close();
QTest::qWait(5000); // Wait a moment so that all signals are propagated
-
+
if (!sessionErrorSpy.isEmpty()) {
qDebug("tst_QNetworkSession::closeSession() failure: QNetworkSession::error() received.");
result = false;
@@ -1174,7 +1174,7 @@ bool closeSession(QNetworkSession *session, bool lastSessionOnConfiguration) {
qDebug("tst_QNetworkSession::closeSession() failure: QNetworkSession::closed() signal not received.");
result = false;
}
- if (lastSessionOnConfiguration &&
+ if (lastSessionOnConfiguration &&
sessionStateChangedSpy.isEmpty()) {
qDebug("tst_QNetworkSession::closeSession() failure: QNetworkSession::stateChanged() signals not received.");
result = false;
@@ -1199,7 +1199,7 @@ bool closeSession(QNetworkSession *session, bool lastSessionOnConfiguration) {
qDebug() << "tst_QNetworkSession::closeSession() closing session failed.";
} else {
qDebug() << "tst_QNetworkSession::closeSession() closing session succeeded.";
- }
+ }
qDebug() << "tst_QNetworkSession::closeSession() name of the configuration is: " << session->configuration().name();
qDebug() << "tst_QNetworkSession::closeSession() configuration state is: " << session->configuration().state();
qDebug() << "tst_QNetworkSession::closeSession() session state is: " << session->state();
diff --git a/tests/auto/network/kernel/qhostaddress/tst_qhostaddress.cpp b/tests/auto/network/kernel/qhostaddress/tst_qhostaddress.cpp
index 3b4af27d4e..dd9202c748 100644
--- a/tests/auto/network/kernel/qhostaddress/tst_qhostaddress.cpp
+++ b/tests/auto/network/kernel/qhostaddress/tst_qhostaddress.cpp
@@ -266,7 +266,7 @@ void tst_QHostAddress::specialAddresses_data()
QTest::newRow("null_1") << QString("") << (int)QHostAddress::Null << true;
QTest::newRow("null_2") << QString("bjarne") << (int)QHostAddress::Null << true;
-
+
QTest::newRow("compare_from_null") << QString("") << (int)QHostAddress::Broadcast << false;
QTest::newRow("broadcast_1") << QString("255.255.255.255") << (int)QHostAddress::Any << false;
diff --git a/tests/auto/network/socket/qlocalsocket/tst_qlocalsocket.cpp b/tests/auto/network/socket/qlocalsocket/tst_qlocalsocket.cpp
index 0ffcb60090..159f276c77 100644
--- a/tests/auto/network/socket/qlocalsocket/tst_qlocalsocket.cpp
+++ b/tests/auto/network/socket/qlocalsocket/tst_qlocalsocket.cpp
@@ -986,7 +986,7 @@ public:
if (!socket.waitForConnected(3000))
exec();
- connect(&socket, SIGNAL(bytesWritten(qint64)),
+ connect(&socket, SIGNAL(bytesWritten(qint64)),
this, SLOT(bytesWritten(qint64)), Qt::QueuedConnection);
socket.write("testing\n");
exec();
@@ -1004,9 +1004,9 @@ private:
signal.
Create a thread that will write to a socket.
- If the bytesWritten(qint64) signal is generated,
+ If the bytesWritten(qint64) signal is generated,
the slot connected to it will exit the thread,
- indicating test success.
+ indicating test success.
*/
void tst_QLocalSocket::bytesWrittenSignal()
diff --git a/tests/auto/network/socket/qtcpsocket/stressTest/Test.cpp b/tests/auto/network/socket/qtcpsocket/stressTest/Test.cpp
index 27f6640bdc..15ce1a0a12 100644
--- a/tests/auto/network/socket/qtcpsocket/stressTest/Test.cpp
+++ b/tests/auto/network/socket/qtcpsocket/stressTest/Test.cpp
@@ -48,7 +48,7 @@
#include "Test.h"
//------------------------------------------------------------------------------
-My4Socket::My4Socket(QObject *parent)
+My4Socket::My4Socket(QObject *parent)
: QTcpSocket(parent), safeShutDown(false)
{
connect(this, SIGNAL(readyRead()), this, SLOT(read()));
@@ -74,7 +74,7 @@ void My4Socket::read(void)
if (reply == 42)
++reply;
}
-
+
// Reply with a bigger number
sendTest(reply);
}
diff --git a/tests/auto/network/socket/qtcpsocket/stressTest/main.cpp b/tests/auto/network/socket/qtcpsocket/stressTest/main.cpp
index 8bbe351b45..4376e872e8 100644
--- a/tests/auto/network/socket/qtcpsocket/stressTest/main.cpp
+++ b/tests/auto/network/socket/qtcpsocket/stressTest/main.cpp
@@ -62,6 +62,6 @@ int main(int argc, char **argv)
}
Test test(type);
-
+
return app.exec();
}
diff --git a/tests/auto/network/socket/qudpsocket/udpServer/main.cpp b/tests/auto/network/socket/qudpsocket/udpServer/main.cpp
index 6d866c2aa7..47adac3e77 100644
--- a/tests/auto/network/socket/qudpsocket/udpServer/main.cpp
+++ b/tests/auto/network/socket/qudpsocket/udpServer/main.cpp
@@ -68,10 +68,10 @@ private slots:
qint64 bytes = serverSocket.readDatagram(data, sizeof(data), &senderAddress, &senderPort);
if (bytes == 1 && data[0] == '\0')
QCoreApplication::instance()->quit();
-
+
for (int i = 0; i < bytes; ++i)
data[i] += 1;
- serverSocket.writeDatagram(data, bytes, senderAddress, senderPort);
+ serverSocket.writeDatagram(data, bytes, senderAddress, senderPort);
}
private:
@@ -83,7 +83,7 @@ int main(int argc, char **argv)
QCoreApplication app(argc, argv);
Server server(app.arguments().at(1).toInt());
-
+
return app.exec();
}
diff --git a/tests/auto/network/ssl/qsslerror/tst_qsslerror.cpp b/tests/auto/network/ssl/qsslerror/tst_qsslerror.cpp
index 4f375c8ab3..73537d124f 100644
--- a/tests/auto/network/ssl/qsslerror/tst_qsslerror.cpp
+++ b/tests/auto/network/ssl/qsslerror/tst_qsslerror.cpp
@@ -81,7 +81,7 @@ public slots:
private slots:
void constructing();
#endif
-
+
private:
static int loopLevel;
};
diff --git a/tests/auto/other/collections/tst_collections.cpp b/tests/auto/other/collections/tst_collections.cpp
index e145cc17df..df622602c3 100644
--- a/tests/auto/other/collections/tst_collections.cpp
+++ b/tests/auto/other/collections/tst_collections.cpp
@@ -3359,7 +3359,7 @@ void testVectorAlignment()
for (int i = 0; i < 200; ++i)
container.append(Aligned());
-
+
for (int i = 0; i < container.size(); ++i)
QCOMPARE(quintptr(&container.at(i)) % Aligned::PreferredAlignment, quintptr(0));
}
diff --git a/tests/auto/other/lancelot/scripts/background.qps b/tests/auto/other/lancelot/scripts/background.qps
index 000cfcdd91..d1efe5c178 100644
--- a/tests/auto/other/lancelot/scripts/background.qps
+++ b/tests/auto/other/lancelot/scripts/background.qps
@@ -14,12 +14,12 @@ path_lineTo path 0 50
bitmap_load bitmap.png bitmap
begin_block drawing
- save
+ save
drawRect 0 0 50 50
translate 60 0
drawEllipse 0 0 50 50
-
+
translate 60 0
drawPolygon [0 0 50 0 25 50 25 25]
@@ -28,9 +28,9 @@ begin_block drawing
translate 60 0
drawPie 0 0 50 50 1440 2000
-
+
translate 60 0
- drawChord 0 0 50 50 1440 2000
+ drawChord 0 0 50 50 1440 2000
translate 60 0
drawLine 0 0 50 0
@@ -44,10 +44,10 @@ begin_block drawing
drawArc 0 0 50 50 1440 2000
translate 60 0
- drawText 0 10 "Jambi-Bambi"
+ drawText 0 10 "Jambi-Bambi"
translate 80 0
- drawPixmap bitmap 0 0
+ drawPixmap bitmap 0 0
restore
save
@@ -57,7 +57,7 @@ begin_block drawing
translate 60 0
drawEllipse 0 0 50 50
-
+
translate 60 0
drawPolygon [0 0 50 0 25 50 25 25]
@@ -66,9 +66,9 @@ begin_block drawing
translate 60 0
drawPie 0 0 50 50 1440 2000
-
+
translate 60 0
- drawChord 0 0 50 50 1440 2000
+ drawChord 0 0 50 50 1440 2000
translate 60 0
drawLine 0 0 50 0
@@ -82,10 +82,10 @@ begin_block drawing
drawArc 0 0 50 50 1440 2000
translate 60 0
- drawText 0 10 "Jambi-Bambi"
+ drawText 0 10 "Jambi-Bambi"
translate 80 0
- drawPixmap bitmap 0 0
+ drawPixmap bitmap 0 0
restore
end_block
@@ -102,12 +102,12 @@ repeat_block drawing
translate 0 160
setBackgroundMode Transparent
setPen ff7f7f 4 dashline flatcap beveljoin
-repeat_block drawing
+repeat_block drawing
translate 0 160
setBackgroundMode OpaqueMode
setPen ff7f7f 4 dashline flatcap beveljoin
-repeat_block drawing
+repeat_block drawing
resetMatrix
diff --git a/tests/auto/other/lancelot/scripts/bitmaps.qps b/tests/auto/other/lancelot/scripts/bitmaps.qps
index a816b9d497..4966490337 100644
--- a/tests/auto/other/lancelot/scripts/bitmaps.qps
+++ b/tests/auto/other/lancelot/scripts/bitmaps.qps
@@ -122,12 +122,12 @@ translate 110 0
save
translate 20 -10
rotate 10
- setBackgroundMode Transparent
+ setBackgroundMode Transparent
repeat_block draw_subrected
restore
translate 110 0
-save
+save
translate 20 -10
rotate 10
setBackgroundMode Opaque
diff --git a/tests/auto/other/lancelot/scripts/clippaths.qps b/tests/auto/other/lancelot/scripts/clippaths.qps
index fba89784df..fe8e198a17 100644
--- a/tests/auto/other/lancelot/scripts/clippaths.qps
+++ b/tests/auto/other/lancelot/scripts/clippaths.qps
@@ -4,7 +4,7 @@
path_addRect hor 0 0 50 10
path_addRect ver 0 0 10 50
-translate 10 10
+translate 10 10
setPen NoPen
begin_block clipping
@@ -13,7 +13,7 @@ save
setBrush 0x7f7fff
save
setClipPath hor
- drawRect 0 0 100 100
+ drawRect 0 0 100 100
setClipPath ver IntersectClip
setBrush black CrossPattern
@@ -21,18 +21,18 @@ save
restore
translate 100 0
- save
+ save
setClipPath hor
drawRect 0 0 100 100
setClipPath ver ReplaceClip
setBrush black CrossPattern
- drawRect 0 0 100 100
+ drawRect 0 0 100 100
restore
translate 100 0
- save
- setClipPath hor
+ save
+ setClipPath hor
drawRect 0 0 100 100
setClipPath ver UniteClip
diff --git a/tests/auto/other/lancelot/scripts/cliprects.qps b/tests/auto/other/lancelot/scripts/cliprects.qps
index 0d28b035b4..aa0367eccf 100644
--- a/tests/auto/other/lancelot/scripts/cliprects.qps
+++ b/tests/auto/other/lancelot/scripts/cliprects.qps
@@ -3,7 +3,7 @@
-translate 10 10
+translate 10 10
setPen NoPen
begin_block clipping
@@ -11,8 +11,8 @@ save
setBrush 0x7f7fff
save
- setClipRect 0 0 50 10
- drawRect 0 0 100 100
+ setClipRect 0 0 50 10
+ drawRect 0 0 100 100
setClipRect 0 0 10 50 IntersectClip
setBrush black CrossPattern
@@ -20,17 +20,17 @@ save
restore
translate 100 0
- save
+ save
setClipRect 0 0 50 10
drawRect 0 0 100 100
setClipRect 0 0 10 50 ReplaceClip
setBrush black CrossPattern
- drawRect 0 0 100 100
+ drawRect 0 0 100 100
restore
translate 100 0
- save
+ save
setClipRect 0 0 50 10
drawRect 0 0 100 100
diff --git a/tests/auto/other/lancelot/scripts/conical_gradients.qps b/tests/auto/other/lancelot/scripts/conical_gradients.qps
index 2e897b1813..d6eb860f3f 100644
--- a/tests/auto/other/lancelot/scripts/conical_gradients.qps
+++ b/tests/auto/other/lancelot/scripts/conical_gradients.qps
@@ -64,7 +64,7 @@ setBrush nobrush
begin_block ellipse_draw
setClipRect 0 0 100 100
drawEllipse 35 35 11 11
- save
+ save
translate 40 40
rotate -50
drawLine -100 0 100 0
diff --git a/tests/auto/other/lancelot/scripts/dashes.qps b/tests/auto/other/lancelot/scripts/dashes.qps
index 649f56cf66..185443a292 100644
--- a/tests/auto/other/lancelot/scripts/dashes.qps
+++ b/tests/auto/other/lancelot/scripts/dashes.qps
@@ -15,7 +15,7 @@ save
setPen black 1 SolidLine RoundCap BevelJoin
drawPolyline [0 0 80 0 80 30 40 20 0 30]
translate 0 40
-
+
setPen black 2 SolidLine FlatCap BevelJoin
drawPolyline [0 0 80 0 80 30 40 20 0 30]
translate 0 40
@@ -25,7 +25,7 @@ save
setPen black 2 SolidLine RoundCap BevelJoin
drawPolyline [0 0 80 0 80 30 40 20 0 30]
translate 0 40
-
+
setPen black 6 SolidLine FlatCap BevelJoin
drawPolyline [0 0 80 0 80 30 40 20 0 30]
translate 0 40
@@ -36,8 +36,8 @@ save
drawPolyline [0 0 80 0 80 30 40 20 0 30]
translate 0 40
restore
-
-
+
+
translate 100 0
save
setPen black 1 DotLine FlatCap BevelJoin
@@ -49,7 +49,7 @@ save
setPen black 1 DotLine RoundCap BevelJoin
drawPolyline [0 0 80 0 80 30 40 20 0 30]
translate 0 40
-
+
setPen black 2 DotLine FlatCap BevelJoin
drawPolyline [0 0 80 0 80 30 40 20 0 30]
translate 0 40
@@ -59,7 +59,7 @@ save
setPen black 2 DotLine RoundCap BevelJoin
drawPolyline [0 0 80 0 80 30 40 20 0 30]
translate 0 40
-
+
setPen black 6 DotLine FlatCap BevelJoin
drawPolyline [0 0 80 0 80 30 40 20 0 30]
translate 0 40
@@ -70,7 +70,7 @@ save
drawPolyline [0 0 80 0 80 30 40 20 0 30]
translate 0 40
restore
-
+
translate 100 0
save
setPen black 1 DashLine FlatCap BevelJoin
@@ -82,7 +82,7 @@ save
setPen black 1 DashLine RoundCap BevelJoin
drawPolyline [0 0 80 0 80 30 40 20 0 30]
translate 0 40
-
+
setPen black 2 DashLine FlatCap BevelJoin
drawPolyline [0 0 80 0 80 30 40 20 0 30]
translate 0 40
@@ -92,7 +92,7 @@ save
setPen black 2 DashLine RoundCap BevelJoin
drawPolyline [0 0 80 0 80 30 40 20 0 30]
translate 0 40
-
+
setPen black 6 DashLine FlatCap BevelJoin
drawPolyline [0 0 80 0 80 30 40 20 0 30]
translate 0 40
@@ -103,9 +103,9 @@ save
drawPolyline [0 0 80 0 80 30 40 20 0 30]
translate 0 40
restore
-
+
translate 100 0
-
+
save
setPen black 1 DashDotLine FlatCap BevelJoin
drawPolyline [0 0 80 0 80 30 40 20 0 30]
@@ -116,7 +116,7 @@ save
setPen black 1 DashDotLine RoundCap BevelJoin
drawPolyline [0 0 80 0 80 30 40 20 0 30]
translate 0 40
-
+
setPen black 2 DashDotLine FlatCap BevelJoin
drawPolyline [0 0 80 0 80 30 40 20 0 30]
translate 0 40
@@ -126,7 +126,7 @@ save
setPen black 2 DashDotLine RoundCap BevelJoin
drawPolyline [0 0 80 0 80 30 40 20 0 30]
translate 0 40
-
+
setPen black 6 DashDotLine FlatCap BevelJoin
drawPolyline [0 0 80 0 80 30 40 20 0 30]
translate 0 40
@@ -137,7 +137,7 @@ save
drawPolyline [0 0 80 0 80 30 40 20 0 30]
translate 0 40
restore
-
+
translate 100 0
save
@@ -150,7 +150,7 @@ save
setPen black 1 DashDotDotLine RoundCap BevelJoin
drawPolyline [0 0 80 0 80 30 40 20 0 30]
translate 0 40
-
+
setPen black 2 DashDotDotLine FlatCap BevelJoin
drawPolyline [0 0 80 0 80 30 40 20 0 30]
translate 0 40
@@ -160,7 +160,7 @@ save
setPen black 2 DashDotDotLine RoundCap BevelJoin
drawPolyline [0 0 80 0 80 30 40 20 0 30]
translate 0 40
-
+
setPen black 4 DashDotDotLine FlatCap BevelJoin
drawPolyline [0 0 80 0 80 30 40 20 0 30]
translate 0 40
@@ -187,7 +187,7 @@ save
pen_setDashPattern [1 4 9 4 27 4]
drawPolyline [0 0 80 0 80 30 40 20 0 30]
translate 0 40
-
+
setPen black 2 SolidLine FlatCap BevelJoin
pen_setDashPattern [1 4 9 4 27 4]
drawPolyline [0 0 80 0 80 30 40 20 0 30]
@@ -200,7 +200,7 @@ save
pen_setDashPattern [1 4 9 4 27 4]
drawPolyline [0 0 80 0 80 30 40 20 0 30]
translate 0 40
-
+
setPen black 4 SolidLine FlatCap BevelJoin
pen_setDashPattern [1 4 9 4 27 4]
drawPolyline [0 0 80 0 80 30 40 20 0 30]
@@ -217,7 +217,7 @@ save
restore
end_block
-
+
translate 0 400
setRenderHint Antialiasing
repeat_block draw
diff --git a/tests/auto/other/lancelot/scripts/deviceclipping.qps b/tests/auto/other/lancelot/scripts/deviceclipping.qps
index cedfc1e363..8608a50994 100644
--- a/tests/auto/other/lancelot/scripts/deviceclipping.qps
+++ b/tests/auto/other/lancelot/scripts/deviceclipping.qps
@@ -22,7 +22,7 @@ begin_block drawing
drawRect 300 -500000 1000000 1000000
drawPath path
-
+
end_block
save
diff --git a/tests/auto/other/lancelot/scripts/pixmap_scaling.qps b/tests/auto/other/lancelot/scripts/pixmap_scaling.qps
index 651896f4a3..8a5ab2c60e 100644
--- a/tests/auto/other/lancelot/scripts/pixmap_scaling.qps
+++ b/tests/auto/other/lancelot/scripts/pixmap_scaling.qps
@@ -8,8 +8,8 @@
translate 5 25
setFont "arial" 8
-save
- drawText 15 0 "opaque image"
+save
+ drawText 15 0 "opaque image"
translate 50 50
save
translate 1 1
@@ -21,23 +21,23 @@ save
scale -20 20
drawImage solid2x2.png 0 0
restore
- save
+ save
translate 1 -1
scale 20 -20
drawImage solid2x2.png 0 0
restore
- save
+ save
translate -1 -1
scale -20 -20
drawImage solid2x2.png 0 0
restore
-
-restore
+
+restore
save
translate 150 0
- drawText 15 0 "alpha image"
+ drawText 15 0 "alpha image"
translate 50 50
save
translate 1 1
@@ -49,12 +49,12 @@ save
scale -20 20
drawImage alpha2x2.png 0 0
restore
- save
+ save
translate 1 -1
scale 20 -20
drawImage alpha2x2.png 0 0
restore
- save
+ save
translate -1 -1
scale -20 -20
drawImage alpha2x2.png 0 0
@@ -64,7 +64,7 @@ restore
save
translate 0 150
- drawText 15 0 "solid pixmap"
+ drawText 15 0 "solid pixmap"
translate 50 50
save
translate 1 1
@@ -76,12 +76,12 @@ save
scale -20 20
drawPixmap solid2x2.png 0 0
restore
- save
+ save
translate 1 -1
scale 20 -20
drawPixmap solid2x2.png 0 0
restore
- save
+ save
translate -1 -1
scale -20 -20
drawPixmap solid2x2.png 0 0
@@ -90,9 +90,9 @@ restore
save
- translate 150 150
+ translate 150 150
drawText 15 0 "alpha pixmap"
- translate 50 50
+ translate 50 50
save
translate 1 1
scale 20 20
@@ -103,12 +103,12 @@ save
scale -20 20
drawPixmap alpha2x2.png 0 0
restore
- save
+ save
translate 1 -1
scale 20 -20
drawPixmap alpha2x2.png 0 0
restore
- save
+ save
translate -1 -1
scale -20 -20
drawPixmap alpha2x2.png 0 0
@@ -116,7 +116,7 @@ save
restore
-save
+save
translate 300 10
save
drawText 0 -10 "subrect solid image"
@@ -143,7 +143,7 @@ save
drawImage solid2x2.png 45 0 5 50 1.8 0 0.2 2
restore
- save
+ save
translate 150 0
drawText 0 -10 "subrect solid image"
drawImage alpha2x2.png 0 0 50 5 0 0.0 2 0.2
@@ -156,7 +156,7 @@ save
drawImage alpha2x2.png 0 35 50 5 0 1.4 2 0.2
drawImage alpha2x2.png 0 40 50 5 0 1.6 2 0.2
drawImage alpha2x2.png 0 45 50 5 0 1.8 2 0.2
- translate 60 0
+ translate 60 0
drawImage alpha2x2.png 0 0 5 50 0.0 0 0.2 2
drawImage alpha2x2.png 5 0 5 50 0.2 0 0.2 2
drawImage alpha2x2.png 10 0 5 50 0.4 0 0.2 2
diff --git a/tests/auto/other/lancelot/scripts/pixmap_subpixel.qps b/tests/auto/other/lancelot/scripts/pixmap_subpixel.qps
index 908f7c3465..d5b7b92fc9 100644
--- a/tests/auto/other/lancelot/scripts/pixmap_subpixel.qps
+++ b/tests/auto/other/lancelot/scripts/pixmap_subpixel.qps
@@ -6,7 +6,7 @@ translate 50 50
# Pixmaps at 0.1 offset, unclipped
begin_block draw_pixmaps
-save
+save
drawPixmap border.png 0 0
translate 20.1 0.1
drawPixmap border.png 0 0
@@ -27,7 +27,7 @@ save
translate 20.1 0.1
drawPixmap border.png 0 0
translate 20.1 0.1
-
+
drawPixmap border.png 0 0
translate 20.1 0.1
drawPixmap border.png 0 0
@@ -49,12 +49,12 @@ save
drawPixmap border.png 0 0
translate 20.1 0.1
restore
-end_block
+end_block
# Tiled pixmaps at 0.1 offsets, unclipped
translate 0 50
begin_block draw_tiled
-save
+save
drawTiledPixmap border.png 0 0 16 16 0 0
translate 20.1 0.1
drawTiledPixmap border.png 0 0 16 16 0 0
@@ -75,7 +75,7 @@ save
translate 20.1 0.1
drawTiledPixmap border.png 0 0 16 16 0 0
translate 20.1 0.1
-
+
drawTiledPixmap border.png 0 0 16 16 0 0
translate 20.1 0.1
drawTiledPixmap border.png 0 0 16 16 0 0
@@ -97,7 +97,7 @@ save
drawTiledPixmap border.png 0 0 16 16 0 0
translate 20.1 0.1
restore
-end_block
+end_block
path_moveTo clip 0 0
diff --git a/tests/auto/other/lancelot/scripts/pixmaps.qps b/tests/auto/other/lancelot/scripts/pixmaps.qps
index 8e60997acc..0b4ba2c4fb 100644
--- a/tests/auto/other/lancelot/scripts/pixmaps.qps
+++ b/tests/auto/other/lancelot/scripts/pixmaps.qps
@@ -15,13 +15,13 @@ save
drawPixmap the_pixmap 0 0
# sub recting
- translate 120 0
+ translate 120 0
drawPixmap the_pixmap 0 0 40 40 0 0 40 40
drawPixmap the_pixmap 60 0 40 40 60 0 40 40
drawPixmap the_pixmap 0 60 40 40 0 60 40 40
drawPixmap the_pixmap 60 60 40 40 60 60 40 40
drawPixmap the_pixmap 0 40 40 20 0 40 40 20
- drawPixmap the_pixmap 60 40 40 20 60 40 40 20
+ drawPixmap the_pixmap 60 40 40 20 60 40 40 20
drawPixmap the_pixmap 40 0 20 100 40 0 20 100
# subrecting w/scale
@@ -30,15 +30,15 @@ save
drawPixmap the_pixmap 50 0 50 50 25 0 25 25
drawPixmap the_pixmap 0 50 50 50 0 25 25 25
drawPixmap the_pixmap 50 50 50 50 25 25 25 25
-
+
# subrecting w/scale & smooth xform
translate 120 0
- setRenderHint SmoothPixmapTransformation
+ setRenderHint SmoothPixmapTransformation
drawPixmap the_pixmap 0 0 50 50 0 0 25 25
drawPixmap the_pixmap 50 0 50 50 25 0 25 25
drawPixmap the_pixmap 0 50 50 50 0 25 25 25
drawPixmap the_pixmap 50 50 50 50 25 25 25 25
-
+
# Rotation w/o smooth xform
translate 120 0
diff --git a/tests/auto/other/lancelot/scripts/rasterops.qps b/tests/auto/other/lancelot/scripts/rasterops.qps
index 21f943b543..d0f2da42df 100644
--- a/tests/auto/other/lancelot/scripts/rasterops.qps
+++ b/tests/auto/other/lancelot/scripts/rasterops.qps
@@ -13,9 +13,9 @@ begin_block drawShape
setBrush 0xffff0000
drawEllipse 5 5 30 30
setBrush 0xff00ff00
- drawRect 0 0 20 20
+ drawRect 0 0 20 20
setBrush 0xff0000ff
- drawRect 20 20 20 20
+ drawRect 20 20 20 20
end_block
begin_block loop
diff --git a/tests/auto/other/lancelot/scripts/sizes.qps b/tests/auto/other/lancelot/scripts/sizes.qps
index 68e01c3262..12b0f4af1e 100644
--- a/tests/auto/other/lancelot/scripts/sizes.qps
+++ b/tests/auto/other/lancelot/scripts/sizes.qps
@@ -4,7 +4,7 @@
setPen NoPen
setBrush black
-translate 10 10
+translate 10 10
begin_block testblock
drawRect 0 0 10 10
@@ -75,9 +75,9 @@ drawChord 180 100 19 19 0 4320
end_block
-setPen red
+setPen red
translate 0 150
-repeat_block testblock
+repeat_block testblock
setRenderHint LineAntialiasing
diff --git a/tests/auto/other/lancelot/scripts/text.qps b/tests/auto/other/lancelot/scripts/text.qps
index 88c8690ca0..e7d47448ea 100644
--- a/tests/auto/other/lancelot/scripts/text.qps
+++ b/tests/auto/other/lancelot/scripts/text.qps
@@ -7,47 +7,47 @@ begin_block text_drawing
save
setFont "sansserif" 10 normal
drawText 0 20 "sansserif 10pt, normal"
-
+
setFont "sansserif" 12 normal
drawText 0 40 "sansserif 12pt, normal"
-
+
setFont "sansserif" 10 bold
drawText 0 60 "sansserif 12pt, bold"
-
+
setFont "sansserif" 10 bold italic
drawText 0 80 "sansserif 10pt, bold italic"
-
-
+
+
translate 0 100
setPen #7fff0000
-
+
setFont "sansserif" 10 normal
drawText 0 20 "alpha sansserif 10pt, normal"
-
+
setFont "sansserif" 12 normal
drawText 0 40 "alpha sansserif 12pt, normal"
-
+
setFont "sansserif" 10 bold
drawText 0 60 "alpha sansserif 12pt, bold"
-
+
setFont "sansserif" 10 bold italic
drawText 0 80 "alpha sansserif 10pt, bold italic"
-
-
+
+
translate 0 100
setPen black
save
scale 0.9 0.9
-
+
setFont "sansserif" 10 normal
drawText 0 20 "scaled sansserif 10pt, normal"
-
+
setFont "sansserif" 12 normal
drawText 0 40 "scaled sansserif 12pt, normal"
-
+
setFont "sansserif" 10 bold
drawText 0 60 "scaled sansserif 12pt, bold"
-
+
setFont "sansserif" 10 bold italic
drawText 0 80 "scaled sansserif 10pt, bold italic"
restore
@@ -75,36 +75,36 @@ save
save
translate 200 90
rotate 185
-
+
setFont "sansserif" 10 normal
drawText 0 20 "scaled sansserif 10pt, normal"
-
+
setFont "sansserif" 12 normal
drawText 0 40 "scaled sansserif 12pt, normal"
-
+
setFont "sansserif" 10 bold
drawText 0 60 "scaled sansserif 12pt, bold"
-
+
setFont "sansserif" 10 bold italic
drawText 0 80 "scaled sansserif 10pt, bold italic"
restore
-
+
translate 0 100
gradient_appendStop 0 red
gradient_appendStop 0.5 #00ff00
gradient_appendStop 1 blue
gradient_setLinear 0 0 200 0
setPen brush
-
+
setFont "sansserif" 10 normal
drawText 0 0 "gradient sansserif 10pt, normal"
-
+
setFont "sansserif" 12 normal
drawText 0 20 "gradient sansserif 12pt, normal"
-
+
setFont "sansserif" 10 bold
drawText 0 40 "gradient sansserif 12pt, bold"
-
+
setFont "sansserif" 10 bold italic
drawText 0 60 "gradient sansserif 10pt, bold italic"
restore
@@ -123,7 +123,7 @@ restore
translate 150 0
drawText 25 640 "clipped to path"
-save
+save
path_moveTo clip 20 0
path_cubicTo clip 0 200 40 400 20 400
path_lineTo clip 30 620
diff --git a/tests/auto/other/lancelot/scripts/tiled_pixmap.qps b/tests/auto/other/lancelot/scripts/tiled_pixmap.qps
index 9cb5e0dd1f..0ce3a7834c 100644
--- a/tests/auto/other/lancelot/scripts/tiled_pixmap.qps
+++ b/tests/auto/other/lancelot/scripts/tiled_pixmap.qps
@@ -5,7 +5,7 @@
translate 0 10
setRenderHint Antialiasing
-pixmap_load dome_argb32 the_pixmap
+pixmap_load dome_argb32 the_pixmap
begin_block draw_stuff
save
@@ -25,7 +25,7 @@ save
setRenderHint SmoothPixmapTransform false
drawTiledPixmap the_pixmap 0 0 150 100 25 25
restore
-
+
# xformed with smooth xform
translate 160 0
save
@@ -38,17 +38,17 @@ restore
end_block
translate 0 120
-pixmap_load dome_rgb32 the_pixmap
+pixmap_load dome_rgb32 the_pixmap
repeat_block draw_stuff
translate 0 120
-pixmap_load dome_indexed the_pixmap
+pixmap_load dome_indexed the_pixmap
repeat_block draw_stuff
translate 0 120
-pixmap_load dome_indexed_mask the_pixmap
+pixmap_load dome_indexed_mask the_pixmap
repeat_block draw_stuff
diff --git a/tests/auto/other/macgui/guitest.cpp b/tests/auto/other/macgui/guitest.cpp
index d4af5c1386..93e9db9a61 100644
--- a/tests/auto/other/macgui/guitest.cpp
+++ b/tests/auto/other/macgui/guitest.cpp
@@ -118,10 +118,10 @@ QAccessibleInterface *WidgetNavigator::recursiveSearch(TestBase *test, QAccessib
while (todoInterfaces.isEmpty() == false) {
QAccessibleInterface *testInterface = todoInterfaces.pop();
-
+
if ((*test)(testInterface))
return testInterface;
-
+
const int numChildren = testInterface->childCount();
for (int i = 0; i < numChildren; ++i) {
QAccessibleInterface *childInterface = testInterface->child(i);
@@ -160,17 +160,17 @@ namespace NativeEvents {
CGPoint position;
position.x = globalPos.x();
position.y = globalPos.y();
-
+
const bool updateMousePosition = (updateMouse == UpdatePosition);
-
+
// Mouse down.
- CGPostMouseEvent(position, updateMousePosition, 3,
- (buttons & Qt::LeftButton) ? true : false,
- (buttons & Qt::MidButton/* Middlebutton! */) ? true : false,
+ CGPostMouseEvent(position, updateMousePosition, 3,
+ (buttons & Qt::LeftButton) ? true : false,
+ (buttons & Qt::MidButton/* Middlebutton! */) ? true : false,
(buttons & Qt::RightButton) ? true : false);
// Mouse up.
- CGPostMouseEvent(position, updateMousePosition, 3, false, false, false);
+ CGPostMouseEvent(position, updateMousePosition, 3, false, false, false);
}
#else
# error Oops, NativeEvents::mouseClick() is not implemented on this platform.
@@ -200,7 +200,7 @@ bool checkPixel(QColor pixel, QColor expected)
}
/*
- Tests that the pixels inside rect in image all have the given color.
+ Tests that the pixels inside rect in image all have the given color.
*/
bool GuiTester::isFilled(const QImage image, const QRect &rect, const QColor &color)
{
@@ -218,7 +218,7 @@ bool GuiTester::isFilled(const QImage image, const QRect &rect, const QColor &co
/*
Tests that stuff is painted to the pixels inside rect.
- This test fails if any lines in the given direction have pixels
+ This test fails if any lines in the given direction have pixels
of only one color.
*/
bool GuiTester::isContent(const QImage image, const QRect &rect, Directions directions)
@@ -239,7 +239,7 @@ bool GuiTester::isContent(const QImage image, const QRect &rect, Directions dire
}
}
return true;
- }
+ }
if (directions & Vertical) {
for (int x = rect.left(); x <= rect.right(); ++x) {
diff --git a/tests/auto/other/macgui/guitest.h b/tests/auto/other/macgui/guitest.h
index 1b5f933769..2d02cce720 100644
--- a/tests/auto/other/macgui/guitest.h
+++ b/tests/auto/other/macgui/guitest.h
@@ -70,12 +70,12 @@ public:
void printAll(QWidget *widget);
void printAll(QAccessibleInterface *interface);
-
+
QAccessibleInterface *find(QAccessible::Text textType, const QString &text, QWidget *start);
QAccessibleInterface *find(QAccessible::Text textType, const QString &text, QAccessibleInterface *start);
QAccessibleInterface *recursiveSearch(TestBase *test, QAccessibleInterface *iface);
-
+
void deleteInDestructor(QAccessibleInterface * interface);
static QWidget *getWidget(QAccessibleInterface *interface);
private:
@@ -99,7 +99,7 @@ class ColorWidget : public QWidget
public:
ColorWidget(QWidget *parent = 0, QColor color = QColor(Qt::red))
: QWidget(parent), color(color) {}
-
+
QColor color;
protected:
@@ -139,7 +139,7 @@ private:
};
/*
-
+
*/
class GuiTester : public QObject
{
diff --git a/tests/auto/other/macgui/tst_macgui.cpp b/tests/auto/other/macgui/tst_macgui.cpp
index cfe27095a8..e796b44843 100644
--- a/tests/auto/other/macgui/tst_macgui.cpp
+++ b/tests/auto/other/macgui/tst_macgui.cpp
@@ -41,7 +41,7 @@
#include <QApplication>
-#include <QMessageBox>
+#include <QMessageBox>
#include <QtTest/QtTest>
#include <QSplashScreen>
#include <QScrollBar>
@@ -55,7 +55,7 @@ class tst_MacGui : public GuiTester
Q_OBJECT
private slots:
void scrollbarPainting();
-
+
void dummy();
void splashScreenModality();
void nonModalOrder();
@@ -216,7 +216,7 @@ void tst_MacGui::spinBoxArrowButtons()
spinBox2.move(0, 100);
colorWidget.show();
QTest::qWait(100);
-
+
// Grab an unfocused spin box.
const QImage noFocus = grabWindowContents(&colorWidget).toImage();
diff --git a/tests/auto/other/macnativeevents/tst_macnativeevents.cpp b/tests/auto/other/macnativeevents/tst_macnativeevents.cpp
index 3072d163c3..ae59672c72 100644
--- a/tests/auto/other/macnativeevents/tst_macnativeevents.cpp
+++ b/tests/auto/other/macnativeevents/tst_macnativeevents.cpp
@@ -293,7 +293,7 @@ void tst_MacNativeEvents::testMouseEnter()
void tst_MacNativeEvents::testChildDialogInFrontOfModalParent()
{
- // Test that a child dialog of a modal parent dialog is
+ // Test that a child dialog of a modal parent dialog is
// in front of the parent, and active:
QDialog parent;
parent.setWindowModality(Qt::ApplicationModal);
diff --git a/tests/auto/other/qnetworkaccessmanager_and_qprogressdialog/tst_qnetworkaccessmanager_and_qprogressdialog.cpp b/tests/auto/other/qnetworkaccessmanager_and_qprogressdialog/tst_qnetworkaccessmanager_and_qprogressdialog.cpp
index c6cc50d97f..756a899b1b 100644
--- a/tests/auto/other/qnetworkaccessmanager_and_qprogressdialog/tst_qnetworkaccessmanager_and_qprogressdialog.cpp
+++ b/tests/auto/other/qnetworkaccessmanager_and_qprogressdialog/tst_qnetworkaccessmanager_and_qprogressdialog.cpp
@@ -82,7 +82,7 @@ public slots:
QNetworkRequest request(QUrl("http://" + QtNetworkSettings::serverName() + "/qtest/bigfile"));
if (zeroCopy)
request.setAttribute(QNetworkRequest::MaximumDownloadBufferSizeAttribute, 10*1024*1024);
-
+
QNetworkReply *reply = netmanager.get(
QNetworkRequest(
QUrl("http://" + QtNetworkSettings::serverName() + "/qtest/bigfile")
diff --git a/tests/auto/other/windowsmobile/test/tst_windowsmobile.cpp b/tests/auto/other/windowsmobile/test/tst_windowsmobile.cpp
index 5bcaaf5543..68db218164 100644
--- a/tests/auto/other/windowsmobile/test/tst_windowsmobile.cpp
+++ b/tests/auto/other/windowsmobile/test/tst_windowsmobile.cpp
@@ -133,7 +133,7 @@ void compareScreenshots(const QString &image1, const QString &image2)
QPainter p1(&screenShot);
QPainter p2(&original);
- //screenShot.save("scr1.png", "PNG");
+ //screenShot.save("scr1.png", "PNG");
p1.fillRect(0, 0, desktopFrameRect.width(), desktopClientRect.y(), Qt::black);
p2.fillRect(0, 0, desktopFrameRect.width(), desktopClientRect.y(), Qt::black);
diff --git a/tests/auto/other/windowsmobile/testQMenuBar/main.cpp b/tests/auto/other/windowsmobile/testQMenuBar/main.cpp
index 64f87dc080..a96966a451 100644
--- a/tests/auto/other/windowsmobile/testQMenuBar/main.cpp
+++ b/tests/auto/other/windowsmobile/testQMenuBar/main.cpp
@@ -89,7 +89,7 @@ int main(int argc, char * argv[])
optionsMenu->addMenu("Settings");
optionsMenu->addMenu("Standard");
optionsMenu->addMenu("Extended");
-
+
QMenu *subMenu = helpMenu->addMenu("Help");
subMenu->addAction("Index");
subMenu->addSeparator();
diff --git a/tests/auto/sql/kernel/qsql/tst_qsql.cpp b/tests/auto/sql/kernel/qsql/tst_qsql.cpp
index bb00f52969..bc6b36931a 100644
--- a/tests/auto/sql/kernel/qsql/tst_qsql.cpp
+++ b/tests/auto/sql/kernel/qsql/tst_qsql.cpp
@@ -56,7 +56,7 @@
class tst_QSql : public QObject
{
-Q_OBJECT
+ Q_OBJECT
public:
tst_QSql();
@@ -105,7 +105,6 @@ void tst_QSql::cleanup()
{
}
-
// this is a very basic test for drivers that cannot create/delete tables
// it can be used while developing new drivers,
// it's original purpose is to test ODBC Text datasources that are basically
@@ -120,35 +119,34 @@ void tst_QSql::basicDriverTest()
tst_Databases dbs;
dbs.open();
- foreach( const QString& dbName, dbs.dbNames )
- {
- QSqlDatabase db = QSqlDatabase::database( dbName );
- QVERIFY_SQL( db, isValid() );
+ foreach (const QString& dbName, dbs.dbNames) {
+ QSqlDatabase db = QSqlDatabase::database(dbName);
+ QVERIFY_SQL(db, isValid());
QStringList tables = db.tables();
QString tableName;
- if ( tables.contains( "qtest_basictest.txt" ) )
+ if (tables.contains("qtest_basictest.txt"))
tableName = "qtest_basictest.txt";
- else if ( tables.contains( "qtest_basictest" ) )
+ else if (tables.contains("qtest_basictest"))
tableName = "qtest_basictest";
- else if ( tables.contains( "QTEST_BASICTEST" ) )
+ else if (tables.contains("QTEST_BASICTEST"))
tableName = "QTEST_BASICTEST";
else {
- QVERIFY( 1 );
+ QVERIFY(1);
continue;
}
- qDebug("Testing: %s", qPrintable(tst_Databases::dbToString( db )));
+ qDebug("Testing: %s", qPrintable(tst_Databases::dbToString(db)));
- QSqlRecord rInf = db.record( tableName );
- QCOMPARE( rInf.count(), 2 );
- QCOMPARE( rInf.fieldName( 0 ).toLower(), QString( "id" ) );
- QCOMPARE( rInf.fieldName( 1 ).toLower(), QString( "name" ) );
+ QSqlRecord rInf = db.record(tableName);
+ QCOMPARE(rInf.count(), 2);
+ QCOMPARE(rInf.fieldName(0).toLower(), QString("id"));
+ QCOMPARE(rInf.fieldName(1).toLower(), QString("name"));
}
dbs.close();
- QVERIFY( 1 ); // make sure the test doesn't fail if no database drivers are there
+ QVERIFY(1); // make sure the test doesn't fail if no database drivers are there
}
// make sure that the static stuff will be deleted
@@ -159,18 +157,18 @@ void tst_QSql::open()
int argc = 1;
const char *argv[] = {"test"};
int count = -1;
- for ( i = 0; i < 10; ++i ) {
+ for (i = 0; i < 10; ++i) {
QGuiApplication app(argc, const_cast<char **>(argv), false);
- tst_Databases dbs;
-
- dbs.open();
- if ( count == -1 )
- // first iteration: see how many dbs are open
- count = (int) dbs.dbNames.count();
- else
- // next iterations: make sure all are opened again
- QCOMPARE( count, (int)dbs.dbNames.count() );
- dbs.close();
+ tst_Databases dbs;
+
+ dbs.open();
+ if (count == -1)
+ // first iteration: see how many dbs are open
+ count = (int) dbs.dbNames.count();
+ else
+ // next iterations: make sure all are opened again
+ QCOMPARE(count, (int)dbs.dbNames.count());
+ dbs.close();
}
}
@@ -191,21 +189,21 @@ void tst_QSql::concurrentAccess()
tst_Databases dbs;
dbs.open();
- foreach ( const QString& dbName, dbs.dbNames ) {
- QSqlDatabase db = QSqlDatabase::database( dbName );
- QVERIFY( db.isValid() );
+ foreach (const QString& dbName, dbs.dbNames) {
+ QSqlDatabase db = QSqlDatabase::database(dbName);
+ QVERIFY(db.isValid());
if (tst_Databases::isMSAccess(db))
continue;
- QSqlDatabase ndb = QSqlDatabase::addDatabase( db.driverName(), "tst_QSql::concurrentAccess" );
- ndb.setDatabaseName( db.databaseName() );
- ndb.setHostName( db.hostName() );
- ndb.setPort( db.port() );
- ndb.setUserName( db.userName() );
- ndb.setPassword( db.password() );
- QVERIFY_SQL( ndb, open() );
+ QSqlDatabase ndb = QSqlDatabase::addDatabase(db.driverName(), "tst_QSql::concurrentAccess");
+ ndb.setDatabaseName(db.databaseName());
+ ndb.setHostName(db.hostName());
+ ndb.setPort(db.port());
+ ndb.setUserName(db.userName());
+ ndb.setPassword(db.password());
+ QVERIFY_SQL(ndb, open());
- QCOMPARE( db.tables(), ndb.tables() );
+ QCOMPARE(db.tables(), ndb.tables());
}
// no database servers installed - don't fail
QVERIFY(1);
@@ -222,41 +220,41 @@ void tst_QSql::openErrorRecovery()
dbs.addDbs();
if (dbs.dbNames.isEmpty())
QSKIP("No database drivers installed");
- foreach ( const QString& dbName, dbs.dbNames ) {
- QSqlDatabase db = QSqlDatabase::database( dbName, false );
- CHECK_DATABASE( db );
+ foreach (const QString& dbName, dbs.dbNames) {
+ QSqlDatabase db = QSqlDatabase::database(dbName, false);
+ CHECK_DATABASE(db);
- QString userName = db.userName();
- QString password = db.password();
+ QString userName = db.userName();
+ QString password = db.password();
- // force an open error
- if ( db.open( "dummy130977", "doesnt_exist" ) ) {
+ // force an open error
+ if (db.open("dummy130977", "doesnt_exist")) {
qDebug("Promiscuous database server without access control - test skipped for %s",
- qPrintable(tst_Databases::dbToString( db )) );
- QVERIFY(1);
- continue;
- }
-
- QFAIL_SQL( db, isOpen() );
- QVERIFY_SQL( db, isOpenError() );
-
- // now open it
- if ( !db.open( userName, password ) ) {
- qDebug() << "Could not open Database " << tst_Databases::dbToString( db ) <<
- ". Assuming DB is down, skipping... (Error: " <<
- tst_Databases::printError( db.lastError() ) << ")";
- continue;
- }
- QVERIFY_SQL( db, open( userName, password ) );
- QVERIFY_SQL( db, isOpen() );
- QFAIL_SQL( db, isOpenError() );
- db.close();
- QFAIL_SQL( db, isOpen() );
-
- // force another open error
- QFAIL_SQL( db, open( "dummy130977", "doesnt_exist" ) );
- QFAIL_SQL( db, isOpen() );
- QVERIFY_SQL( db, isOpenError() );
+ qPrintable(tst_Databases::dbToString(db)));
+ QVERIFY(1);
+ continue;
+ }
+
+ QFAIL_SQL(db, isOpen());
+ QVERIFY_SQL(db, isOpenError());
+
+ // now open it
+ if (!db.open(userName, password)) {
+ qDebug() << "Could not open Database " << tst_Databases::dbToString(db) <<
+ ". Assuming DB is down, skipping... (Error: " <<
+ tst_Databases::printError(db.lastError()) << ")";
+ continue;
+ }
+ QVERIFY_SQL(db, open(userName, password));
+ QVERIFY_SQL(db, isOpen());
+ QFAIL_SQL(db, isOpenError());
+ db.close();
+ QFAIL_SQL(db, isOpen());
+
+ // force another open error
+ QFAIL_SQL(db, open("dummy130977", "doesnt_exist"));
+ QFAIL_SQL(db, isOpen());
+ QVERIFY_SQL(db, isOpenError());
}
}
@@ -266,13 +264,13 @@ void tst_QSql::registerSqlDriver()
const char *argv[] = {"test"};
QGuiApplication app(argc, const_cast<char **>(argv), false);
- QSqlDatabase::registerSqlDriver( "QSQLTESTDRIVER", new QSqlDriverCreator<QSqlNullDriver> );
- QVERIFY( QSqlDatabase::drivers().contains( "QSQLTESTDRIVER" ) );
+ QSqlDatabase::registerSqlDriver("QSQLTESTDRIVER", new QSqlDriverCreator<QSqlNullDriver>);
+ QVERIFY(QSqlDatabase::drivers().contains("QSQLTESTDRIVER"));
- QSqlDatabase db = QSqlDatabase::addDatabase( "QSQLTESTDRIVER" );
- QVERIFY( db.isValid() );
+ QSqlDatabase db = QSqlDatabase::addDatabase("QSQLTESTDRIVER");
+ QVERIFY(db.isValid());
- QCOMPARE( db.tables(), QStringList() );
+ QCOMPARE(db.tables(), QStringList());
}
QTEST_APPLESS_MAIN(tst_QSql)
diff --git a/tests/auto/test.pl b/tests/auto/test.pl
index 9340299a8d..72b7e6aa17 100755
--- a/tests/auto/test.pl
+++ b/tests/auto/test.pl
@@ -68,7 +68,7 @@ if(!$SEARCH_PATH)
exit(0);
}
-# We have four options:
+# We have four options:
# 'U': Unix
# 'W': Windows
# 'M': Mac
diff --git a/tests/auto/testlib/selftests/datetime/tst_datetime.cpp b/tests/auto/testlib/selftests/datetime/tst_datetime.cpp
index 25e50df72a..39ba9f5908 100644
--- a/tests/auto/testlib/selftests/datetime/tst_datetime.cpp
+++ b/tests/auto/testlib/selftests/datetime/tst_datetime.cpp
@@ -69,7 +69,7 @@ void tst_DateTime::qurl() const
{
QFETCH(QUrl, operandA);
QFETCH(QUrl, operandB);
-
+
QCOMPARE(operandA, operandB);
}
diff --git a/tests/auto/tools/moc/gadgetwithnoenums.h b/tests/auto/tools/moc/gadgetwithnoenums.h
index 5a9a789471..0da75e8eb1 100644
--- a/tests/auto/tools/moc/gadgetwithnoenums.h
+++ b/tests/auto/tools/moc/gadgetwithnoenums.h
@@ -43,20 +43,24 @@
#include <QObject>
-class GadgetWithNoEnums {
+class GadgetWithNoEnums
+{
Q_GADGET
- public:
- GadgetWithNoEnums() {}
- virtual ~GadgetWithNoEnums() {}
-};
-
-class DerivedGadgetWithEnums : public GadgetWithNoEnums {
- Q_GADGET
- Q_ENUMS( FooEnum )
- public:
- enum FooEnum { FooValue };
- DerivedGadgetWithEnums() {}
- ~DerivedGadgetWithEnums() {}
+
+public:
+ GadgetWithNoEnums() {}
+ virtual ~GadgetWithNoEnums() {}
+};
+
+class DerivedGadgetWithEnums : public GadgetWithNoEnums
+{
+ Q_GADGET
+ Q_ENUMS( FooEnum )
+
+public:
+ enum FooEnum { FooValue };
+ DerivedGadgetWithEnums() {}
+ ~DerivedGadgetWithEnums() {}
};
#endif
diff --git a/tests/auto/tools/moc/task189996.h b/tests/auto/tools/moc/task189996.h
index 975d762fa8..01b210d6eb 100644
--- a/tests/auto/tools/moc/task189996.h
+++ b/tests/auto/tools/moc/task189996.h
@@ -43,10 +43,12 @@
#ifndef TASK189996_H
#define TASK189996_H
-#include <QObject>
-
-class InlineSlotsWithThrowDeclaration : public QObject {
- Q_OBJECT
+#include <QObject>
+
+class InlineSlotsWithThrowDeclaration : public QObject
+{
+ Q_OBJECT
+
public slots:
void a() throw() { }
void b() const throw() { }
diff --git a/tests/auto/tools/moc/template-gtgt.h b/tests/auto/tools/moc/template-gtgt.h
index baa8553103..2c2f56c34d 100644
--- a/tests/auto/tools/moc/template-gtgt.h
+++ b/tests/auto/tools/moc/template-gtgt.h
@@ -39,13 +39,13 @@
**
****************************************************************************/
template<class TYPE, size_t COUNT>
-class myTemplate :
+class myTemplate :
QString,
QVector<TYPE, QList<COUNT>>
{};
template<class TYPE, size_t COUNT>
-class myTemplate2 :
+class myTemplate2 :
QString,
QVector<TYPE, QList< (4 >> 2) >>
{};
diff --git a/tests/auto/widgets/dialogs/qerrormessage/tst_qerrormessage.cpp b/tests/auto/widgets/dialogs/qerrormessage/tst_qerrormessage.cpp
index 9654f3ac5e..e091267889 100644
--- a/tests/auto/widgets/dialogs/qerrormessage/tst_qerrormessage.cpp
+++ b/tests/auto/widgets/dialogs/qerrormessage/tst_qerrormessage.cpp
@@ -61,7 +61,7 @@ void tst_QErrorMessage::dontShowAgain()
QErrorMessage errorMessageDialog(0);
- // show an error with plain string
+ // show an error with plain string
errorMessageDialog.showMessage(plainString);
QVERIFY(errorMessageDialog.isVisible());
checkBox = qFindChild<QCheckBox*>(&errorMessageDialog);
diff --git a/tests/auto/widgets/dialogs/qwizard/tst_qwizard.cpp b/tests/auto/widgets/dialogs/qwizard/tst_qwizard.cpp
index 3922cce5cc..ae5853f3c8 100644
--- a/tests/auto/widgets/dialogs/qwizard/tst_qwizard.cpp
+++ b/tests/auto/widgets/dialogs/qwizard/tst_qwizard.cpp
@@ -611,7 +611,7 @@ void tst_QWizard::addPage()
arguments = spy.takeFirst();
QCOMPARE(arguments.at(0).toInt(), N + 52);
- QTest::ignoreMessage(QtWarningMsg,"QWizard::setPage: Cannot insert null page");
+ QTest::ignoreMessage(QtWarningMsg,"QWizard::setPage: Cannot insert null page");
wizard.addPage(0); // generates a warning
QCOMPARE(spy.count(), 0);
delete parent;
@@ -638,7 +638,7 @@ void tst_QWizard::setPage()
QCOMPARE(wizard.nextId(), -1);
page = new QWizardPage(parent);
- QTest::ignoreMessage(QtWarningMsg,"QWizard::setPage: Cannot insert page with ID -1");
+ QTest::ignoreMessage(QtWarningMsg,"QWizard::setPage: Cannot insert page with ID -1");
wizard.setPage(-1, page); // gives a warning and does nothing
QCOMPARE(spy.count(), 0);
QVERIFY(!wizard.page(-2));
@@ -2453,7 +2453,7 @@ private:
QLayout *layout_ = new QVBoxLayout(this);
layout_->addWidget(treeWidget = new QTreeWidget);
-
+
QSizePolicy policy = sizePolicy();
policy.setVerticalPolicy(verticalPolicy);
treeWidget->setSizePolicy(policy);
diff --git a/tests/auto/widgets/graphicsview/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp b/tests/auto/widgets/graphicsview/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp
index fb55cf3d8f..41e5ed466c 100644
--- a/tests/auto/widgets/graphicsview/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp
@@ -1549,7 +1549,7 @@ void tst_QGraphicsGridLayout::setColumnSpacing()
}
void tst_QGraphicsGridLayout::setGeometry_data()
-{
+{
QTest::addColumn<QRectF>("rect");
QTest::newRow("null") << QRectF();
QTest::newRow("normal") << QRectF(0,0, 50, 50);
diff --git a/tests/auto/widgets/itemviews/qtablewidget/tst_qtablewidget.cpp b/tests/auto/widgets/itemviews/qtablewidget/tst_qtablewidget.cpp
index e64dce1a11..f72467de08 100644
--- a/tests/auto/widgets/itemviews/qtablewidget/tst_qtablewidget.cpp
+++ b/tests/auto/widgets/itemviews/qtablewidget/tst_qtablewidget.cpp
@@ -1444,7 +1444,7 @@ void tst_QTableWidget::task231094()
tw.setCurrentCell(1, 1);
QCOMPARE(tw.currentRow(), 1);
QCOMPARE(tw.currentColumn(), 1);
-
+
//this would provoke a end-less loop
QTest::keyClick(&tw, '1');
diff --git a/tests/auto/widgets/kernel/qapplication/wincmdline/main.cpp b/tests/auto/widgets/kernel/qapplication/wincmdline/main.cpp
index e24c21feab..e935cfd53a 100644
--- a/tests/auto/widgets/kernel/qapplication/wincmdline/main.cpp
+++ b/tests/auto/widgets/kernel/qapplication/wincmdline/main.cpp
@@ -40,14 +40,15 @@
****************************************************************************/
#include <QApplication>
#include <stdio.h>
-int main(int argc, char *argv[])
+
+int main(int argc, char *argv[])
{
- QApplication app(argc, argv);
+ QApplication app(argc, argv);
if (argc > 1)
fprintf(stderr, "%s", argv[1]);
else
fprintf(stderr, "Failed");
fflush(stderr);
- return 0;
+ return 0;
}
diff --git a/tests/auto/widgets/kernel/qformlayout/tst_qformlayout.cpp b/tests/auto/widgets/kernel/qformlayout/tst_qformlayout.cpp
index d77dd003d7..b970de8e87 100644
--- a/tests/auto/widgets/kernel/qformlayout/tst_qformlayout.cpp
+++ b/tests/auto/widgets/kernel/qformlayout/tst_qformlayout.cpp
@@ -169,11 +169,11 @@ void tst_QFormLayout::rowCount()
fl->addRow(tr("Label 2"), new QLineEdit);
fl->addRow(tr("Label 3"), new QLineEdit);
QCOMPARE(fl->rowCount(), 3);
-
+
fl->addRow(new QWidget);
fl->addRow(new QHBoxLayout);
QCOMPARE(fl->rowCount(), 5);
-
+
fl->insertRow(1, tr("Label 0.5"), new QLineEdit);
QCOMPARE(fl->rowCount(), 6);
@@ -206,7 +206,7 @@ void tst_QFormLayout::buddies()
fl->addRow(le3);
QWidget *label3 = fl->labelForField(le3);
QVERIFY(label3 == 0);
-
+
//TODO: empty label?
delete w;
diff --git a/tests/auto/widgets/kernel/qlayout/tst_qlayout.cpp b/tests/auto/widgets/kernel/qlayout/tst_qlayout.cpp
index f830ead6c0..2b9b4fd761 100644
--- a/tests/auto/widgets/kernel/qlayout/tst_qlayout.cpp
+++ b/tests/auto/widgets/kernel/qlayout/tst_qlayout.cpp
@@ -155,7 +155,7 @@ void tst_QLayout::geometry()
void tst_QLayout::smartMaxSize()
{
- QVector<int> expectedWidths;
+ QVector<int> expectedWidths;
QFile f(QFINDTESTDATA("baseline/smartmaxsize"));
@@ -170,9 +170,9 @@ void tst_QLayout::smartMaxSize()
f.close();
int sizeCombinations[] = { 0, 10, 20, QWIDGETSIZE_MAX};
- QSizePolicy::Policy policies[] = { QSizePolicy::Fixed,
- QSizePolicy::Minimum,
- QSizePolicy::Maximum,
+ QSizePolicy::Policy policies[] = { QSizePolicy::Fixed,
+ QSizePolicy::Minimum,
+ QSizePolicy::Maximum,
QSizePolicy::Preferred,
QSizePolicy::Expanding,
QSizePolicy::MinimumExpanding,
@@ -250,7 +250,7 @@ void tst_QLayout::setContentsMargins()
MyLayout layout;
layout.invalidated = false;
int left, top, right, bottom;
-
+
layout.setContentsMargins(52, 53, 54, 55);
QVERIFY(layout.invalidated);
layout.invalidated = false;
@@ -260,7 +260,7 @@ void tst_QLayout::setContentsMargins()
QCOMPARE(top, 53);
QCOMPARE(right, 54);
QCOMPARE(bottom, 55);
-
+
layout.setContentsMargins(52, 53, 54, 55);
QVERIFY(!layout.invalidated);
}
diff --git a/tests/auto/widgets/kernel/qtooltip/tst_qtooltip.cpp b/tests/auto/widgets/kernel/qtooltip/tst_qtooltip.cpp
index f16fe49712..cb403bac20 100644
--- a/tests/auto/widgets/kernel/qtooltip/tst_qtooltip.cpp
+++ b/tests/auto/widgets/kernel/qtooltip/tst_qtooltip.cpp
@@ -128,7 +128,7 @@ void tst_QToolTip::whatsThis()
{
qApp->setStyleSheet( "QWidget { font-size: 72px; }" );
QWhatsThis::showText(QPoint(0,0), "THis is text");
- QTest::qWait(400);
+ QTest::qWait(400);
QWidget *whatsthis = 0;
foreach (QWidget *widget, QApplication::topLevelWidgets()) {
if (widget->inherits("QWhatsThat")) {
diff --git a/tests/auto/widgets/styles/qmacstyle/tst_qmacstyle.cpp b/tests/auto/widgets/styles/qmacstyle/tst_qmacstyle.cpp
index 12e9fe451c..7925820b70 100644
--- a/tests/auto/widgets/styles/qmacstyle/tst_qmacstyle.cpp
+++ b/tests/auto/widgets/styles/qmacstyle/tst_qmacstyle.cpp
@@ -117,7 +117,7 @@ void tst_QMacStyle::sizeHints_data()
void tst_QMacStyle::sizeHints()
{
- QFETCH(Size, size);
+ QFETCH(Size, size);
QDialog w;
setSize(&w, size);
@@ -234,7 +234,7 @@ void tst_QMacStyle::layoutMargins_data()
void tst_QMacStyle::layoutMargins()
{
- QFETCH(Size, size);
+ QFETCH(Size, size);
QWidget w;
setSize(&w, size);
diff --git a/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp b/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp
index a3670cccc2..c733fadbf5 100644
--- a/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp
+++ b/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp
@@ -741,7 +741,7 @@ public:
void tst_QStyle::testDrawingShortcuts()
{
- {
+ {
QWidget w;
setFrameless(&w);
QToolButton *tb = new QToolButton(&w);
@@ -771,7 +771,7 @@ void tst_QStyle::testDrawingShortcuts()
bool showMnemonic = dts->styleHint(QStyle::SH_UnderlineShortcut, &sotb, tb);
QVERIFY(dts->alignment & (showMnemonic ? Qt::TextShowMnemonic : Qt::TextHideMnemonic));
delete dts;
- }
+ }
}
#define SCROLLBAR_SPACING 33
diff --git a/tests/auto/widgets/styles/qstyleoption/tst_qstyleoption.cpp b/tests/auto/widgets/styles/qstyleoption/tst_qstyleoption.cpp
index 1203e12045..8a00198cf1 100644
--- a/tests/auto/widgets/styles/qstyleoption/tst_qstyleoption.cpp
+++ b/tests/auto/widgets/styles/qstyleoption/tst_qstyleoption.cpp
@@ -44,7 +44,7 @@
#include <QStyleOption>
-class tst_QStyleOption: public QObject
+class tst_QStyleOption: public QObject
{
Q_OBJECT
@@ -54,7 +54,7 @@ private slots:
void copyconstructors();
};
-// Just a simple container for QStyleOption-pointer
+// Just a simple container for QStyleOption-pointer
struct StyleOptionPointerBase
{
QStyleOption *pointer;
@@ -80,7 +80,7 @@ void tst_QStyleOption::qstyleoptioncast_data()
{
QTest::addColumn<StyleOptionPointerBase *>("testOption");
QTest::addColumn<bool>("canCastToComplex");
- QTest::addColumn<int>("type");
+ QTest::addColumn<int>("type");
QTest::newRow("optionDefault") << stylePtr(new QStyleOption) << false << int(QStyleOption::SO_Default);
QTest::newRow("optionButton") << stylePtr(new QStyleOptionButton) << false << int(QStyleOption::SO_Button);
diff --git a/tests/auto/widgets/util/qundogroup/tst_qundogroup.cpp b/tests/auto/widgets/util/qundogroup/tst_qundogroup.cpp
index c8a12a9866..ddab98ebc6 100644
--- a/tests/auto/widgets/util/qundogroup/tst_qundogroup.cpp
+++ b/tests/auto/widgets/util/qundogroup/tst_qundogroup.cpp
@@ -599,7 +599,7 @@ void tst_QUndoGroup::addStackAndDie()
{
// Test that QUndoStack doesn't keep a reference to QUndoGroup after the
// group is deleted.
- QUndoStack *stack = new QUndoStack;
+ QUndoStack *stack = new QUndoStack;
QUndoGroup *group = new QUndoGroup;
group->addStack(stack);
delete group;
diff --git a/tests/auto/widgets/util/qundostack/tst_qundostack.cpp b/tests/auto/widgets/util/qundostack/tst_qundostack.cpp
index 9b48dc7798..4556816655 100644
--- a/tests/auto/widgets/util/qundostack/tst_qundostack.cpp
+++ b/tests/auto/widgets/util/qundostack/tst_qundostack.cpp
@@ -290,52 +290,52 @@ static void checkState(QSignalSpy &redoTextChangedSpy,
const bool _undoChanged,
const bool _redoChanged)
{
- QCOMPARE(stack.count(), _count);
- QCOMPARE(stack.isClean(), _clean);
- QCOMPARE(stack.index(), _index);
- QCOMPARE(stack.canUndo(), _canUndo);
- QCOMPARE(stack.undoText(), QString(_undoText));
- QCOMPARE(stack.canRedo(), _canRedo);
- QCOMPARE(stack.redoText(), QString(_redoText));
- if (_indexChanged) {
- QCOMPARE(indexChangedSpy.count(), 1);
- QCOMPARE(indexChangedSpy.at(0).at(0).toInt(), _index);
- indexChangedSpy.clear();
- } else {
- QCOMPARE(indexChangedSpy.count(), 0);
- }
- if (_cleanChanged) {
- QCOMPARE(cleanChangedSpy.count(), 1);
- QCOMPARE(cleanChangedSpy.at(0).at(0).toBool(), _clean);
- cleanChangedSpy.clear();
- } else {
- QCOMPARE(cleanChangedSpy.count(), 0);
- }
- if (_undoChanged) {
- QCOMPARE(canUndoChangedSpy.count(), 1);
- QCOMPARE(canUndoChangedSpy.at(0).at(0).toBool(), _canUndo);
- QCOMPARE(undoAction->isEnabled(), _canUndo);
- QCOMPARE(undoTextChangedSpy.count(), 1);
- QCOMPARE(undoTextChangedSpy.at(0).at(0).toString(), QString(_undoText));
- QCOMPARE(undoAction->text(), glue("foo", _undoText));
- canUndoChangedSpy.clear();
- undoTextChangedSpy.clear();
- } else {
- QCOMPARE(canUndoChangedSpy.count(), 0);
- QCOMPARE(undoTextChangedSpy.count(), 0);
- }
- if (_redoChanged) {
- QCOMPARE(canRedoChangedSpy.count(), 1);
- QCOMPARE(canRedoChangedSpy.at(0).at(0).toBool(), _canRedo);
- QCOMPARE(redoAction->isEnabled(), _canRedo);
- QCOMPARE(redoTextChangedSpy.count(), 1);
- QCOMPARE(redoTextChangedSpy.at(0).at(0).toString(), QString(_redoText));
- QCOMPARE(redoAction->text(), glue("bar", _redoText));
- canRedoChangedSpy.clear();
- redoTextChangedSpy.clear();
- } else {
- QCOMPARE(canRedoChangedSpy.count(), 0);
- QCOMPARE(redoTextChangedSpy.count(), 0);
+ QCOMPARE(stack.count(), _count);
+ QCOMPARE(stack.isClean(), _clean);
+ QCOMPARE(stack.index(), _index);
+ QCOMPARE(stack.canUndo(), _canUndo);
+ QCOMPARE(stack.undoText(), QString(_undoText));
+ QCOMPARE(stack.canRedo(), _canRedo);
+ QCOMPARE(stack.redoText(), QString(_redoText));
+ if (_indexChanged) {
+ QCOMPARE(indexChangedSpy.count(), 1);
+ QCOMPARE(indexChangedSpy.at(0).at(0).toInt(), _index);
+ indexChangedSpy.clear();
+ } else {
+ QCOMPARE(indexChangedSpy.count(), 0);
+ }
+ if (_cleanChanged) {
+ QCOMPARE(cleanChangedSpy.count(), 1);
+ QCOMPARE(cleanChangedSpy.at(0).at(0).toBool(), _clean);
+ cleanChangedSpy.clear();
+ } else {
+ QCOMPARE(cleanChangedSpy.count(), 0);
+ }
+ if (_undoChanged) {
+ QCOMPARE(canUndoChangedSpy.count(), 1);
+ QCOMPARE(canUndoChangedSpy.at(0).at(0).toBool(), _canUndo);
+ QCOMPARE(undoAction->isEnabled(), _canUndo);
+ QCOMPARE(undoTextChangedSpy.count(), 1);
+ QCOMPARE(undoTextChangedSpy.at(0).at(0).toString(), QString(_undoText));
+ QCOMPARE(undoAction->text(), glue("foo", _undoText));
+ canUndoChangedSpy.clear();
+ undoTextChangedSpy.clear();
+ } else {
+ QCOMPARE(canUndoChangedSpy.count(), 0);
+ QCOMPARE(undoTextChangedSpy.count(), 0);
+ }
+ if (_redoChanged) {
+ QCOMPARE(canRedoChangedSpy.count(), 1);
+ QCOMPARE(canRedoChangedSpy.at(0).at(0).toBool(), _canRedo);
+ QCOMPARE(redoAction->isEnabled(), _canRedo);
+ QCOMPARE(redoTextChangedSpy.count(), 1);
+ QCOMPARE(redoTextChangedSpy.at(0).at(0).toString(), QString(_redoText));
+ QCOMPARE(redoAction->text(), glue("bar", _redoText));
+ canRedoChangedSpy.clear();
+ redoTextChangedSpy.clear();
+ } else {
+ QCOMPARE(canRedoChangedSpy.count(), 0);
+ QCOMPARE(redoTextChangedSpy.count(), 0);
}
}
diff --git a/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp b/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp
index e7d62f8c0c..53c3eb1ed0 100644
--- a/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp
+++ b/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp
@@ -3427,11 +3427,11 @@ void tst_QDateTimeEdit::deleteCalendarWidget()
edit.setCalendarPopup(true);
QVERIFY(edit.calendarWidget());
edit.calendarWidget()->setObjectName("cw1");;
-
+
// delete
cw = edit.calendarWidget();
delete cw;
-
+
// it should create a new widget
QVERIFY(edit.calendarWidget());
QVERIFY(edit.calendarWidget()->objectName() != "cw1");
diff --git a/tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp b/tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp
index 6e3432b575..896d4e8e6f 100644
--- a/tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp
+++ b/tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp
@@ -59,7 +59,7 @@
#include "../../../qtest-config.h"
-static uchar restoreData41[] = { 0x0, 0x0, 0x0, 0xff, 0x0, 0x0, 0x0, 0x0, 0xfc, 0x0, 0x0, 0x0, 0x0, 0xfd, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x64, 0x0, 0x0, 0x1, 0x19, 0xfc, 0x2, 0x0, 0x0, 0x0, 0x4, 0xfb, 0x0, 0x0, 0x0, 0xc, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x30, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x45, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x0, 0xc, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x34, 0x1, 0x0, 0x0, 0x0, 0x49, 0x0, 0x0, 0x0, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x0, 0xc, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x38, 0x1, 0x0, 0x0, 0x0, 0x8d, 0x0, 0x0, 0x0, 0x43, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x0, 0xe, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x31, 0x0, 0x32, 0x1, 0x0, 0x0, 0x0, 0xd4, 0x0, 0x0, 0x0, 0x45, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x64, 0x0, 0x0, 0x1, 0x19, 0xfc, 0x2, 0x0, 0x0, 0x0, 0x4, 0xfb, 0x0, 0x0, 0x0, 0xc, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x31, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x45, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x0, 0xc, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x35, 0x1, 0x0, 0x0, 0x0, 0x49, 0x0, 0x0, 0x0, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x0, 0xc, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x39, 0x1, 0x0, 0x0, 0x0, 0x8d, 0x0, 0x0, 0x0, 0x43, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x0, 0xe, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x31, 0x0, 0x33, 0x1, 0x0, 0x0, 0x0, 0xd4, 0x0, 0x0, 0x0, 0x45, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 0x1, 0x89, 0x0, 0x0, 0x0, 0xe, 0xfc, 0x1, 0x0, 0x0, 0x0, 0x4, 0xfb, 0x0, 0x0, 0x0, 0xc, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x32, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x5f, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x0, 0xc, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x36, 0x1, 0x0, 0x0, 0x0, 0x63, 0x0, 0x0, 0x0, 0x61, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x0, 0xe, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x31, 0x0, 0x30, 0x1, 0x0, 0x0, 0x0, 0xc8, 0x0, 0x0, 0x0, 0x5e, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x0, 0xe, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x31, 0x0, 0x34, 0x1, 0x0, 0x0, 0x1, 0x2a, 0x0, 0x0, 0x0, 0x5f, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x1, 0x89, 0x0, 0x0, 0x0, 0xe, 0xfc, 0x1, 0x0, 0x0, 0x0, 0x4, 0xfb, 0x0, 0x0, 0x0, 0xc, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x33, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x5f, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x0, 0xc, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x37, 0x1, 0x0, 0x0, 0x0, 0x63, 0x0, 0x0, 0x0, 0x61, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x0, 0xe, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x31, 0x0, 0x31, 0x1, 0x0, 0x0, 0x0, 0xc8, 0x0, 0x0, 0x0, 0x5e, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x0, 0xe, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x31, 0x0, 0x35, 0x1, 0x0, 0x0, 0x1, 0x2a, 0x0, 0x0, 0x0, 0x5f, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0xc1, 0x0, 0x0, 0x1, 0x19};
+static uchar restoreData41[] = { 0x0, 0x0, 0x0, 0xff, 0x0, 0x0, 0x0, 0x0, 0xfc, 0x0, 0x0, 0x0, 0x0, 0xfd, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x64, 0x0, 0x0, 0x1, 0x19, 0xfc, 0x2, 0x0, 0x0, 0x0, 0x4, 0xfb, 0x0, 0x0, 0x0, 0xc, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x30, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x45, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x0, 0xc, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x34, 0x1, 0x0, 0x0, 0x0, 0x49, 0x0, 0x0, 0x0, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x0, 0xc, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x38, 0x1, 0x0, 0x0, 0x0, 0x8d, 0x0, 0x0, 0x0, 0x43, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x0, 0xe, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x31, 0x0, 0x32, 0x1, 0x0, 0x0, 0x0, 0xd4, 0x0, 0x0, 0x0, 0x45, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x64, 0x0, 0x0, 0x1, 0x19, 0xfc, 0x2, 0x0, 0x0, 0x0, 0x4, 0xfb, 0x0, 0x0, 0x0, 0xc, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x31, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x45, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x0, 0xc, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x35, 0x1, 0x0, 0x0, 0x0, 0x49, 0x0, 0x0, 0x0, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x0, 0xc, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x39, 0x1, 0x0, 0x0, 0x0, 0x8d, 0x0, 0x0, 0x0, 0x43, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x0, 0xe, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x31, 0x0, 0x33, 0x1, 0x0, 0x0, 0x0, 0xd4, 0x0, 0x0, 0x0, 0x45, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 0x1, 0x89, 0x0, 0x0, 0x0, 0xe, 0xfc, 0x1, 0x0, 0x0, 0x0, 0x4, 0xfb, 0x0, 0x0, 0x0, 0xc, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x32, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x5f, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x0, 0xc, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x36, 0x1, 0x0, 0x0, 0x0, 0x63, 0x0, 0x0, 0x0, 0x61, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x0, 0xe, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x31, 0x0, 0x30, 0x1, 0x0, 0x0, 0x0, 0xc8, 0x0, 0x0, 0x0, 0x5e, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x0, 0xe, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x31, 0x0, 0x34, 0x1, 0x0, 0x0, 0x1, 0x2a, 0x0, 0x0, 0x0, 0x5f, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x1, 0x89, 0x0, 0x0, 0x0, 0xe, 0xfc, 0x1, 0x0, 0x0, 0x0, 0x4, 0xfb, 0x0, 0x0, 0x0, 0xc, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x33, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x5f, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x0, 0xc, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x37, 0x1, 0x0, 0x0, 0x0, 0x63, 0x0, 0x0, 0x0, 0x61, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x0, 0xe, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x31, 0x0, 0x31, 0x1, 0x0, 0x0, 0x0, 0xc8, 0x0, 0x0, 0x0, 0x5e, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x0, 0xe, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x31, 0x0, 0x35, 0x1, 0x0, 0x0, 0x1, 0x2a, 0x0, 0x0, 0x0, 0x5f, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0xc1, 0x0, 0x0, 0x1, 0x19};
static uchar restoreData42[] = { 0x0, 0x0, 0x0, 0xff, 0x0, 0x0, 0x0, 0x0, 0xfc, 0x0, 0x0, 0x0, 0x0, 0xfd, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x24, 0x0, 0x0, 0x2, 0x2b, 0xfc, 0x2, 0x0, 0x0, 0x0, 0x4, 0xfb, 0x0, 0x0, 0x0, 0xc, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x30, 0x1, 0x0, 0x0, 0x0, 0x2a, 0x0, 0x0, 0x0, 0x88, 0x0, 0x0, 0x0, 0x21, 0x0, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x0, 0xc, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x34, 0x1, 0x0, 0x0, 0x0, 0xb6, 0x0, 0x0, 0x0, 0x88, 0x0, 0x0, 0x0, 0x21, 0x0, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x0, 0xc, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x38, 0x1, 0x0, 0x0, 0x1, 0x42, 0x0, 0x0, 0x0, 0x87, 0x0, 0x0, 0x0, 0x21, 0x0, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x0, 0xe, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x31, 0x0, 0x32, 0x1, 0x0, 0x0, 0x1, 0xcd, 0x0, 0x0, 0x0, 0x88, 0x0, 0x0, 0x0, 0x21, 0x0, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x98, 0x0, 0x0, 0x2, 0x2b, 0xfc, 0x2, 0x0, 0x0, 0x0, 0x4, 0xfb, 0x0, 0x0, 0x0, 0xc, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x31, 0x1, 0x0, 0x0, 0x0, 0x2a, 0x0, 0x0, 0x0, 0x88, 0x0, 0x0, 0x0, 0x21, 0x0, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x0, 0xc, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x35, 0x1, 0x0, 0x0, 0x0, 0xb6, 0x0, 0x0, 0x0, 0x88, 0x0, 0x0, 0x0, 0x21, 0x0, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x0, 0xc, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x39, 0x1, 0x0, 0x0, 0x1, 0x42, 0x0, 0x0, 0x0, 0x87, 0x0, 0x0, 0x0, 0x21, 0x0, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x0, 0xe, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x31, 0x0, 0x33, 0x1, 0x0, 0x0, 0x1, 0xcd, 0x0, 0x0, 0x0, 0x88, 0x0, 0x0, 0x0, 0x21, 0x0, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 0x4, 0x4e, 0x0, 0x0, 0x0, 0x26, 0xfc, 0x1, 0x0, 0x0, 0x0, 0x4, 0xfb, 0x0, 0x0, 0x0, 0xc, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x32, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x12, 0x0, 0x0, 0x0, 0xa, 0x0, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x0, 0xc, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x36, 0x1, 0x0, 0x0, 0x1, 0x16, 0x0, 0x0, 0x1, 0xe, 0x0, 0x0, 0x0, 0xa, 0x0, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x0, 0xe, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x31, 0x0, 0x30, 0x1, 0x0, 0x0, 0x2, 0x28, 0x0, 0x0, 0x1, 0x14, 0x0, 0x0, 0x0, 0xa, 0x0, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x0, 0xe, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x31, 0x0, 0x34, 0x1, 0x0, 0x0, 0x3, 0x40, 0x0, 0x0, 0x1, 0xe, 0x0, 0x0, 0x0, 0xa, 0x0, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x4, 0x4e, 0x0, 0x0, 0x0, 0x26, 0xfc, 0x1, 0x0, 0x0, 0x0, 0x4, 0xfb, 0x0, 0x0, 0x0, 0xc, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x33, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x12, 0x0, 0x0, 0x0, 0xa, 0x0, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x0, 0xc, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x37, 0x1, 0x0, 0x0, 0x1, 0x16, 0x0, 0x0, 0x1, 0xe, 0x0, 0x0, 0x0, 0xa, 0x0, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x0, 0xe, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x31, 0x0, 0x31, 0x1, 0x0, 0x0, 0x2, 0x28, 0x0, 0x0, 0x1, 0x14, 0x0, 0x0, 0x0, 0xa, 0x0, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x0, 0xe, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x31, 0x0, 0x35, 0x1, 0x0, 0x0, 0x3, 0x40, 0x0, 0x0, 0x1, 0xe, 0x0, 0x0, 0x0, 0xa, 0x0, 0xff, 0xff, 0xff, 0x0, 0x0, 0x3, 0x8a, 0x0, 0x0, 0x2, 0x2b, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x8};
static uchar restoreData43[] = { 0x0, 0x0, 0x0, 0xff, 0x0, 0x0, 0x0, 0x0, 0xfd, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x50, 0x0, 0x0, 0x0, 0xa0, 0xfc, 0x2, 0x0, 0x0, 0x0, 0x4, 0xfb, 0x0, 0x0, 0x0, 0xc, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x30, 0x1, 0x0, 0x0, 0x0, 0x2a, 0x0, 0x0, 0x0, 0x25, 0x0, 0x0, 0x0, 0x16, 0x0, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x0, 0xc, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x34, 0x1, 0x0, 0x0, 0x0, 0x53, 0x0, 0x0, 0x0, 0x25, 0x0, 0x0, 0x0, 0x16, 0x0, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x0, 0xc, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x38, 0x1, 0x0, 0x0, 0x0, 0x7c, 0x0, 0x0, 0x0, 0x25, 0x0, 0x0, 0x0, 0x16, 0x0, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x0, 0xe, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x31, 0x0, 0x32, 0x1, 0x0, 0x0, 0x0, 0xa5, 0x0, 0x0, 0x0, 0x25, 0x0, 0x0, 0x0, 0x16, 0x0, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x98, 0x0, 0x0, 0x0, 0xa0, 0xfc, 0x2, 0x0, 0x0, 0x0, 0x4, 0xfb, 0x0, 0x0, 0x0, 0xc, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x31, 0x1, 0x0, 0x0, 0x0, 0x2a, 0x0, 0x0, 0x0, 0x25, 0x0, 0x0, 0x0, 0x16, 0x0, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x0, 0xc, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x35, 0x1, 0x0, 0x0, 0x0, 0x53, 0x0, 0x0, 0x0, 0x25, 0x0, 0x0, 0x0, 0x16, 0x0, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x0, 0xc, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x39, 0x1, 0x0, 0x0, 0x0, 0x7c, 0x0, 0x0, 0x0, 0x25, 0x0, 0x0, 0x0, 0x16, 0x0, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x0, 0xe, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x31, 0x0, 0x33, 0x1, 0x0, 0x0, 0x0, 0xa5, 0x0, 0x0, 0x0, 0x25, 0x0, 0x0, 0x0, 0x16, 0x0, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 0x1, 0xa8, 0x0, 0x0, 0x0, 0x26, 0xfc, 0x1, 0x0, 0x0, 0x0, 0x4, 0xfb, 0x0, 0x0, 0x0, 0xc, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x32, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x68, 0x0, 0x0, 0x0, 0x50, 0x0, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x0, 0xc, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x36, 0x1, 0x0, 0x0, 0x0, 0x6c, 0x0, 0x0, 0x0, 0x66, 0x0, 0x0, 0x0, 0x50, 0x0, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x0, 0xe, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x31, 0x0, 0x30, 0x1, 0x0, 0x0, 0x0, 0xd6, 0x0, 0x0, 0x0, 0x68, 0x0, 0x0, 0x0, 0x50, 0x0, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x0, 0xe, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x31, 0x0, 0x34, 0x1, 0x0, 0x0, 0x1, 0x42, 0x0, 0x0, 0x0, 0x66, 0x0, 0x0, 0x0, 0x50, 0x0, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x1, 0xa8, 0x0, 0x0, 0x0, 0x26, 0xfc, 0x1, 0x0, 0x0, 0x0, 0x4, 0xfb, 0x0, 0x0, 0x0, 0xc, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x33, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x68, 0x0, 0x0, 0x0, 0x50, 0x0, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x0, 0xc, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x37, 0x1, 0x0, 0x0, 0x0, 0x6c, 0x0, 0x0, 0x0, 0x66, 0x0, 0x0, 0x0, 0x50, 0x0, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x0, 0xe, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x31, 0x0, 0x31, 0x1, 0x0, 0x0, 0x0, 0xd6, 0x0, 0x0, 0x0, 0x68, 0x0, 0x0, 0x0, 0x50, 0x0, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x0, 0xe, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x31, 0x0, 0x35, 0x1, 0x0, 0x0, 0x1, 0x42, 0x0, 0x0, 0x0, 0x66, 0x0, 0x0, 0x0, 0x50, 0x0, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0xb8, 0x0, 0x0, 0x0, 0xa0, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x8, 0xfc, 0x0, 0x0, 0x0, 0x0};
// Local scope class to simulate toolbar move.
@@ -1273,7 +1273,7 @@ void tst_QMainWindow::restoreStateFromPreviousVersion()
QMainWindow win;
win.setCentralWidget(new QTextEdit);
QVector<QDockWidget*> docks;
-
+
for(int i = 0; i < 16; ++i) {
const QString name = QString::fromLatin1("dock %1").arg(i);
QDockWidget *dock = new QDockWidget(name);
@@ -1288,7 +1288,7 @@ void tst_QMainWindow::restoreStateFromPreviousVersion()
QCOMPARE( win.dockWidgetArea(docks[i]), Qt::DockWidgetArea(1 << i%4));
}
}
-
+
}
@@ -1631,7 +1631,7 @@ void tst_QMainWindow::isSeparator()
QVERIFY( mw.isSeparator(QPoint(4, dockw->pos().y() + dockw->size().height())));
QVERIFY( mw.isSeparator(QPoint(4, dockw->pos().y() + dockw->size().height() + margin)));
QVERIFY(!mw.isSeparator(QPoint(4, dockw->pos().y() + dockw->size().height() + 15)));
-
+
}
class MainWindow : public QMainWindow {
@@ -1668,7 +1668,7 @@ void tst_QMainWindow::addToolbarAfterShow()
//this is for task 243119
QMainWindow mainWindow;
mainWindow.show();
-
+
QToolBar toolBar;
mainWindow.addToolBar(&toolBar);
QTest::qWait(100);
diff --git a/tests/auto/widgets/widgets/qscrollarea/tst_qscrollarea.cpp b/tests/auto/widgets/widgets/qscrollarea/tst_qscrollarea.cpp
index 26daf11b3a..a1a4e33a4b 100644
--- a/tests/auto/widgets/widgets/qscrollarea/tst_qscrollarea.cpp
+++ b/tests/auto/widgets/widgets/qscrollarea/tst_qscrollarea.cpp
@@ -120,7 +120,7 @@ void tst_QScrollArea::ensureMicroFocusVisible_Task_167838()
parent->setLayout(new QVBoxLayout);
QWidget *child = new WidgetWithMicroFocus;
parent->layout()->addWidget(child);
- parent->resize(300, 300);
+ parent->resize(300, 300);
scrollArea.setWidget(parent);
scrollArea.ensureWidgetVisible(child, 10, 10);
QRect microFocus = child->inputMethodQuery(Qt::ImMicroFocus).toRect();
diff --git a/tests/auto/widgets/widgets/qsplitter/tst_qsplitter.cpp b/tests/auto/widgets/widgets/qsplitter/tst_qsplitter.cpp
index a2c7c04977..340eefbf17 100644
--- a/tests/auto/widgets/widgets/qsplitter/tst_qsplitter.cpp
+++ b/tests/auto/widgets/widgets/qsplitter/tst_qsplitter.cpp
@@ -242,17 +242,17 @@ void tst_QSplitter::saveAndRestoreState()
QFETCH(IntList, initialSizes);
splitter->setSizes(initialSizes);
QApplication::instance()->sendPostedEvents();
-
+
QSplitter *splitter2 = new QSplitter(splitter->orientation() == Qt::Horizontal ?
Qt::Vertical : Qt::Horizontal);
for (int i = 0; i < splitter->count(); ++i) {
- splitter2->addWidget(new QWidget());
+ splitter2->addWidget(new QWidget());
}
- splitter2->resize(splitter->size());
+ splitter2->resize(splitter->size());
splitter2->setChildrenCollapsible(!splitter->childrenCollapsible());
splitter2->setOpaqueResize(!splitter->opaqueResize());
splitter2->setHandleWidth(splitter->handleWidth()+3);
-
+
QByteArray ba = splitter->saveState();
QVERIFY(splitter2->restoreState(ba));
@@ -269,10 +269,10 @@ void tst_QSplitter::saveAndRestoreState()
}
// destroy version and magic number
- for (int i = 0; i < ba.size(); ++i)
+ for (int i = 0; i < ba.size(); ++i)
ba[i] = ~ba.at(i);
QVERIFY(!splitter2->restoreState(ba));
-
+
delete splitter2;
}
@@ -688,7 +688,7 @@ void tst_QSplitter::task187373_addAbstractScrollAreas()
}
//! A simple QTextEdit which can switch between two different size states
-class MyTextEdit : public QTextEdit
+class MyTextEdit : public QTextEdit
{
public:
MyTextEdit(const QString & text, QWidget* parent = NULL)
diff --git a/tests/auto/widgets/widgets/qtabwidget/tst_qtabwidget.cpp b/tests/auto/widgets/widgets/qtabwidget/tst_qtabwidget.cpp
index 48cbc66ba9..5dd9ee9b0f 100644
--- a/tests/auto/widgets/widgets/qtabwidget/tst_qtabwidget.cpp
+++ b/tests/auto/widgets/widgets/qtabwidget/tst_qtabwidget.cpp
@@ -454,7 +454,7 @@ void tst_QTabWidget::removeTab()
tw->addTab(new QLabel("5"), "5");
QCOMPARE(ob.count, 1);
QCOMPARE(tw->count(), 5);
-
+
tw->setCurrentIndex(4);
QCOMPARE(ob.count,5);
tw->removeTab(4);
@@ -533,7 +533,7 @@ void tst_QTabWidget::keyboardNavigation()
tw->setTabEnabled(2, false);
QTest::keyClick(tw, Qt::Key_Tab, Qt::ControlModifier);
// TODO: Disabling the current tab will move current tab to the next,
- // but what if next tab is also disabled. We should look into this.
+ // but what if next tab is also disabled. We should look into this.
QVERIFY(tw->currentIndex() < 3 && tw->currentIndex() >= 0);
}
diff --git a/tests/auto/xml/dom/qdom/tst_qdom.cpp b/tests/auto/xml/dom/qdom/tst_qdom.cpp
index e654a41ddd..6b4bc3cd35 100644
--- a/tests/auto/xml/dom/qdom/tst_qdom.cpp
+++ b/tests/auto/xml/dom/qdom/tst_qdom.cpp
@@ -1684,7 +1684,7 @@ static const QChar umlautName[] =
/*!
\internal
-
+
Write a german umlaut to a QByteArray, via a QTextStream.
*/
void tst_QDom::germanUmlautToByteArray() const
@@ -1701,7 +1701,7 @@ void tst_QDom::germanUmlautToByteArray() const
ts.setCodec("UTF-8");
ts << d.toString();
buffer.close();
-
+
QByteArray baseline("<a");
/* http://www.fileformat.info/info/unicode/char/00FC/index.htm */
@@ -1714,7 +1714,7 @@ void tst_QDom::germanUmlautToByteArray() const
/*!
\internal
-
+
Write a german umlaut to a QFile, via a QTextStream.
*/
void tst_QDom::germanUmlautToFile() const
@@ -1757,15 +1757,15 @@ void tst_QDom::germanUmlautToFile() const
void tst_QDom::setInvalidDataPolicy() const
{
- QDomImplementation::setInvalidDataPolicy(QDomImplementation::ReturnNullNode);
- QDomDocument doc;
- QDomElement elem = doc.createElement("invalid name");
+ QDomImplementation::setInvalidDataPolicy(QDomImplementation::ReturnNullNode);
+ QDomDocument doc;
+ QDomElement elem = doc.createElement("invalid name");
QVERIFY(elem.isNull());
}
void tst_QDom::crashInSetContent() const
{
- QDomImplementation::setInvalidDataPolicy(QDomImplementation::ReturnNullNode);
+ QDomImplementation::setInvalidDataPolicy(QDomImplementation::ReturnNullNode);
QDomDocument docImport;
QCOMPARE(docImport.setContent(QLatin1String("<a:>text</a:>"), true), false);
@@ -1774,7 +1774,7 @@ void tst_QDom::crashInSetContent() const
void tst_QDom::doubleNamespaceDeclarations() const
{
- QDomDocument doc;
+ QDomDocument doc;
QString testFile = QFINDTESTDATA("doubleNamespaces.xml");
if (testFile.isEmpty())
@@ -1782,7 +1782,7 @@ void tst_QDom::doubleNamespaceDeclarations() const
QFile file(testFile);
QVERIFY(file.open(QIODevice::ReadOnly));
- QXmlSimpleReader reader;
+ QXmlSimpleReader reader;
QXmlInputSource source(&file);
QVERIFY(doc.setContent(&source, &reader));
diff --git a/tests/auto/xml/sax/qxml/tst_qxml.cpp b/tests/auto/xml/sax/qxml/tst_qxml.cpp
index 7f597f83d3..0ce8d363c9 100644
--- a/tests/auto/xml/sax/qxml/tst_qxml.cpp
+++ b/tests/auto/xml/sax/qxml/tst_qxml.cpp
@@ -62,7 +62,7 @@ class MyXmlEntityResolver : public QXmlEntityResolver
{
public:
MyXmlEntityResolver() : QXmlEntityResolver() {}
- QString errorString() const { return QString(); }
+ QString errorString() const { return QString(); }
bool resolveEntity(const QString &, const QString &, QXmlInputSource *&) { return false; }
};
@@ -88,7 +88,7 @@ class MyXmlErrorHandler : public QXmlErrorHandler
{
public:
MyXmlErrorHandler() : QXmlErrorHandler() {}
- QString errorString() const { return QString(); }
+ QString errorString() const { return QString(); }
bool error(const QXmlParseException &) { return false; }
bool fatalError(const QXmlParseException &) { return false; }
bool warning(const QXmlParseException &) { return false; }
@@ -193,7 +193,7 @@ void tst_QXml::interpretedAs0D() const
};
const QString document(QLatin1String("<element ") +
- QChar(0x010D) +
+ QChar(0x010D) +
QLatin1String("reated-by=\"an attr value\"/>"));
QString testFile = QFINDTESTDATA("0x010D.xml");
diff --git a/tests/auto/xml/sax/qxmlinputsource/tst_qxmlinputsource.cpp b/tests/auto/xml/sax/qxmlinputsource/tst_qxmlinputsource.cpp
index 2084c95cf4..b8837f8c14 100644
--- a/tests/auto/xml/sax/qxmlinputsource/tst_qxmlinputsource.cpp
+++ b/tests/auto/xml/sax/qxmlinputsource/tst_qxmlinputsource.cpp
@@ -72,7 +72,7 @@ private slots:
void tst_QXmlInputSource::reset() const
{
const QString input(QString::fromLatin1("<element attribute1='value1' attribute2='value2'/>"));
-
+
QXmlSimpleReader reader;
QXmlDefaultHandler handler;
reader.setContentHandler(&handler);
@@ -100,7 +100,7 @@ void tst_QXmlInputSource::reset() const
void tst_QXmlInputSource::resetSimplified() const
{
const QString input(QString::fromLatin1("<element/>"));
-
+
QXmlSimpleReader reader;
QXmlInputSource source;
diff --git a/tests/auto/xml/sax/qxmlsimplereader/parser/parser.cpp b/tests/auto/xml/sax/qxmlsimplereader/parser/parser.cpp
index 7c6c675fbe..c00a5c7caa 100644
--- a/tests/auto/xml/sax/qxmlsimplereader/parser/parser.cpp
+++ b/tests/auto/xml/sax/qxmlsimplereader/parser/parser.cpp
@@ -103,7 +103,7 @@ class ContentHandler : public QXmlDefaultHandler
const QString &result() const { return m_result; }
const QString &errorMsg() const { return m_error_msg; }
-
+
private:
QString nestPrefix() const { return QString().fill(' ', 3*m_nest); }
QString formatAttributes(const QXmlAttributes & atts);
diff --git a/tests/baselineserver/shared/lookup3.cpp b/tests/baselineserver/shared/lookup3.cpp
index b2d9ffeb94..2959356ca8 100644
--- a/tests/baselineserver/shared/lookup3.cpp
+++ b/tests/baselineserver/shared/lookup3.cpp
@@ -47,8 +47,8 @@ These functions are based on:
lookup3.c, by Bob Jenkins, May 2006, Public Domain.
These are functions for producing 32-bit hashes for hash table lookup.
-hashword(), hashlittle(), hashlittle2(), hashbig(), mix(), and final()
-are externally useful functions. Routines to test the hash are included
+hashword(), hashlittle(), hashlittle2(), hashbig(), mix(), and final()
+are externally useful functions. Routines to test the hash are included
if SELF_TEST is defined. You can use this free for any purpose. It's in
the public domain. It has no warranty.
@@ -56,7 +56,7 @@ You probably want to use hashlittle(). hashlittle() and hashbig()
hash byte arrays. hashlittle() is is faster than hashbig() on
little-endian machines. Intel and AMD are little-endian machines.
On second thought, you probably want hashlittle2(), which is identical to
-hashlittle() except it returns two 32-bit hashes for the price of one.
+hashlittle() except it returns two 32-bit hashes for the price of one.
You could implement hashbig2() if you wanted but I haven't bothered here.
If you want to find a hash of, say, exactly 7 integers, do
@@ -69,9 +69,9 @@ If you want to find a hash of, say, exactly 7 integers, do
then use c as the hash value. If you have a variable length array of
4-byte integers to hash, use hashword(). If you have a byte array (like
a character string), use hashlittle(). If you have several byte arrays, or
-a mix of things, see the comments above hashlittle().
+a mix of things, see the comments above hashlittle().
-Why is this so big? I read 12 bytes at a time into 3 4-byte integers,
+Why is this so big? I read 12 bytes at a time into 3 4-byte integers,
then mix those integers. This is fast (you can do a lot more thorough
mixing with 12*3 instructions on 3 integers than you can with 3 instructions
on 1 byte), but shoehorning those bytes into integers efficiently is messy.
@@ -110,7 +110,7 @@ This was tested for:
the output delta to a Gray code (a^(a>>1)) so a string of 1's (as
is commonly produced by subtraction) look like a single 1-bit
difference.
-* the base values were pseudorandom, all zero but one bit set, or
+* the base values were pseudorandom, all zero but one bit set, or
all zero plus a counter that starts at zero.
Some k values for my "a-=c; a^=rot(c,k); c+=b;" arrangement that
@@ -120,7 +120,7 @@ satisfy this are
14 9 3 7 17 3
Well, "9 15 3 18 27 15" didn't quite get 32 bits diffing
for "differ" defined as + with a one-bit base and a two-bit delta. I
-used http://burtleburtle.net/bob/hash/avalanche.html to choose
+used http://burtleburtle.net/bob/hash/avalanche.html to choose
the operations, constants, and arrangements of the variables.
This does not achieve avalanche. There are input bits of (a,b,c)
@@ -159,7 +159,7 @@ produce values of c that look totally different. This was tested for
the output delta to a Gray code (a^(a>>1)) so a string of 1's (as
is commonly produced by subtraction) look like a single 1-bit
difference.
-* the base values were pseudorandom, all zero but one bit set, or
+* the base values were pseudorandom, all zero but one bit set, or
all zero plus a counter that starts at zero.
These constants passed:
@@ -218,7 +218,7 @@ quint32 initval) /* the previous hash, or an arbitrary value */
/*------------------------------------------- handle the last 3 quint32's */
switch(length) /* all the case statements fall through */
- {
+ {
case 3 : c+=k[2];
case 2 : b+=k[1];
case 1 : a+=k[0];
@@ -235,7 +235,7 @@ quint32 initval) /* the previous hash, or an arbitrary value */
--------------------------------------------------------------------
hashword2() -- same as hashword(), but take two seeds and return two
32-bit values. pc and pb must both be nonnull, and *pc and *pb must
-both be initialized with seeds. If you pass in (*pb)==0, the output
+both be initialized with seeds. If you pass in (*pb)==0, the output
(*pc) will be the same as the return value from hashword().
--------------------------------------------------------------------
*/
@@ -264,7 +264,7 @@ quint32 *pb) /* IN: more seed OUT: secondary hash value */
/*------------------------------------------- handle the last 3 quint32's */
switch(length) /* all the case statements fall through */
- {
+ {
case 3 : c+=k[2];
case 2 : b+=k[1];
case 1 : a+=k[0];
@@ -328,7 +328,7 @@ quint32 hashlittle( const void *key, size_t length, quint32 initval)
}
/*----------------------------- handle the last (probably partial) block */
- /*
+ /*
* "k[2]&0xffffff" actually reads beyond the end of the string, but
* then masks off the part it's not allowed to read. Because the
* string is aligned, the masked-off tail is in the same word as the
@@ -483,7 +483,7 @@ quint32 hashlittle( const void *key, size_t length, quint32 initval)
* the key. *pc is better mixed than *pb, so use *pc first. If you want
* a 64-bit value do something like "*pc + (((uint64_t)*pb)<<32)".
*/
-void hashlittle2(
+void hashlittle2(
const void *key, /* the key to hash */
size_t length, /* length of the key */
quint32 *pc, /* IN: primary initval, OUT: primary hash */
@@ -512,7 +512,7 @@ void hashlittle2(
}
/*----------------------------- handle the last (probably partial) block */
- /*
+ /*
* "k[2]&0xffffff" actually reads beyond the end of the string, but
* then masks off the part it's not allowed to read. Because the
* string is aligned, the masked-off tail is in the same word as the
@@ -662,7 +662,7 @@ void hashlittle2(
* hashbig():
* This is the same as hashword() on big-endian machines. It is different
* from hashlittle() on all machines. hashbig() takes advantage of
- * big-endian byte ordering.
+ * big-endian byte ordering.
*/
quint32 hashbig( const void *key, size_t length, quint32 initval)
{
@@ -688,7 +688,7 @@ quint32 hashbig( const void *key, size_t length, quint32 initval)
}
/*----------------------------- handle the last (probably partial) block */
- /*
+ /*
* "k[2]<<8" actually reads beyond the end of the string, but
* then shifts out the part it's not allowed to read. Because the
* string is aligned, the illegal read is in the same word as the
diff --git a/tests/benchmarks/README b/tests/benchmarks/README
index d437299fee..8d017cd9a7 100644
--- a/tests/benchmarks/README
+++ b/tests/benchmarks/README
@@ -2,7 +2,7 @@ The most reliable way of running benchmarks is to do it in an otherwise idle
system. On a busy system, the results will vary according to the other tasks
demanding attention in the system.
-We have managed to obtain quite reliable results by doing the following on
+We have managed to obtain quite reliable results by doing the following on
Linux (and you need root):
- switching the scheduler to a Real-Time mode
@@ -10,23 +10,23 @@ Linux (and you need root):
- disabling the other thread of the same core
This should work rather well for CPU-intensive tasks. A task that is in Real-
-Time mode will simply not be preempted by the OS. But if you make OS syscalls,
-especially I/O ones, your task will be de-scheduled. Note that this includes
-page faults, so if you can, make sure your benchmark's warmup code paths touch
+Time mode will simply not be preempted by the OS. But if you make OS syscalls,
+especially I/O ones, your task will be de-scheduled. Note that this includes
+page faults, so if you can, make sure your benchmark's warmup code paths touch
most of the data.
-To do this you need a tool called schedtool (package schedtool), from
+To do this you need a tool called schedtool (package schedtool), from
http://freequaos.host.sk/schedtool/
From this point on, we are using CPU0 for all tasks:
-If you have a Hyperthreaded multi-core processor (Core-i5 and Core-i7), you
-have to disable the other thread of the same core as CPU0. To discover which
+If you have a Hyperthreaded multi-core processor (Core-i5 and Core-i7), you
+have to disable the other thread of the same core as CPU0. To discover which
one it is:
$ cat /sys/devices/system/cpu/cpu0/topology/thread_siblings_list
-This will print something like 0,4, meaning that CPUs 0 and 4 are sibling
+This will print something like 0,4, meaning that CPUs 0 and 4 are sibling
threads on the same core. So we'll turn CPU 4 off:
(as root)
@@ -34,7 +34,7 @@ threads on the same core. So we'll turn CPU 4 off:
To turn it back on, echo 1 into the same file.
-To run a task on CPU 0 exclusively, using FIFO RT priority 10, you run the
+To run a task on CPU 0 exclusively, using FIFO RT priority 10, you run the
following:
(as root)
@@ -43,38 +43,38 @@ following:
For example:
# schedtool -F -p 10 -a 1 -e ./tst_bench_qstring -tickcounter
-Warning: if your task livelocks or takes far too long to complete, your system
-may be unusable for a long time, especially if you don't have other cores to
+Warning: if your task livelocks or takes far too long to complete, your system
+may be unusable for a long time, especially if you don't have other cores to
run stuff on. To prevent that, run it before schedtool and time it.
-You can also limit the CPU time that the task is allowed to take. Run in the
+You can also limit the CPU time that the task is allowed to take. Run in the
same shell as you'll run schedtool:
$ ulimit -s 300
To limit to 300 seconds (5 minutes)
-If your task runs away, it will get a SIGXCPU after consuming 5 minutes of CPU
+If your task runs away, it will get a SIGXCPU after consuming 5 minutes of CPU
time (5 minutes running at 100%).
-If your app is multithreaded, you may want to give it more CPUs, like CPU0 and
+If your app is multithreaded, you may want to give it more CPUs, like CPU0 and
CPU1 with -a 3 (it's a bitmask).
-For best results, you should disable ALL other cores and threads of the same
-processor. The new Core-i7 have one processor with 4 cores,
-each core can run 2 threads; the older Mac Pros have two processors with 4
-cores each. So on those Mac Pros, you'd disable cores 1, 2 and 3, while on the
+For best results, you should disable ALL other cores and threads of the same
+processor. The new Core-i7 have one processor with 4 cores,
+each core can run 2 threads; the older Mac Pros have two processors with 4
+cores each. So on those Mac Pros, you'd disable cores 1, 2 and 3, while on the
Core-i7, you'll need to disable all other CPUs.
-However, disabling just the sibling thread seems to produce very reliable
-results for me already, with variance often below 0.5% (even though there are
+However, disabling just the sibling thread seems to produce very reliable
+results for me already, with variance often below 0.5% (even though there are
some measurable spikes).
Other things to try:
-Running the benchmark with highest priority, i.e. "sudo nice -19"
-usually produces stable results on some machines. If the benchmark also
-involves displaying something on the screen (on X11), running it with
-"-sync" is a must. Though, in that case the "real" cost is not correct,
+Running the benchmark with highest priority, i.e. "sudo nice -19"
+usually produces stable results on some machines. If the benchmark also
+involves displaying something on the screen (on X11), running it with
+"-sync" is a must. Though, in that case the "real" cost is not correct,
but it is useful to discover regressions.
Also; not many people know about ionice (1)
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);
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractitemcontainer.cpp b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractitemcontainer.cpp
index 5e4b1e3a2f..e9204e3282 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractitemcontainer.cpp
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractitemcontainer.cpp
@@ -259,7 +259,7 @@ void AbstractItemContainer::updateItemBuffer()
QModelIndex index;
if (m_items.count() > 0)
index = m_items.last()->modelIndex();
- while (m_items.count() < maxCount) {
+ while (m_items.count() < maxCount) {
index = m_itemView->nextIndex(index);
if (!index.isValid())
@@ -311,7 +311,7 @@ void AbstractItemContainer::insertItem(int pos, const QModelIndex &index)
item = m_prototype->newItemInstance();
if (item) {
- item->setModel(m_itemView->model());
+ item->setModel(m_itemView->model());
item->setModelIndex(index);
item->setTwoColumns(m_twoColumns);
m_items.insert(pos, item);
@@ -335,7 +335,7 @@ void AbstractItemContainer::findFirstAndLastVisibleBufferIndex(int &firstVisible
lastVisibleBufferIndex = -1;
int count = m_items.count();
- for (int i = 0; i < count; ++i) {
+ for (int i = 0; i < count; ++i) {
if (itemVisibleInView(m_items.at(i), viewRect, fullyVisible)) {
if (firstVisibleBufferIndex == -1)
firstVisibleBufferIndex = i;
@@ -359,13 +359,13 @@ int AbstractItemContainer::maxItemCountInItemBuffer() const
void AbstractItemContainer::themeChange()
{
- for (int i = 0; i <m_items.count(); ++i)
+ for (int i = 0; i <m_items.count(); ++i)
m_items.at(i)->themeChange();
}
-void AbstractItemContainer::updateContent()
+void AbstractItemContainer::updateContent()
{
- for (int i = 0; i <m_items.count(); ++i)
+ for (int i = 0; i <m_items.count(); ++i)
m_items.at(i)->updateItemContents();
}
@@ -389,7 +389,7 @@ void AbstractItemContainer::setTwoColumns(const bool enabled)
}
bool AbstractItemContainer::twoColumns()
-{
+{
return m_twoColumns;
}
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractitemview.cpp b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractitemview.cpp
index 06fd5d9754..779b99a0c5 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractitemview.cpp
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractitemview.cpp
@@ -63,8 +63,8 @@ AbstractItemView::~AbstractItemView()
/*virtual*/
void AbstractItemView::setModel(QAbstractItemModel *model, AbstractViewItem *prototype)
-{
- if( m_model == model || !model)
+{
+ if (m_model == model || !model)
return;
if (m_model) {
@@ -236,7 +236,7 @@ void AbstractItemView::currentIndexChanged(const QModelIndex &current, const QMo
/*virtual*/
void AbstractItemView::currentSelectionChanged(const QItemSelection &selected,
- const QItemSelection &deselected)
+ const QItemSelection &deselected)
{
Q_UNUSED(selected)
Q_UNUSED(deselected)
@@ -260,7 +260,6 @@ void AbstractItemView::rowsAboutToBeInserted(const QModelIndex &index, int start
// TODO implement
}
-
/*virtual*/
void AbstractItemView::rowsAboutToBeRemoved(const QModelIndex &index,int start, int end)
{
@@ -346,7 +345,7 @@ bool AbstractItemView::event(QEvent *e)
m_container->resize(this->size().width()-verticalScrollBar()->size().width(),
m_container->preferredHeight());
- if(verticalScrollBar()->sliderPosition() > verticalScrollBar()->sliderSize())
+ if (verticalScrollBar()->sliderPosition() > verticalScrollBar()->sliderSize())
verticalScrollBar()->setSliderPosition(verticalScrollBar()->sliderSize());
result = true;
@@ -371,7 +370,7 @@ void AbstractItemView::refreshContainerGeometry()
ScrollBar *sb = verticalScrollBar();
if (sb) {
- AbstractViewItem *item = m_container->itemAt(0);
+ AbstractViewItem *item = m_container->itemAt(0);
if (item) {
qreal oneItemH = item->size().height();
sb->setSliderSize(oneItemH*m_model->rowCount(m_rootIndex)-size().height());
@@ -394,10 +393,9 @@ void AbstractItemView::scrollContentsBy(qreal dx, qreal dy)
qreal itemH = 1;
AbstractViewItem *item = m_container->itemAt(0);
- if(item && item->size().height() > 1) {
+ if (item && item->size().height() > 1) {
itemH = item->size().height();
- }
- else if(item && item->preferredHeight() > 1) {
+ } else if (item && item->preferredHeight() > 1) {
itemH = item->preferredHeight();
}
@@ -407,8 +405,7 @@ void AbstractItemView::scrollContentsBy(qreal dx, qreal dy)
if ((vpy+m_container->size().height()-dy > pos().y()+size().height()) &&
(qAbs(dy) < itemH) && (vpy-dy <= 0)) {
m_container->setPos(vpx, vpy-dy);
- }
- else {
+ } else {
qreal vPos = verticalScrollBar()->sliderPosition();
int startRow = m_model->index(vPos/itemH, 0).row();
int itemsInContainer = m_container->itemCount();
@@ -428,13 +425,13 @@ void AbstractItemView::scrollContentsBy(qreal dx, qreal dy)
}
}
-void AbstractItemView::changeTheme()
+void AbstractItemView::changeTheme()
{
if (m_container)
m_container->themeChange();
}
-void AbstractItemView::updateViewContent()
+void AbstractItemView::updateViewContent()
{
if (m_container)
m_container->updateContent();
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractscrollarea.cpp b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractscrollarea.cpp
index c904cb520b..bdd18e234f 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractscrollarea.cpp
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractscrollarea.cpp
@@ -54,11 +54,11 @@ AbstractScrollArea::AbstractScrollArea(QGraphicsWidget *parent)
, m_prevVerticalValue(0.0)
{
setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
- setContentsMargins(0, 0, 0, 0);
+ setContentsMargins(0, 0, 0, 0);
m_horizontalScrollBar = new ScrollBar(Qt::Horizontal, this);
m_horizontalScrollBar->hide();
- m_horizontalScrollBar->setContentsMargins(0, 0, 0, 0);
+ m_horizontalScrollBar->setContentsMargins(0, 0, 0, 0);
m_horizontalScrollBarPolicy = Qt::ScrollBarAsNeeded;
m_horizontalScrollBar->setZValue(zValue()+1); // Raise scroll bar to top
m_horizontalScrollBar->setVisible(false);
@@ -70,7 +70,7 @@ AbstractScrollArea::AbstractScrollArea(QGraphicsWidget *parent)
m_verticalScrollBar = new ScrollBar(Qt::Vertical, this);
m_verticalScrollBar->hide();
- m_verticalScrollBar->setContentsMargins(0, 0, 0, 0);
+ m_verticalScrollBar->setContentsMargins(0, 0, 0, 0);
m_verticalScrollBarPolicy = Qt::ScrollBarAsNeeded;
m_verticalScrollBar->setZValue(zValue()+1); // Raise scroll bar to top
m_verticalScrollBar->setVisible(false);
@@ -153,8 +153,8 @@ bool AbstractScrollArea::event(QEvent *e)
{
if (e->type() == QEvent::ApplicationLayoutDirectionChange
|| e->type() == QEvent::LayoutDirectionChange) {
- } else if (e->type() == QEvent::GraphicsSceneResize) {
- QGraphicsSceneResizeEvent *event =
+ } else if (e->type() == QEvent::GraphicsSceneResize) {
+ QGraphicsSceneResizeEvent *event =
static_cast<QGraphicsSceneResizeEvent*>(e);
QSizeF newSize = event->newSize();
@@ -186,7 +186,7 @@ void AbstractScrollArea::scrollContentsBy(qreal dx, qreal dy)
void AbstractScrollArea::verticalScrollStart()
{
- m_prevVerticalValue = m_verticalScrollBar->sliderPosition();
+ m_prevVerticalValue = m_verticalScrollBar->sliderPosition();
}
void AbstractScrollArea::verticalScroll(qreal value)
@@ -200,7 +200,7 @@ void AbstractScrollArea::verticalScroll(qreal value)
void AbstractScrollArea::horizontalScrollStart()
{
- m_prevHorizontalValue = m_horizontalScrollBar->sliderPosition();
+ m_prevHorizontalValue = m_horizontalScrollBar->sliderPosition();
}
void AbstractScrollArea::horizontalScroll(qreal value)
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractscrollarea.h b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractscrollarea.h
index 8f90277994..b4c32bf668 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractscrollarea.h
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractscrollarea.h
@@ -90,8 +90,8 @@ private:
void adjustScrollBars();
QGraphicsWidget *m_viewport;
- ScrollBar *m_horizontalScrollBar;
- ScrollBar *m_verticalScrollBar;
+ ScrollBar *m_horizontalScrollBar;
+ ScrollBar *m_verticalScrollBar;
Qt::ScrollBarPolicy m_verticalScrollBarPolicy;
Qt::ScrollBarPolicy m_horizontalScrollBarPolicy;
qreal m_prevHorizontalValue;
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/backgrounditem.cpp b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/backgrounditem.cpp
index 04626c4855..c4e10a36c6 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/backgrounditem.cpp
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/backgrounditem.cpp
@@ -59,7 +59,6 @@ BackgroundItem::BackgroundItem(const QString &filename, QGraphicsWidget *parent)
BackgroundItem::~BackgroundItem()
{
-
}
void BackgroundItem::resizeEvent(QGraphicsSceneResizeEvent *event)
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/backgrounditem.h b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/backgrounditem.h
index a637a50408..38a176e73d 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/backgrounditem.h
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/backgrounditem.h
@@ -51,19 +51,19 @@ class QGraphicsWidget;
class BackgroundItem : public GvbWidget
{
Q_OBJECT
-
+
public:
BackgroundItem(const QString &filename, QGraphicsWidget *parent=0);
~BackgroundItem();
-
+
void paint(QPainter *painter,
const QStyleOptionGraphicsItem *option,
QWidget *widget = 0);
void resizeEvent(QGraphicsSceneResizeEvent *event);
-
+
public slots:
void themeChange();
-
+
private:
QPixmap m_background;
QString m_fileName;
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/button.cpp b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/button.cpp
index 37d2318746..8ca4307c8b 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/button.cpp
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/button.cpp
@@ -50,7 +50,7 @@ class ButtonPrivate {
public:
- ButtonPrivate(Button *button)
+ ButtonPrivate(Button *button)
: down(false)
, q_ptr(button)
{
@@ -65,7 +65,7 @@ public:
Button::Button(const QString &text, QGraphicsItem *parent, QSizeF minimumSize)
: QGraphicsWidget(parent)
, d_ptr(new ButtonPrivate(this)), m_background(), m_selected(false)
-{
+{
Q_D(Button);
setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
//setCacheMode(QGraphicsItem::ItemCoordinateCache);
@@ -105,13 +105,13 @@ QString Button::text()
return d->textItem->text();
}
-void Button::paint(QPainter *painter,
- const QStyleOptionGraphicsItem *option,
+void Button::paint(QPainter *painter,
+ const QStyleOptionGraphicsItem *option,
QWidget *widget)
{
Q_UNUSED(widget);
Q_UNUSED(option);
-
+
if(!m_background.isNull())
painter->drawPixmap(QPoint(), m_background);
if(m_selected) {
@@ -121,8 +121,8 @@ void Button::paint(QPainter *painter,
}
}
-QSizeF Button::sizeHint(Qt::SizeHint which,
- const QSizeF &constraint) const
+QSizeF Button::sizeHint(Qt::SizeHint which,
+ const QSizeF &constraint) const
{
Q_D(const Button);
@@ -146,7 +146,7 @@ QSizeF Button::sizeHint(Qt::SizeHint which,
void Button::mousePressEvent(QGraphicsSceneMouseEvent *event)
{
Q_D(Button);
-
+
if (event->button() != Qt::LeftButton ||
!sceneBoundingRect().contains(event->scenePos()))
return;
@@ -162,7 +162,7 @@ void Button::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
{
Q_D(Button);
- if (!d->down || event->button() != Qt::LeftButton)
+ if (!d->down || event->button() != Qt::LeftButton)
return;
d->down = false;
@@ -184,11 +184,11 @@ void Button::resizeEvent(QGraphicsSceneResizeEvent *event)
{
Q_D(Button);
QGraphicsWidget::resizeEvent(event);
-
+
QRectF rect = d->textItem->boundingRect();
QRectF buttonrect = this->boundingRect();
d->textItem->setPos((buttonrect.width() - rect.width())/2, (buttonrect.height() - rect.height())/2 );
-
+
QSize currentSize = buttonrect.size().toSize();
if( m_background.size() != currentSize && (currentSize.width() > 0 && currentSize.height() > 0) ) {
m_background = Theme::p()->pixmap("status_field_middle.svg", buttonrect.size().toSize());
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/button.h b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/button.h
index 14ffb15626..8641d8a9b6 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/button.h
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/button.h
@@ -47,7 +47,7 @@
class ButtonPrivate;
class QTextDocument;
-class QPixmap;
+class QPixmap;
class QFont;
class Button : public QGraphicsWidget
@@ -73,7 +73,7 @@ public slots:
QString text();
public:
-
+
void setBackground(QPixmap& background);
bool isDown();
void select(bool select){m_selected = select;}
@@ -81,9 +81,9 @@ public:
private:
- void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
QWidget *widget = 0);
- QSizeF sizeHint(Qt::SizeHint which,
+ QSizeF sizeHint(Qt::SizeHint which,
const QSizeF &constraint = QSizeF()) const;
void mousePressEvent(QGraphicsSceneMouseEvent *event);
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/commandline.cpp b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/commandline.cpp
index d98beefea6..06dea1b864 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/commandline.cpp
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/commandline.cpp
@@ -127,7 +127,7 @@ bool readSettingsFromCommandLine(int argc, char *argv[],
argv[i] = 0;
i++;
argv[i] = 0;
- }
+ }
}
if (!argv[i])
@@ -160,7 +160,7 @@ bool readSettingsFromCommandLine(int argc, char *argv[],
argv[i] = 0;
i++;
argv[i] = 0;
- }
+ }
} else if (strcmp(argv[i], "-subtree-cache") == 0) {
options |= Settings::UseListItemCache;
argv[i] = 0;
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/commandline.h b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/commandline.h
index 20d3706e9c..16525487da 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/commandline.h
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/commandline.h
@@ -44,7 +44,7 @@
#include "settings.h"
-bool readSettingsFromCommandLine(int argc,
+bool readSettingsFromCommandLine(int argc,
char *argv[],
Settings& settings);
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/dummydatagen.cpp b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/dummydatagen.cpp
index 86fc78d3f7..259e94aa2f 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/dummydatagen.cpp
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/dummydatagen.cpp
@@ -51,19 +51,19 @@ DummyDataGenerator::DummyDataGenerator() : m_isMale(false)
while (!countryCodeFile.atEnd()) {
m_countryCodes << QString(countryCodeFile.readLine()).remove("\n");
}
-
+
QFile firstNameFFile(":/contact/firstnamesF.txt");
firstNameFFile.open(QIODevice::ReadOnly);
while (!firstNameFFile.atEnd()) {
m_firstNamesF << QString(firstNameFFile.readLine()).remove("\n");
}
-
+
QFile firstNameMFile(":/contact/firstnamesM.txt");
firstNameMFile.open(QIODevice::ReadOnly);
while (!firstNameMFile.atEnd()) {
m_firstNamesM << QString(firstNameMFile.readLine()).remove("\n");
}
-
+
QFile lastNameFile(":/contact/lastnames.txt");
lastNameFile.open(QIODevice::ReadOnly);
while (!lastNameFile.atEnd()) {
@@ -74,7 +74,6 @@ DummyDataGenerator::DummyDataGenerator() : m_isMale(false)
DummyDataGenerator::~DummyDataGenerator()
{
-
}
void DummyDataGenerator::Reset()
@@ -89,7 +88,7 @@ QString DummyDataGenerator::randomPhoneNumber(QString indexNumber)
QString areaCode = QString::number(index) + QString("0").repeated(2-QString::number(index).length());
QString beginNumber = QString::number(555-index*2);
QString endNumber = QString("0").repeated(4-indexNumber.length()) + indexNumber;
-
+
return countryCode +" " + areaCode +" " + beginNumber +" " + endNumber;
}
@@ -116,14 +115,14 @@ QString DummyDataGenerator::randomIconItem()
QString avatar = Theme::p()->pixmapPath() + "contact_default_icon.svg";
if (qrand()%4) {
int randVal = 1+qrand()%25;
-
- if(m_isMale && randVal > 15) {
- randVal -= 15;
+
+ if (m_isMale && randVal > 15) {
+ randVal -= 15;
}
- if(!m_isMale && randVal <= 10) {
+ if (!m_isMale && randVal <= 10) {
randVal += 10;
}
-
+
avatar = QString(":/avatars/avatar_%1.png").arg(randVal, 3, 10, QChar('0'));
}
return avatar;
@@ -131,8 +130,7 @@ QString DummyDataGenerator::randomIconItem()
QString DummyDataGenerator::randomStatusItem()
{
- switch ( qrand()%3 )
- {
+ switch (qrand()%3) {
case 0: return Theme::p()->pixmapPath() + "contact_status_online.svg";
case 1: return Theme::p()->pixmapPath() + "contact_status_offline.svg";
case 2: return Theme::p()->pixmapPath() + "contact_status_idle.svg";
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/dummydatagen.h b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/dummydatagen.h
index 5e64357919..9f418390f0 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/dummydatagen.h
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/dummydatagen.h
@@ -51,7 +51,7 @@ class DummyDataGenerator : public QObject
public:
DummyDataGenerator();
~DummyDataGenerator();
-
+
public:
void Reset();
QString randomPhoneNumber(QString indexNumber);
@@ -60,7 +60,7 @@ public:
QString randomName();
QString randomIconItem();
QString randomStatusItem();
-
+
private:
QStringList m_countryCodes;
QStringList m_firstNamesF;
@@ -69,4 +69,4 @@ private:
bool m_isMale;
};
-#endif // __DUMMYDATAGEN_H__
+#endif // __DUMMYDATAGEN_H__
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/gvbwidget.h b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/gvbwidget.h
index 8348d429b5..5d23c55102 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/gvbwidget.h
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/gvbwidget.h
@@ -44,7 +44,7 @@
#include <QGraphicsWidget>
-class GvbWidget : public QGraphicsWidget
+class GvbWidget : public QGraphicsWidget
{
Q_OBJECT
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/iconitem.cpp b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/iconitem.cpp
index 13713940c8..d68d7f799f 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/iconitem.cpp
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/iconitem.cpp
@@ -45,7 +45,7 @@
#include "iconitem.h"
-IconItem::IconItem(const QString &filename, QGraphicsItem *parent)
+IconItem::IconItem(const QString &filename, QGraphicsItem *parent)
: GvbWidget(parent)
, m_filename(filename)
, m_rotation(0.0)
@@ -79,7 +79,7 @@ void IconItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
painter->drawPixmap(0,0, m_pixmap);
}
-QSizeF IconItem::sizeHint(Qt::SizeHint which,
+QSizeF IconItem::sizeHint(Qt::SizeHint which,
const QSizeF &constraint) const
{
switch (which)
@@ -144,7 +144,7 @@ void IconItem::setOpacityEffectEnabled(const bool enable)
gradient.setColorAt(0.0, QColor(0,0,0, 255));
gradient.setColorAt(0.46, QColor(0,0,0, 255));
gradient.setColorAt(0.62, QColor(0,0,0, 0));
-
+
m_opacityEffect = new QGraphicsOpacityEffect;
m_opacityEffect->setOpacityMask(gradient);
m_opacityEffect->setOpacity(1.0);
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/iconitem.h b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/iconitem.h
index 7d4510479b..9d1fb168de 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/iconitem.h
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/iconitem.h
@@ -74,7 +74,7 @@ public:
private:
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget */*widget = 0*/);
- QSizeF sizeHint(Qt::SizeHint which,
+ QSizeF sizeHint(Qt::SizeHint which,
const QSizeF &constraint = QSizeF()) const;
private:
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/itemrecyclinglist.cpp b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/itemrecyclinglist.cpp
index 1856d74500..fc6d5683ee 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/itemrecyclinglist.cpp
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/itemrecyclinglist.cpp
@@ -52,7 +52,7 @@
ItemRecyclingList::ItemRecyclingList(const int itemBuffer, QGraphicsWidget * parent)
: ItemRecyclingListView(parent),
m_listModel(new ListModel(this))
-{
+{
ListItemContainer *container = new ListItemContainer(itemBuffer, this, this);
container->setParentItem(this);
ItemRecyclingListView::setContainer(container);
@@ -153,7 +153,7 @@ void ItemRecyclingList::themeChange()
item->setBackgroundBrush(Theme::p()->listItemBackgroundBrushEven());
item->setBackgroundOpacity(Theme::p()->listItemBackgroundOpacityEven());
}
-
+
// Update borders
item->setBorderPen(Theme::p()->listItemBorderPen());
item->setRounding(Theme::p()->listItemRounding());
@@ -177,7 +177,7 @@ void ItemRecyclingList::keyPressEvent(QKeyEvent *event)
static qreal step = 0.0;
static bool repeat = false;
int interval = keyPressInterval.elapsed();
-
+
ScrollBar* sb = verticalScrollBar();
qreal currentValue = sb->sliderPosition();
@@ -193,11 +193,11 @@ void ItemRecyclingList::keyPressEvent(QKeyEvent *event)
step = m_listModel->item(0)->size().height();
repeat = false;
}
-
+
if(event->key() == Qt::Key_Up ) { //Up Arrow
sb->setSliderPosition(currentValue - step);
}
-
+
if(event->key() == Qt::Key_Down ) { //Down Arrow
sb->setSliderPosition(currentValue + step);
}
@@ -255,7 +255,7 @@ void ItemRecyclingList::setTwoColumns(const bool enabled)
}
bool ItemRecyclingList::twoColumns()
-{
+{
return m_container->twoColumns();
}
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/itemrecyclinglist.h b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/itemrecyclinglist.h
index f865740632..b86fe345f4 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/itemrecyclinglist.h
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/itemrecyclinglist.h
@@ -59,7 +59,7 @@ public:
virtual ~ItemRecyclingList();
virtual void insertItem(int index, RecycledListItem *item);
- virtual void addItem(RecycledListItem *item);
+ virtual void addItem(RecycledListItem *item);
virtual void clear();
virtual AbstractViewItem *takeItem(const int row);
virtual void setItemPrototype(AbstractViewItem* prototype);
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/label.cpp b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/label.cpp
index bc45f11df0..847b55237d 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/label.cpp
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/label.cpp
@@ -43,7 +43,7 @@
#include "label.h"
-Label::Label(const QString& text, QGraphicsItem *parent)
+Label::Label(const QString &text, QGraphicsItem *parent)
: GvbWidget(parent)
{
m_textItem = new QGraphicsSimpleTextItem(this);
@@ -58,8 +58,8 @@ Label::~Label()
{
}
-void Label::setText(const QString& text)
-{
+void Label::setText(const QString &text)
+{
m_textItem->setText(text);
prepareGeometryChange();
}
@@ -74,22 +74,20 @@ void Label::setFont(const QFont font)
m_textItem->setFont(font);
}
-void Label::resizeEvent(QGraphicsSceneResizeEvent *event)
+void Label::resizeEvent(QGraphicsSceneResizeEvent *event)
{
GvbWidget::resizeEvent(event);
}
QSizeF Label::sizeHint(Qt::SizeHint which, const QSizeF &constraint) const
{
- switch (which)
- {
+ switch (which) {
case Qt::MinimumSize:
// fall thru
- case Qt::PreferredSize:
- {
+ case Qt::PreferredSize: {
QFontMetricsF fm(m_textItem->font());
return QSizeF(fm.width(m_textItem->text()), fm.height());
- }
+ }
default:
return GvbWidget::sizeHint(which, constraint);
}
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/label.h b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/label.h
index e5c83ab3b0..74ffc39d37 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/label.h
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/label.h
@@ -65,7 +65,7 @@ public:
private:
void resizeEvent(QGraphicsSceneResizeEvent *event);
- QSizeF sizeHint(Qt::SizeHint which,
+ QSizeF sizeHint(Qt::SizeHint which,
const QSizeF &constraint = QSizeF()) const;
private:
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listitem.cpp b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listitem.cpp
index 27ce0a2919..222e4eea50 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listitem.cpp
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listitem.cpp
@@ -64,25 +64,25 @@ struct ItemData
Q_DECLARE_METATYPE(ItemData);
ListItem::ListItem(QGraphicsWidget *parent)
- : GvbWidget(parent),
- m_txtlayout(new QGraphicsGridLayout()),
- m_layout(new QGraphicsLinearLayout(Qt::Horizontal)),
- m_liconlayout(new QGraphicsLinearLayout(Qt::Horizontal)),
- m_riconlayout(new QGraphicsLinearLayout(Qt::Horizontal))
- ,m_fonts()
- ,m_borderPen(Qt::NoPen)
- ,m_backgroundBrush(QBrush())
- ,m_backgroundOpacity(1.0)
- ,m_rounding(0.0, 0.0)
-{
+ : GvbWidget(parent)
+ , m_txtlayout(new QGraphicsGridLayout())
+ , m_layout(new QGraphicsLinearLayout(Qt::Horizontal))
+ , m_liconlayout(new QGraphicsLinearLayout(Qt::Horizontal))
+ , m_riconlayout(new QGraphicsLinearLayout(Qt::Horizontal))
+ , m_fonts()
+ , m_borderPen(Qt::NoPen)
+ , m_backgroundBrush(QBrush())
+ , m_backgroundOpacity(1.0)
+ , m_rounding(0.0, 0.0)
+{
setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
setContentsMargins(0,4,4,0);
- m_layout->setContentsMargins(0,0,0,0);
+ m_layout->setContentsMargins(0,0,0,0);
m_txtlayout->setContentsMargins(0,8,0,8);
m_liconlayout->setContentsMargins(8,8,8,8);
m_riconlayout->setContentsMargins(0,8,4,8);
-
+
m_layout->insertItem(0, m_liconlayout);
m_layout->insertItem(1, m_txtlayout);
m_layout->insertItem(2, m_riconlayout);
@@ -95,47 +95,44 @@ ListItem::ListItem(QGraphicsWidget *parent)
setLayout(m_layout);
}
-ListItem::~ListItem()
+ListItem::~ListItem()
{
- if ( !m_liconlayout->parentLayoutItem() )
+ if (!m_liconlayout->parentLayoutItem())
delete m_liconlayout;
- if ( !m_riconlayout->parentLayoutItem() )
+ if (!m_riconlayout->parentLayoutItem())
delete m_riconlayout;
}
-void ListItem::setIcon( IconItem *iconItem, const IconItemPos iconPos )
+void ListItem::setIcon(IconItem *iconItem, const IconItemPos iconPos)
{
if (iconPos == LeftIcon) {
if (m_liconlayout->count() > 0 && m_liconlayout->itemAt(0)) {
delete m_liconlayout->itemAt(0);
- m_liconlayout->addItem( iconItem );
+ m_liconlayout->addItem(iconItem);
+ } else {
+ m_liconlayout->addItem(iconItem);
}
- else {
- m_liconlayout->addItem( iconItem );
- }
- m_liconlayout->itemAt(0)->setMaximumSize(58,58);
- }
- else if (iconPos == RightIcon) {
+ m_liconlayout->itemAt(0)->setMaximumSize(58, 58);
+ } else if (iconPos == RightIcon) {
if (m_riconlayout->count() > 0 && m_riconlayout->itemAt(0)) {
delete m_riconlayout->itemAt(0);
- m_riconlayout->addItem( iconItem );
+ m_riconlayout->addItem(iconItem);
+ } else {
+ m_riconlayout->addItem(iconItem);
}
- else {
- m_riconlayout->addItem( iconItem );
- }
- m_riconlayout->itemAt(0)->setMaximumSize(22,22);
+ m_riconlayout->itemAt(0)->setMaximumSize(22, 22);
}
m_layout->invalidate();
}
-IconItem* ListItem::icon( const IconItemPos iconPos ) const
+IconItem* ListItem::icon(const IconItemPos iconPos) const
{
QGraphicsLayoutItem* item = 0;
if (iconPos == LeftIcon && m_liconlayout->count() > 0) {
item = m_liconlayout->itemAt(0);
- }
+ }
else if (iconPos == RightIcon && m_riconlayout->count() > 0) {
item = m_riconlayout->itemAt(0);
}
@@ -203,13 +200,13 @@ void ListItem::setData(const QVariant &value, int role)
ItemData data = value.value<ItemData>();
QList<ListItem::TextPos> textkeys = data.texts.keys();
- for( int i = 0; i<textkeys.count(); ++i) {
- setText(data.texts[textkeys.at(i)],textkeys.at(i));
+ for (int i = 0; i<textkeys.count(); ++i) {
+ setText(data.texts[textkeys.at(i)], textkeys.at(i));
setFont(data.fonts[textkeys.at(i)], textkeys.at(i));
}
QList<ListItem::IconItemPos> iconkeys = data.icons.keys();
- for( int i = 0; i<iconkeys.count(); ++i) {
+ for (int i = 0; i<iconkeys.count(); ++i) {
IconItem *iconItem = icon(iconkeys.at(i));
if (iconItem)
iconItem->setFileName(data.icons[iconkeys.at(i)]);
@@ -249,8 +246,7 @@ void ListItem::setText(const QString str, const TextPos position)
m_txtlayout->addItem(label, position, 0);
if (m_fonts.contains(position))
label->setFont(m_fonts[position]);
- }
- else {
+ } else {
Label *titem = static_cast<Label *>(item);
titem->setText(str);
}
@@ -290,14 +286,12 @@ void ListItem::paint(QPainter *painter, const QStyleOptionGraphicsItem */*option
QRectF r = rect();
r.adjust(penWidth, penWidth, -penWidth, -penWidth);
- if (m_borderPen != Qt::NoPen)
- {
+ if (m_borderPen != Qt::NoPen) {
painter->setPen(m_borderPen);
painter->drawRoundedRect(r, m_rounding.width(), m_rounding.height());
}
- if (m_backgroundBrush != Qt::NoBrush)
- {
+ if (m_backgroundBrush != Qt::NoBrush) {
painter->setPen(Qt::NoPen);
painter->setBrush(m_backgroundBrush);
painter->setOpacity(m_backgroundOpacity);
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listitemcache.cpp b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listitemcache.cpp
index 451f1f8031..a1fa8df047 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listitemcache.cpp
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listitemcache.cpp
@@ -53,7 +53,7 @@ ListItemCache::~ListItemCache()
QPixmapCache::remove(m_cacheKey);
}
-void ListItemCache::draw(QPainter * painter)
+void ListItemCache::draw(QPainter * painter)
{
QRectF irect = sourceBoundingRect(Qt::LogicalCoordinates);
QRectF vrect = painter->clipPath().boundingRect();
@@ -80,7 +80,7 @@ void ListItemCache::draw(QPainter * painter)
//qDebug() << "ListItemCache: blitting" << m_visibleRect;
painter->drawPixmap(0, 0, pixmap);
- }
+ }
}
void ListItemCache::sourceChanged(ChangeFlags)
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listitemcache.h b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listitemcache.h
index a7b36c95c6..3e9153ce53 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listitemcache.h
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listitemcache.h
@@ -45,7 +45,7 @@
#include <QGraphicsEffect>
#include <QPixmapCache>
-class ListItemCache : public QGraphicsEffect
+class ListItemCache : public QGraphicsEffect
{
Q_OBJECT
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listitemcontainer.cpp b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listitemcontainer.cpp
index 0b787f077d..91dba0bc7d 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listitemcontainer.cpp
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listitemcontainer.cpp
@@ -56,7 +56,7 @@ ListItemContainer::ListItemContainer(int bufferSize, ItemRecyclingList *view, QG
, m_layout(new QGraphicsLinearLayout(Qt::Vertical))
, m_listItemCaching(false)
{
- setContentsMargins(0,0,0,0);
+ setContentsMargins(0,0,0,0);
m_layout->setContentsMargins(0,0,0,0);
m_layout->setSpacing(0);
setLayout(m_layout);
@@ -80,13 +80,13 @@ bool ListItemContainer::listItemCaching() const
}
void ListItemContainer::setListItemCaching(const bool enabled)
-{
+{
if (m_listItemCaching == enabled)
return;
m_listItemCaching = enabled;
- const int itemCount = m_layout->count();
+ const int itemCount = m_layout->count();
for (int i = 0; i < itemCount; ++i)
setListItemCaching(enabled, i);
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listmodel.cpp b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listmodel.cpp
index 95eadeece1..f219402aca 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listmodel.cpp
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listmodel.cpp
@@ -106,7 +106,7 @@ void ListModel::insert(int row, RecycledListItem *item)
{
if (item)
item->setModel(this);
- if (!item || m_items.contains(item) ) {
+ if (!item || m_items.contains(item) ) {
return;
}
if (row < 0)
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listwidget.cpp b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listwidget.cpp
index 1cce930d09..1626e1c5d3 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listwidget.cpp
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listwidget.cpp
@@ -47,14 +47,14 @@
ListWidget::ListWidget(QGraphicsWidget * parent)
: GvbWidget(parent),
- m_layout(new QGraphicsLinearLayout(Qt::Vertical)),
+ m_layout(new QGraphicsLinearLayout(Qt::Vertical)),
m_listView(new SimpleListView(this))
-{
+{
//listView->setViewport(listView->content());
//listView->content()->setParentItem(listView);
setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
setContentsMargins(0,0,0,0);
- m_layout->setContentsMargins(0,0,0,0);
+ m_layout->setContentsMargins(0,0,0,0);
m_listView->setContentsMargins(0,0,0,0);
m_layout->addItem(m_listView);
setLayout(m_layout);
@@ -64,7 +64,7 @@ ListWidget::ListWidget(QGraphicsWidget * parent)
m_listView->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
}
-ListWidget::~ListWidget()
+ListWidget::~ListWidget()
{
}
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/mainview.cpp b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/mainview.cpp
index 57cff5f902..afd8581932 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/mainview.cpp
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/mainview.cpp
@@ -82,7 +82,7 @@ MainView::~MainView()
}
void MainView::setTestWidget(QGraphicsWidget *testWidget)
-{
+{
if (!testWidget)
return;
@@ -99,7 +99,7 @@ void MainView::setTestWidget(QGraphicsWidget *testWidget)
QGraphicsWidget *MainView::takeTestWidget()
{
if (m_testWidget) {
- m_mainLayout->removeItem(m_testWidget);
+ m_mainLayout->removeItem(m_testWidget);
QGraphicsWidget *tmp = m_testWidget;
m_testWidget = 0;
return tmp;
@@ -229,30 +229,30 @@ void MainView::keyPressEvent(QKeyEvent *event)
else
showFullScreen();
}
-
+
//S60 3.x specific
if(m_menu->menuVisible()) {
m_menu->keyPressEvent(event);
return;
}
-
+
if(event->key() == 16777235 ) { //Up Arrow
GvbWidget* widget = qobject_cast<GvbWidget*>(m_testWidget);
if(widget)
widget->keyPressEvent(event);
}
-
+
if(event->key() == 16777237 ) { //Down Arrow
GvbWidget* widget = qobject_cast<GvbWidget*>(m_testWidget);
if(widget)
widget->keyPressEvent(event);
}
-
+
if(event->key() == 17825792 ) { //LSK
if(!m_menu->menuVisible())
m_menu->menuShowHide();
}
-
+
if(event->key() == 17825793 ) { //RSK
QApplication::quit();
}
@@ -265,7 +265,7 @@ void MainView::construct()
#ifndef QT_NO_OPENGL
if (m_enableOpenGL) {
qDebug() << "OpenGL enabled";
- m_scene->setSortCacheEnabled(false);
+ m_scene->setSortCacheEnabled(false);
setViewport(new QGLWidget);
// Qt doc says: This is the preferred update mode for
@@ -311,7 +311,7 @@ void MainView::construct()
m_mainLayout->addItem(m_topBar);
m_topBar->setZValue(1);
connect(m_topBar, SIGNAL(clicked(bool)), m_menu, SLOT(menuShowHide()));
-
+
setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
setContentsMargins(0,0,0,0);
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/mainview.h b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/mainview.h
index 3a484bd7d1..ee8625edce 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/mainview.h
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/mainview.h
@@ -57,9 +57,9 @@ class BackgroundItem;
class TopBar;
class MainView : public QGraphicsView {
-
+
Q_OBJECT
-
+
public:
MainView(const bool enableOpenGL, const bool outputFps, const bool imageBasedRendering = false, QWidget *parent = 0);
~MainView();
@@ -94,7 +94,7 @@ private slots:
private:
void construct();
void resizeContent(const QSize &s);
-
+
private:
Q_DISABLE_COPY(MainView)
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/menu.cpp b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/menu.cpp
index f8655bf725..540d7cf31b 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/menu.cpp
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/menu.cpp
@@ -73,14 +73,14 @@ Menu::~Menu()
void Menu::init()
{
m_ButtonContainer = new QList<Button*>;
-
+
m_Layout->setContentsMargins(0,0,0,0);
m_Layout->setSpacing(0);
-
- setMinimumWidth(150);
-
+
+ setMinimumWidth(150);
+
setLayout(m_Layout);
-
+
connect(Theme::p(), SIGNAL(themeChanged()), this, SLOT(themeChange()));
}
@@ -124,9 +124,9 @@ void Menu::menuHide()
void Menu::themeChange()
{
- QPixmap pixmap = Theme::p()->pixmap("status_field_middle.svg",
+ QPixmap pixmap = Theme::p()->pixmap("status_field_middle.svg",
QSize(MinMenuItemWidth, MinMenuItemHeight));
-
+
for(int i = 0; i < m_ButtonContainer->count(); i++) {
Button* button = m_ButtonContainer->at(i);
button->setBackground(pixmap);
@@ -142,7 +142,7 @@ void Menu::keyPressEvent(QKeyEvent *event)
Button* button = m_ButtonContainer->at(m_currentSelectedIndex);
button->select(false);
button->update();
-
+
m_currentSelectedIndex--;
button = m_ButtonContainer->at(m_currentSelectedIndex);
button->select(true);
@@ -162,7 +162,7 @@ void Menu::keyPressEvent(QKeyEvent *event)
}
}
}
-
+
if(event->key() == 16777237 ) { //Down Arrow
if (m_currentSelectedIndex < m_ButtonContainer->count()-1) { //One step down
if(m_currentSelectedIndex >= 0) {
@@ -187,15 +187,15 @@ void Menu::keyPressEvent(QKeyEvent *event)
}
}
}
-
+
if(event->key() == 17825792 || event->key() == 16842752 || //LSK, center key or enter
- event->key() == 16777221 ) {
+ event->key() == 16777221 ) {
if(m_currentSelectedIndex >= 0) {
Button* button = m_ButtonContainer->at(m_currentSelectedIndex);
button->click();
}
}
-
+
if(event->key() == 17825793 ) { //RSK
menuShowHide();
}
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/menu.h b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/menu.h
index 84a2e87100..564f6cee53 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/menu.h
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/menu.h
@@ -66,12 +66,12 @@ public slots:
public slots:
void menuShowHide();
-
+
private:
void init();
void menuShow();
void menuHide();
-
+
private:
Q_DISABLE_COPY(Menu)
QGraphicsView* m_Parent;
@@ -81,4 +81,4 @@ private:
int m_currentSelectedIndex;
};
-#endif // __MENU_H__
+#endif // __MENU_H__
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/recycledlistitem.cpp b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/recycledlistitem.cpp
index 9e487846a0..d73ec2f4ba 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/recycledlistitem.cpp
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/recycledlistitem.cpp
@@ -57,7 +57,7 @@ RecycledListItem::RecycledListItem(QGraphicsWidget *parent)
{
m_item->setMinimumWidth(MinItemWidth);
setContentsMargins(0,0,0,0);
- setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+ setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
m_layout->addItem(m_item, 0, 0);
setLayout(m_layout);
m_layout->setContentsMargins(0,0,0,0);
@@ -118,7 +118,7 @@ void RecycledListItem::resizeEvent(QGraphicsSceneResizeEvent *event)
void RecycledListItem::updateItemContents()
{
- AbstractViewItem::updateItemContents();
+ AbstractViewItem::updateItemContents();
if (m_model && m_index.isValid())
setData(m_model->data(m_index,Qt::DisplayRole), Qt::DisplayRole);
}
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/resourcemoninterface.h b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/resourcemoninterface.h
index cf301e434c..e8dd6292b1 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/resourcemoninterface.h
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/resourcemoninterface.h
@@ -52,7 +52,7 @@ public:
int availableMemoryInAppThreadHeap;
qint64 availableMemoryInSystem;
qint64 totalMemoryInSystem;
- MemoryAllocation() :
+ MemoryAllocation() :
allocatedInAppThread(0),
numberOfAllocatedCellsInAppThread(0),
availableMemoryInAppThreadHeap(0),
@@ -60,17 +60,17 @@ public:
totalMemoryInSystem(0)
{}
};
-
+
struct CpuUsage
{
qreal systemUsage;
qreal appTreadUsage;
- CpuUsage() :
+ CpuUsage() :
systemUsage(0.0),
appTreadUsage(0.0)
{}
};
-
+
public:
virtual ~ResourceMonitorInterface() {}
@@ -78,17 +78,17 @@ public:
//for symbian, prepares the resource monitor for data capture, opens handle to ekern null
//thread and sets initial values
virtual bool Prepare(QString applicationThreadName) = 0;
-
+
//functions for CPU load and memory - Call Prepare before calling these
virtual CpuUsage CPULoad()=0;
virtual MemoryAllocation MemoryLoad()=0;
-
+
virtual void BeginMeasureMemoryLoad()=0;
virtual MemoryAllocation EndMeasureMemoryLoad()=0;
-
+
virtual void BeginMeasureCPULoad()=0;
virtual CpuUsage EndMeasureCPULoad()=0;
-
+
};
Q_DECLARE_INTERFACE(ResourceMonitorInterface,
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/scrollbar.cpp b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/scrollbar.cpp
index e3c751dbca..2499c7094a 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/scrollbar.cpp
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/scrollbar.cpp
@@ -52,7 +52,7 @@ class ScrollBarPrivate {
public:
- ScrollBarPrivate(Qt::Orientation orientation, ScrollBar *scrollBar)
+ ScrollBarPrivate(Qt::Orientation orientation, ScrollBar *scrollBar)
: orientation(orientation)
, sliderPosition(0.0)
, sliderSize(0.0)
@@ -96,15 +96,15 @@ public:
void updateSlider()
{
QRectF oldSlider = slider;
- slider = q_func()->boundingRect();
-
+ slider = q_func()->boundingRect();
+
qreal x = 0;
qreal y = 0;
qreal w = scrollerPixmap.width();
qreal h = scrollerPixmap.height();
-
+
//Adjust the scrollBar in relation to the scroller
-
+
if (orientation == Qt::Horizontal) {
qreal scrollBarHeight = scrollBarPixmap.height();
@@ -120,7 +120,7 @@ public:
}
slider.setWidth(scrollBarWidth);
}
-
+
if(oldSlider != slider && (slider.size().width() > 0 &&slider.size().height() > 0 )) {
scrollBarPixmap = Theme::p()->pixmap("scrollbar.svg", slider.size().toSize());
}
@@ -153,7 +153,7 @@ public:
ScrollBar::ScrollBar(Qt::Orientation orientation, QGraphicsWidget *parent)
: QGraphicsWidget(parent)
, d_ptr(new ScrollBarPrivate(orientation, this))
-{
+{
setSizePolicy(QSizePolicy::Fixed, QSizePolicy::MinimumExpanding);
setContentsMargins(0, 0, 0, 0);
@@ -198,8 +198,8 @@ bool ScrollBar::sliderDown() const
return d->sliderDown;
}
-void ScrollBar::paint(QPainter *painter,
- const QStyleOptionGraphicsItem *option,
+void ScrollBar::paint(QPainter *painter,
+ const QStyleOptionGraphicsItem *option,
QWidget *widget)
{
Q_D(ScrollBar);
@@ -208,23 +208,23 @@ void ScrollBar::paint(QPainter *painter,
d->updateSlider();
- QRect sliderRect = d->slider.toRect();
+ QRect sliderRect = d->slider.toRect();
painter->drawPixmap(sliderRect.topLeft(), d->scrollBarPixmap);
-
+
QRect cursorRect = d->cursor.toRect();
painter->drawPixmap(cursorRect.topLeft(), d->scrollerPixmap);
}
-QSizeF ScrollBar::sizeHint(Qt::SizeHint which,
- const QSizeF &constraint) const
+QSizeF ScrollBar::sizeHint(Qt::SizeHint which,
+ const QSizeF &constraint) const
{
Q_D(const ScrollBar);
QSizeF s;
- if (d->orientation == Qt::Horizontal)
+ if (d->orientation == Qt::Horizontal)
s = QSizeF(-1, qMax(d->scrollBarPixmap.height(), d->scrollerPixmap.height()));
- else
+ else
s = QSizeF(qMax(d->scrollBarPixmap.width(), d->scrollerPixmap.width()), -1);
switch (which)
@@ -265,18 +265,18 @@ void ScrollBar::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
{
Q_D(ScrollBar);
- if (!d->sliderDown)
+ if (!d->sliderDown)
return;
if (d->orientation == Qt::Horizontal) {
qreal f = (event->pos().x() - d->pressPos.x())/(d->slider.width() - d->cursor.width());
qreal dx = f * d->sliderSize;
-
+
d->setSliderPosition(d->sliderPosition + dx);
} else {
qreal f = (event->pos().y() - d->pressPos.y())/(d->slider.height() - d->cursor.height());
qreal dy = f * d->sliderSize;
-
+
d->setSliderPosition(d->sliderPosition + dy);
}
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/scrollbar.h b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/scrollbar.h
index 82e95046b7..9cb15b16c1 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/scrollbar.h
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/scrollbar.h
@@ -77,11 +77,11 @@ public slots:
private:
- void paint(QPainter *painter,
- const QStyleOptionGraphicsItem *option,
+ void paint(QPainter *painter,
+ const QStyleOptionGraphicsItem *option,
QWidget *widget);
- QSizeF sizeHint(Qt::SizeHint which,
+ QSizeF sizeHint(Qt::SizeHint which,
const QSizeF &constraint = QSizeF()) const;
void mousePressEvent(QGraphicsSceneMouseEvent *event);
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/scroller.cpp b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/scroller.cpp
index 6fab34ca93..a30e03188f 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/scroller.cpp
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/scroller.cpp
@@ -78,7 +78,7 @@ void ScrollerPrivate::stopScrolling()
m_scrollTimer.stop();
}
-//Maps screen coordinates to scrollArea coordinates though current m_eventViewport widget
+//Maps screen coordinates to scrollArea coordinates though current m_eventViewport widget
QPointF ScrollerPrivate::mapToScrollArea(const QPoint &point)
{
if (!m_scrollArea || !m_eventViewport)
@@ -106,7 +106,7 @@ bool ScrollerPrivate::eventFilter(QObject *obj, QEvent *event)
&& event->type() != QEvent::GraphicsSceneKeyReleased*/))
return false;
- QGraphicsSceneMouseEvent* mouseEvent =
+ QGraphicsSceneMouseEvent* mouseEvent =
static_cast<QGraphicsSceneMouseEvent*>(event);
m_eventViewport = mouseEvent->widget();
@@ -130,7 +130,7 @@ bool ScrollerPrivate::eventFilter(QObject *obj, QEvent *event)
m_cursorPos = QCursor::pos();
m_state = ManualScrolling;
- if (!m_scrollTimer.isActive())
+ if (!m_scrollTimer.isActive())
m_scrollTimer.start(UpdateScrollingInterval);
else {
m_scrollTimer.stop();
@@ -154,7 +154,7 @@ bool ScrollerPrivate::eventFilter(QObject *obj, QEvent *event)
ScrollBar *hscroll = m_scrollArea->horizontalScrollBar();
ScrollBar *vscroll = m_scrollArea->verticalScrollBar();
- QPointF d = m_scrollFactor * (mapToScrollArea(QCursor::pos()) - mapToScrollArea(m_cursorPos));
+ QPointF d = m_scrollFactor * (mapToScrollArea(QCursor::pos()) - mapToScrollArea(m_cursorPos));
hscroll->setSliderPosition(hscroll->sliderPosition() - d.x());
vscroll->setSliderPosition(vscroll->sliderPosition() - d.y());
@@ -249,7 +249,7 @@ void ScrollerPrivate::updateScrolling()
hscroll->setSliderPosition(hscroll->sliderPosition() - m_scrollFactor * d.x());
vscroll->setSliderPosition(vscroll->sliderPosition() - m_scrollFactor * d.y());
- } else {
+ } else {
m_state = Stopped;
scrollOngoing = false;
}
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/settings.h b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/settings.h
index d84303fd8b..69e300517d 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/settings.h
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/settings.h
@@ -76,7 +76,7 @@ public:
int resultFormat() const
{ return m_resultFormat; }
- void setResultFormat(int resultFormat)
+ void setResultFormat(int resultFormat)
{ m_resultFormat = resultFormat; }
const QSize& size() const
@@ -86,7 +86,7 @@ public:
int angle() const
{ return m_angle; }
- void setAngle(int angle)
+ void setAngle(int angle)
{ m_angle = angle; }
const Options& options() const
@@ -106,9 +106,9 @@ private:
QString m_outputFileName;
int m_resultFormat;
QSize m_size;
- int m_angle;
+ int m_angle;
int m_listItemCount;
- Options m_options;
+ Options m_options;
};
Q_DECLARE_OPERATORS_FOR_FLAGS(Settings::Options)
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/simplelist.cpp b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/simplelist.cpp
index 4d30286070..cc5df42a66 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/simplelist.cpp
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/simplelist.cpp
@@ -60,8 +60,8 @@ SimpleList::SimpleList(QGraphicsWidget *parent)
}
/*virtual*/
-SimpleList::~SimpleList()
-{
+SimpleList::~SimpleList()
+{
}
void SimpleList::addItem(ListItem *item)
@@ -116,7 +116,7 @@ void SimpleList::keyPressEvent(QKeyEvent *event)
static qreal step = 0.0;
static bool repeat = false;
int interval = keyPressInterval.elapsed();
-
+
ScrollBar* sb = verticalScrollBar();
qreal currentValue = sb->sliderPosition();
@@ -132,11 +132,11 @@ void SimpleList::keyPressEvent(QKeyEvent *event)
step = itemAt(0)->size().height();
repeat = false;
}
-
+
if(event->key() == Qt::Key_Up ) { //Up Arrow
sb->setSliderPosition(currentValue - step);
}
-
+
if(event->key() == Qt::Key_Down ) { //Down Arrow
sb->setSliderPosition(currentValue + step);
}
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/simplelistview.cpp b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/simplelistview.cpp
index 7bfda5173f..c59bd378e1 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/simplelistview.cpp
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/simplelistview.cpp
@@ -55,7 +55,7 @@ class SimpleListViewPrivate
public:
- SimpleListViewPrivate(SimpleListView *button)
+ SimpleListViewPrivate(SimpleListView *button)
: m_content(0)
, m_layout(0)
, m_twoColumns(false)
@@ -100,7 +100,7 @@ public:
m_content->resize(q->viewport()->size().width(),
m_layout->preferredHeight());
- const bool clip =
+ const bool clip =
m_content->size().width() > q->viewport()->size().width()
|| m_content->size().height() > q->viewport()->size().height();
@@ -161,7 +161,7 @@ public:
const QString defaultIcon = Theme::p()->pixmapPath()+"contact_default_icon.svg";
const int itemCount = m_layout->count();
-
+
for (int i=0; i<itemCount; ++i) {
ListItem* item = static_cast<ListItem*>(m_layout->itemAt(i));
@@ -251,7 +251,7 @@ public:
QGraphicsLayoutItem *item = m_layout->itemAt(i);
m_layout->removeAt(i);
moveditems.append(item);
- }
+ }
for ( int i = 0; i < moveditems.count(); ++i)
m_layout->addItem(moveditems.at(i), i, 1);
@@ -267,7 +267,7 @@ public:
moveditems.append(m_layout->itemAt(i));
else
moveditems.insert(moveditems.begin(), m_layout->itemAt(i));
- m_layout->removeAt(i);
+ m_layout->removeAt(i);
}
for (int i = 0; i<moveditems.count(); ++i) {
m_layout->addItem(moveditems.at(i), m_layout->count(), 0);
@@ -292,17 +292,17 @@ public:
bool m_listItemCaching;
};
-SimpleListView::SimpleListView(QGraphicsWidget *parent)
+SimpleListView::SimpleListView(QGraphicsWidget *parent)
: AbstractScrollArea(parent)
, d_ptr(new SimpleListViewPrivate(this))
-{
+{
setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
setContentsMargins(0, 0, 0, 0);
verticalScrollBar()->hide();
horizontalScrollBar()->hide();
}
-SimpleListView::~SimpleListView()
+SimpleListView::~SimpleListView()
{
Q_D(SimpleListView);
@@ -403,7 +403,7 @@ bool SimpleListView::listItemCaching() const
void SimpleListView::setListItemCaching(bool enabled)
{
Q_D(SimpleListView);
-
+
if (d->m_listItemCaching == enabled)
return;
@@ -430,13 +430,13 @@ void SimpleListView::scrollContentsBy(qreal dx, qreal dy)
if (newy < miny)
newy = miny;
- else if (newy > 0)
+ else if (newy > 0)
newy = 0.0;
d->m_content->setPos(contentPos.x(), newy);
}
-void SimpleListView::resizeEvent(QGraphicsSceneResizeEvent *event)
+void SimpleListView::resizeEvent(QGraphicsSceneResizeEvent *event)
{
Q_D(SimpleListView);
@@ -446,7 +446,7 @@ void SimpleListView::resizeEvent(QGraphicsSceneResizeEvent *event)
}
QSizeF SimpleListView::sizeHint(Qt::SizeHint which, const QSizeF & constraint) const
-{
+{
Q_D(const SimpleListView);
if (which == Qt::PreferredSize)
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/simplelistview.h b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/simplelistview.h
index 57ec90e717..fcc6805a2f 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/simplelistview.h
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/simplelistview.h
@@ -79,7 +79,7 @@ protected:
virtual void scrollContentsBy(qreal dx, qreal dy);
void resizeEvent(QGraphicsSceneResizeEvent *event);
- QSizeF sizeHint(Qt::SizeHint which,
+ QSizeF sizeHint(Qt::SizeHint which,
const QSizeF & constraint) const;
private:
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/themeevent.cpp b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/themeevent.cpp
index 136c7ed5ff..4983c574e1 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/themeevent.cpp
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/themeevent.cpp
@@ -44,10 +44,10 @@
ThemeEvent::ThemeEvent( const QString &newTheme, Type type) : QEvent(type),
m_theme(newTheme)
{
-
+
}
ThemeEvent::~ThemeEvent()
{
-
+
}
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/themeevent.h b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/themeevent.h
index eb94123b54..e48fb5f273 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/themeevent.h
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/themeevent.h
@@ -55,7 +55,7 @@ public:
public:
inline QString getTheme() { return m_theme; }
-
+
private:
QString m_theme;
};
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/topbar.cpp b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/topbar.cpp
index a7a4ad3a3f..9ff6d6d2f1 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/topbar.cpp
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/topbar.cpp
@@ -55,7 +55,7 @@ TopBar::TopBar(QGraphicsView* mainView, QGraphicsWidget* parent) :
m_orientation(TopBar::None), m_topBarPixmap(), m_sizesBlue(), m_sizesLime()
{
setDefaultSizes();
-
+
m_titleFont = Theme::p()->font(Theme::TitleBar);
m_statusFont = Theme::p()->font(Theme::StatusBar);
@@ -71,7 +71,7 @@ void TopBar::resizeEvent(QGraphicsSceneResizeEvent* /*event*/)
//Check orientation
QString topbarName;
QSize mainViewSize = m_mainView->size();
- int rotationAngle = static_cast<MainView*>(m_mainView)->rotationAngle();
+ int rotationAngle = static_cast<MainView*>(m_mainView)->rotationAngle();
if(rotationAngle == 90 || rotationAngle == 270 ) {
int wd = mainViewSize.width();
int ht = mainViewSize.height();
@@ -91,49 +91,49 @@ void TopBar::resizeEvent(QGraphicsSceneResizeEvent* /*event*/)
m_orientation = TopBar::Landscape;
topbarName = "topbar_horisontal.svg";
}
-
+
//Calculate new size, resize by height, don't make it wider than the screen
- QHash<QString, QSize>sizes = (Theme::p()->theme() == Theme::Blue) ?
+ QHash<QString, QSize>sizes = (Theme::p()->theme() == Theme::Blue) ?
m_sizesBlue : m_sizesLime;
-
+
//Get current size for topbarpixmap
- QSize currentSize = !m_topBarPixmap.isNull() && !m_orientationChanged ?
+ QSize currentSize = !m_topBarPixmap.isNull() && !m_orientationChanged ?
m_topBarPixmap.size() : sizes[topbarName];
QSize newSize = !m_orientationChanged ? QSize(currentSize) : sizes[topbarName];
-
+
//Scale according to aspect ratio
newSize.scale(size().toSize(), Qt::KeepAspectRatio);
-
+
//fix width to window widht if previous scaling produced too narrow image
if(newSize.width() < size().width()) {
newSize.scale(size().toSize(), Qt::KeepAspectRatioByExpanding);
}
-
+
//Calculate scaling factor for rest of the graphics scaling
qreal scaleFactor = (newSize.width() *1.0) / (currentSize.width() * 1.0);
-
+
//Scale graphics, if the scalefactor applies
//This is really heavy since the SVG graphics are read again from the resource
if(scaleFactor != 1 || m_topBarPixmap.isNull() ) {
m_topBarPixmap = Theme::p()->pixmap(topbarName, newSize );
- m_topBarUserIcon = Theme::p()->pixmap("user_default_icon.svg",
+ m_topBarUserIcon = Theme::p()->pixmap("user_default_icon.svg",
!m_topBarUserIcon.isNull() && !m_orientationChanged ? m_topBarUserIcon.size()* scaleFactor : sizes["user_default_icon.svg"] * scaleFactor);
-
- m_topBarUserStatus = Theme::p()->pixmap("user_status_online.svg",
+
+ m_topBarUserStatus = Theme::p()->pixmap("user_status_online.svg",
!m_topBarUserStatus.isNull() && !m_orientationChanged ? m_topBarUserStatus.size() * scaleFactor : sizes["user_status_online.svg"] * scaleFactor);
-
- m_topBarStatusBarLeft = Theme::p()->pixmap("status_field_left.svg",
+
+ m_topBarStatusBarLeft = Theme::p()->pixmap("status_field_left.svg",
!m_topBarStatusBarLeft.isNull() && !m_orientationChanged ? m_topBarStatusBarLeft.size()* scaleFactor : sizes["status_field_left.svg"] * scaleFactor);
-
+
m_topBarStatusBarRight = Theme::p()->pixmap("status_field_right.svg",
!m_topBarStatusBarRight.isNull() && !m_orientationChanged ? m_topBarStatusBarRight.size()* scaleFactor : sizes["status_field_right.svg"] * scaleFactor);
-
+
m_topBarStatusBarMiddle = Theme::p()->pixmap("status_field_middle.svg",
!m_topBarStatusBarMiddle.isNull() && !m_orientationChanged ? m_topBarStatusBarMiddle.size() * scaleFactor : QSize(185, sizes["status_field_middle.svg"].height()) * scaleFactor);
-
+
//Update the sizeHint to match the size of the scaled m_topBarPixmap
updateGeometry();
-
+
//Point Update - Positions relative to the Top Bar "Backgroud" size.
//TODO: consider some layout instead of calculating relative locations
QSize topBarPixmapSize = m_topBarPixmap.size();
@@ -141,40 +141,40 @@ void TopBar::resizeEvent(QGraphicsSceneResizeEvent* /*event*/)
QSize topBarUserStatusSize = m_topBarUserStatus.size();
QSize topBarStatusBarLeftSize = m_topBarStatusBarLeft.size();
QSize topBarStatusBarMiddleSize = m_topBarStatusBarMiddle.size();
-
+
//Location for Title text 5% width, 35% height of the background pixmap
- m_topBarTitlePoint = QPoint(topBarPixmapSize.width()* 0.05,
+ m_topBarTitlePoint = QPoint(topBarPixmapSize.width()* 0.05,
topBarPixmapSize.height() * 0.35);
-
+
//User Icon location
//Placing 70% of the width and 10% of the height of the top bar background
m_topBarUserIconPoint = QPoint((topBarPixmapSize.width() * 0.7), (topBarPixmapSize.height() * 0.1));
-
+
//If Blue theme is in use - position user status icon on the right side of the user icon
if(!m_isLimeTheme) {
//Place the status icon on top of the right edge of the user icon, lower it by 35% of the height of the user icon
- m_topBarUserStatusPoint = QPoint( ( (m_topBarUserIconPoint.x()+topBarUserIconSize.width() ) -
- ( topBarUserStatusSize.width()/2 )),
+ m_topBarUserStatusPoint = QPoint( ( (m_topBarUserIconPoint.x()+topBarUserIconSize.width() ) -
+ ( topBarUserStatusSize.width()/2 )),
(m_topBarUserIconPoint.y() + (topBarUserIconSize.height() * 0.35 )));
}
//If Lime theme is in use - position user status icon on the left side of the user icon
else {
//Place the status icon on top of the left side of the user icon, lower it by 50% of the height of the user icon
//and move left by 5% of the icon
- m_topBarUserStatusPoint = QPoint( m_topBarUserIconPoint.x() + ( topBarUserIconSize.width() * 0.05),
+ m_topBarUserStatusPoint = QPoint( m_topBarUserIconPoint.x() + ( topBarUserIconSize.width() * 0.05),
(m_topBarUserIconPoint.y() + (topBarUserIconSize.height() * 0.5 )));
}
-
+
//Status bar
//Placing the left side of the status bar 5% of the width, 50% of the height of the top bar background
//Set the text baseline 80% of the height of the status bar
- m_topBarStatusBarLeftPoint = QPoint( (topBarPixmapSize.width()* 0.05),
+ m_topBarStatusBarLeftPoint = QPoint( (topBarPixmapSize.width()* 0.05),
(topBarPixmapSize.height() * 0.5));
- m_topBarStatusBarMiddlePoint = QPoint( (m_topBarStatusBarLeftPoint.x() + topBarStatusBarLeftSize.width()),
+ m_topBarStatusBarMiddlePoint = QPoint( (m_topBarStatusBarLeftPoint.x() + topBarStatusBarLeftSize.width()),
(m_topBarStatusBarLeftPoint.y()));
- m_topBarStatusBarRightPoint = QPoint( (m_topBarStatusBarMiddlePoint.x() + topBarStatusBarMiddleSize.width()),
+ m_topBarStatusBarRightPoint = QPoint( (m_topBarStatusBarMiddlePoint.x() + topBarStatusBarMiddleSize.width()),
(m_topBarStatusBarMiddlePoint.y() ) );
- m_topBarStatusBarTextPoint = QPoint(m_topBarStatusBarMiddlePoint.x(),
+ m_topBarStatusBarTextPoint = QPoint(m_topBarStatusBarMiddlePoint.x(),
m_topBarStatusBarMiddlePoint.y() + (topBarStatusBarMiddleSize.height()*0.8) );
} //if scalefactor
}
@@ -183,18 +183,18 @@ void TopBar::paint( QPainter *painter, const QStyleOptionGraphicsItem *option, Q
{
//Topbar background
painter->drawPixmap(option->exposedRect, m_topBarPixmap, option->exposedRect);
-
+
//User Icon
painter->drawPixmap(m_topBarUserIconPoint, m_topBarUserIcon);
-
+
//User Status
painter->drawPixmap(m_topBarUserStatusPoint, m_topBarUserStatus);
-
+
//Status bar
painter->drawPixmap(m_topBarStatusBarLeftPoint, m_topBarStatusBarLeft);
painter->drawPixmap(m_topBarStatusBarMiddlePoint, m_topBarStatusBarMiddle);
painter->drawPixmap(m_topBarStatusBarRightPoint, m_topBarStatusBarRight);
-
+
//Title text
painter->save();
painter->setFont(m_titleFont);
@@ -210,14 +210,14 @@ void TopBar::paint( QPainter *painter, const QStyleOptionGraphicsItem *option, Q
QRectF TopBar::boundingRect() const
{
- //It's possible that m_topBarPixmap is not allocated yet,
+ //It's possible that m_topBarPixmap is not allocated yet,
//in this case default size is used for setting boundingRect
- QHash<QString, QSize>sizes = (Theme::p()->theme() == Theme::Blue) ?
- m_sizesBlue : m_sizesLime;
-
- if(!m_topBarPixmap.isNull())
+ QHash<QString, QSize>sizes = (Theme::p()->theme() == Theme::Blue) ?
+ m_sizesBlue : m_sizesLime;
+
+ if (!m_topBarPixmap.isNull())
return QRectF(0, 0, m_topBarPixmap.size().width(), m_topBarPixmap.size().height());
- else
+ else
return QRectF(0, 0, sizes["topbar.svg"].width(), sizes["topbar.svg"].height());
}
@@ -227,95 +227,95 @@ void TopBar::themeChange()
m_statusFont = Theme::p()->font(Theme::StatusBar);
//Calculate the scaling factor
- QHash<QString, QSize>sizes = (Theme::p()->theme() == Theme::Blue) ?
+ QHash<QString, QSize>sizes = (Theme::p()->theme() == Theme::Blue) ?
m_sizesBlue : m_sizesLime;
-
- QString topbarString= m_orientation == TopBar::Portrait ?
+
+ QString topbarString= m_orientation == TopBar::Portrait ?
"topbar.svg" : "topbar_horisontal.svg";
-
+
QSize topBarSize = sizes[topbarString];
QSize newSize = QSize(topBarSize);
-
+
//Scale according to aspect ratio
newSize.scale(size().toSize(), Qt::KeepAspectRatio);
-
+
//fix width to window widht if previous scaling produced too narrow image
if(newSize.width() < size().width()) {
newSize.scale(size().toSize(), Qt::KeepAspectRatioByExpanding);
}
-
+
//Calculate scaling factor for rest of the graphics scaling
qreal scaleFactor = (newSize.width() *1.0) / (topBarSize.width() * 1.0);
//Background
m_topBarPixmap = Theme::p()->pixmap(topbarString, sizes[topbarString] * scaleFactor);
-
+
//User Icon
m_topBarUserIcon = Theme::p()->pixmap("user_default_icon.svg", sizes["user_default_icon.svg"] * scaleFactor);
-
+
//User Status
- m_topBarUserStatus = Theme::p()->pixmap("user_status_online.svg", sizes["user_status_online.svg"] * scaleFactor);
-
- //Status Bar
+ m_topBarUserStatus = Theme::p()->pixmap("user_status_online.svg", sizes["user_status_online.svg"] * scaleFactor);
+
+ //Status Bar
m_topBarStatusBarLeft = Theme::p()->pixmap("status_field_left.svg", sizes["status_field_left.svg"] * scaleFactor);
m_topBarStatusBarRight = Theme::p()->pixmap("status_field_right.svg", sizes["status_field_right.svg"] * scaleFactor);
- m_topBarStatusBarMiddle = Theme::p()->pixmap("status_field_middle.svg",
+ m_topBarStatusBarMiddle = Theme::p()->pixmap("status_field_middle.svg",
QSize(185, sizes["status_field_middle.svg"].height())* scaleFactor);
-
+
//Update Drawing points for Top Bar elements, points are relative to the top bar background size
QSize topBarPixmapSize = m_topBarPixmap.size();
QSize topBarUserIconSize = m_topBarUserIcon.size();
QSize topBarUserStatusSize = m_topBarUserStatus.size();
QSize topBarStatusBarLeftSize = m_topBarStatusBarLeft.size();
- QSize topBarStatusBarMiddleSize = m_topBarStatusBarMiddle.size();
-
+ QSize topBarStatusBarMiddleSize = m_topBarStatusBarMiddle.size();
+
//Theme Check
(Theme::p()->theme() == Theme::Lime) ? m_isLimeTheme = true : m_isLimeTheme = false;
-
+
//User Icon location
//Placing 70% of the width and 10% of the height of the top bar background
m_topBarUserIconPoint = QPoint((0.7*topBarPixmapSize.width()), (0.1*topBarPixmapSize.height()));
-
+
//If Blue theme is in use - position user status icon on the right side of the user icon
if(!m_isLimeTheme) {
//Place the status icon on top of the right edge of the user icon, lower it by 35% of the height of the user icon
- m_topBarUserStatusPoint = QPoint( ( (m_topBarUserIconPoint.x()+topBarUserIconSize.width() ) - ( topBarUserStatusSize.width()/2 )),
+ m_topBarUserStatusPoint = QPoint( ( (m_topBarUserIconPoint.x()+topBarUserIconSize.width() ) - ( topBarUserStatusSize.width()/2 )),
(m_topBarUserIconPoint.y() + (topBarUserIconSize.height() * 0.35 )));
}
//If Lime theme is in use - position user status icon on the left side of the user icon
else {
//Place the status icon on top of the left side of the user icon, lower it by 50% of the height of the user icon
//and move left by 5% of the icon
- m_topBarUserStatusPoint = QPoint( m_topBarUserIconPoint.x() + ( topBarUserIconSize.width() * 0.05),
+ m_topBarUserStatusPoint = QPoint( m_topBarUserIconPoint.x() + ( topBarUserIconSize.width() * 0.05),
(m_topBarUserIconPoint.y() + (topBarUserIconSize.height() * 0.5 )));
}
-
+
//Status bar
//Placing the left side of the status bar 5% of the width, 50% of the height of the top bar background
//Set the text baseline 80% of the height of the status bar
- m_topBarStatusBarLeftPoint = QPoint( (topBarPixmapSize.width()* 0.05),
+ m_topBarStatusBarLeftPoint = QPoint( (topBarPixmapSize.width()* 0.05),
(topBarPixmapSize.height() * 0.5));
- m_topBarStatusBarMiddlePoint = QPoint( (m_topBarStatusBarLeftPoint.x() + topBarStatusBarLeftSize.width()),
+ m_topBarStatusBarMiddlePoint = QPoint( (m_topBarStatusBarLeftPoint.x() + topBarStatusBarLeftSize.width()),
(m_topBarStatusBarLeftPoint.y()));
- m_topBarStatusBarRightPoint = QPoint( (m_topBarStatusBarMiddlePoint.x() + topBarStatusBarMiddleSize.width()),
+ m_topBarStatusBarRightPoint = QPoint( (m_topBarStatusBarMiddlePoint.x() + topBarStatusBarMiddleSize.width()),
(m_topBarStatusBarMiddlePoint.y() ) );
- m_topBarStatusBarTextPoint = QPoint(m_topBarStatusBarMiddlePoint.x(),
+ m_topBarStatusBarTextPoint = QPoint(m_topBarStatusBarMiddlePoint.x(),
m_topBarStatusBarMiddlePoint.y() + (topBarStatusBarMiddleSize.height()*0.8) );
-
+
update();
}
-QSizeF TopBar::sizeHint(Qt::SizeHint which,
- const QSizeF &constraint) const
+QSizeF TopBar::sizeHint(Qt::SizeHint which,
+ const QSizeF &constraint) const
{
- //It's possible that m_topBarPixmap is not allocated yet,
+ //It's possible that m_topBarPixmap is not allocated yet,
//in this case default size is used for setting size hint
- QHash<QString, QSize>sizes = (Theme::p()->theme() == Theme::Blue) ?
- m_sizesBlue : m_sizesLime;
-
- int height = !m_topBarPixmap.isNull() ?
- m_topBarPixmap.height() : sizes["topbar.svg"].height();
-
+ QHash<QString, QSize>sizes = (Theme::p()->theme() == Theme::Blue) ?
+ m_sizesBlue : m_sizesLime;
+
+ int height = !m_topBarPixmap.isNull() ?
+ m_topBarPixmap.height() : sizes["topbar.svg"].height();
+
switch (which)
{
case Qt::MinimumSize:
@@ -330,7 +330,7 @@ QSizeF TopBar::sizeHint(Qt::SizeHint which,
}
void TopBar::setDefaultSizes()
-{
+{
m_sizesBlue["topbar.svg"] = QSize(356,96);
m_sizesBlue["topbar_horisontal.svg"] = QSize(636,96);
m_sizesBlue["user_default_icon.svg"] = QSize(68,68);
@@ -338,7 +338,7 @@ void TopBar::setDefaultSizes()
m_sizesBlue["status_field_left.svg"] = QSize(14,24);
m_sizesBlue["status_field_right.svg"] = QSize(10,24);
m_sizesBlue["status_field_middle.svg"] = QSize(14,24);
-
+
m_sizesLime["topbar.svg"] = QSize(356,96);
m_sizesLime["topbar_horisontal.svg"] = QSize(636,96);
m_sizesLime["user_default_icon.svg"] = QSize(84,68);
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/topbar.h b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/topbar.h
index dabffa9d06..808064d04d 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/topbar.h
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/topbar.h
@@ -55,7 +55,7 @@ class QFont;
class TopBar : public GvbWidget
{
Q_OBJECT
-
+
public:
enum Orientation
{
@@ -63,33 +63,34 @@ public:
Landscape,
None
};
-
+
public:
TopBar(QGraphicsView* mainView, QGraphicsWidget* parent);
~TopBar();
-
+
public:
void paint( QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0 );
QRectF boundingRect() const;
void resizeEvent(QGraphicsSceneResizeEvent *event);
- inline QPoint getStatusBarLocation() { return m_topBarStatusBarMiddlePoint +
- m_topBarStatusBarMiddle.rect().bottomLeft(); }
-
+ inline QPoint getStatusBarLocation()
+ {
+ return m_topBarStatusBarMiddlePoint + m_topBarStatusBarMiddle.rect().bottomLeft();
+ }
+
public slots:
void themeChange();
-
+
protected:
void mousePressEvent(QGraphicsSceneMouseEvent *event);
-
+
signals:
void clicked(bool checked = false);
-
+
private:
- QSizeF sizeHint(Qt::SizeHint which,
+ QSizeF sizeHint(Qt::SizeHint which,
const QSizeF &constraint = QSizeF()) const;
void setDefaultSizes();
-
-
+
private:
Q_DISABLE_COPY(TopBar)
@@ -100,7 +101,7 @@ private:
//Fonts
QFont m_titleFont;
QFont m_statusFont;
-
+
//Pixmaps
QPixmap m_topBarPixmap;
QPixmap m_topBarUserIcon;
@@ -108,7 +109,7 @@ private:
QPixmap m_topBarStatusBarLeft;
QPixmap m_topBarStatusBarRight;
QPixmap m_topBarStatusBarMiddle;
-
+
//Drawing points
QPoint m_topBarUserIconPoint;
QPoint m_topBarUserStatusPoint;
@@ -117,7 +118,7 @@ private:
QPoint m_topBarStatusBarMiddlePoint;
QPoint m_topBarStatusBarTextPoint;
QPoint m_topBarTitlePoint;
-
+
//Sizes
QHash<QString, QSize> m_sizesBlue;
QHash<QString, QSize> m_sizesLime;
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/webview.cpp b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/webview.cpp
index 0883580d70..4fee19230d 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/webview.cpp
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/webview.cpp
@@ -46,7 +46,7 @@
static const int MotionEndWaitTime = 2000;
static const int TileSideLength = 128;
-WebViewPrivate::WebViewPrivate(WebView *w)
+WebViewPrivate::WebViewPrivate(WebView *w)
: q(w)
, cache(0)
{
@@ -56,14 +56,14 @@ WebViewPrivate::WebViewPrivate(WebView *w)
web->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
web->page()->mainFrame()->setScrollBarPolicy(
- Qt::Horizontal, Qt::ScrollBarAlwaysOff);
+ Qt::Horizontal, Qt::ScrollBarAlwaysOff);
web->page()->mainFrame()->setScrollBarPolicy(
Qt::Vertical, Qt::ScrollBarAlwaysOff);
web->setZValue(3);
// cache = new WebViewCache(web);
// web->setGraphicsEffect(cache);
-
+
adjustSize();
}
@@ -85,9 +85,8 @@ void WebViewPrivate::adjustSize()
q->horizontalScrollBar()->setSliderSize(w);
else
q->horizontalScrollBar()->setSliderSize(0.0);
-
- if (h > q->viewport()->boundingRect().height())
+ if (h > q->viewport()->boundingRect().height())
q->verticalScrollBar()->setSliderSize(h);
else
q->verticalScrollBar()->setSliderSize(0.0);
@@ -116,7 +115,7 @@ void WebViewPrivate::_q_loadFinished(bool ok)
void WebViewPrivate::_q_viewportChanged(QGraphicsWidget* viewport)
{
web->setParentItem(viewport);
- viewport->setFlag(QGraphicsItem::ItemClipsChildrenToShape,
+ viewport->setFlag(QGraphicsItem::ItemClipsChildrenToShape,
true);
adjustSize();
}
@@ -131,7 +130,6 @@ void WebViewPrivate::_q_motionEnded()
WebViewCache::WebViewCache(QGraphicsWebView *webView)
: m_webView(webView)
{
-
}
WebViewCache::~WebViewCache()
@@ -178,8 +176,8 @@ void WebViewCache::draw(QPainter * painter, QGraphicsEffectSource * source)
for (int j = 0; j < tilesY; j++) {
int x = i * TileSideLength;
int y = j * TileSideLength;
-
- m_tileRects[i + j * tilesX]
+
+ m_tileRects[i + j * tilesX]
= QRectF(x, y, TileSideLength, TileSideLength);
}
}
@@ -205,13 +203,13 @@ void WebViewCache::draw(QPainter * painter, QGraphicsEffectSource * source)
QWebFrame *webFrame = m_webView->page()->mainFrame();
- QPainter tilePainter(&tilePixmap);
+ QPainter tilePainter(&tilePixmap);
tilePainter.translate(-m_tileRects[i].left(), -m_tileRects[i].top());
webFrame->render(&tilePainter, m_tileRects[i].toRect());
tilePainter.end();
m_tilePixmaps[i] = QPixmapCache::insert(tilePixmap);
- }
+ }
tileRect = tileRect.translated(-itemPos);
@@ -233,7 +231,7 @@ WebView::WebView(QGraphicsWidget *parent)
this, SLOT(_q_loadFinished(bool)));
connect(this, SIGNAL(viewportChanged(QGraphicsWidget*)),
this, SLOT(_q_viewportChanged(QGraphicsWidget*)));
- connect(&d->motionTimer, SIGNAL(timeout()),
+ connect(&d->motionTimer, SIGNAL(timeout()),
this, SLOT(_q_motionEnded()));
}
@@ -272,21 +270,21 @@ void WebView::scrollContentsBy(qreal dx, qreal dy)
if (x < minx)
x = minx;
- else if (x > 0)
+ else if (x > 0)
x = 0.0;
qreal y = d->web->pos().y() - dy;
if (y < miny)
y = miny;
- else if (y > 0)
+ else if (y > 0)
y = 0.0;
d->web->setPos(x, y);
}
QSizeF WebView::sizeHint(Qt::SizeHint which, const QSizeF & constraint) const
-{
+{
if (which == Qt::PreferredSize) {
QSizeF contentSize = d->web->page()->mainFrame()->contentsSize();
return contentSize;
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/webview_p.h b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/webview_p.h
index ded7df7f60..a1391cc125 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/webview_p.h
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/webview_p.h
@@ -71,7 +71,7 @@ public:
QTimer motionTimer;
};
-class WebViewCache : public QGraphicsEffect
+class WebViewCache : public QGraphicsEffect
{
Q_OBJECT
diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/main.cpp b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/main.cpp
index 7394a9410e..e8b6388941 100644
--- a/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/main.cpp
+++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/main.cpp
@@ -51,7 +51,7 @@ int main(int argc, char **argv)
app.setAttribute(Qt::AA_DontCreateNativeWidgetSiblings);
MainWindow window;
- window.show();
+ window.show();
return app.exec();
}
diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/mainwindow.h b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/mainwindow.h
index ed3d74919d..74c1fedfac 100644
--- a/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/mainwindow.h
+++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/mainwindow.h
@@ -55,7 +55,7 @@ class MainWindow : public QWidget
Q_OBJECT
public:
MainWindow(QWidget *parent = 0);
-
+
private:
void setupMatrix();
void populateScene();
diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/view.h b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/view.h
index 3fac23ede0..db2f219222 100644
--- a/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/view.h
+++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/view.h
@@ -71,7 +71,7 @@ private slots:
void rotateRight();
void timerEvent(QTimerEvent *);
-
+
private:
QGraphicsView *graphicsView;
QLabel *label;
diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chiptester.h b/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chiptester.h
index 711eb833f6..4e5b436f8d 100644
--- a/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chiptester.h
+++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chiptester.h
@@ -62,7 +62,7 @@ public:
Translate
};
ChipTester(QWidget *parent = 0);
-
+
void setAntialias(bool enabled);
void setOpenGL(bool enabled);
void runBenchmark();
@@ -75,7 +75,7 @@ protected:
private:
void populateScene();
- QGraphicsView *view;
+ QGraphicsView *view;
QGraphicsScene *scene;
int npaints;
int timerId;
diff --git a/tests/benchmarks/gui/image/blendbench/main.cpp b/tests/benchmarks/gui/image/blendbench/main.cpp
index 1d8aa60394..3e912e83b3 100644
--- a/tests/benchmarks/gui/image/blendbench/main.cpp
+++ b/tests/benchmarks/gui/image/blendbench/main.cpp
@@ -100,7 +100,7 @@ QLatin1String brushTypes[] = {
class BlendBench : public QObject
{
Q_OBJECT
-private slots:
+private slots:
void blendBench_data();
void blendBench();
diff --git a/tests/benchmarks/gui/image/qimagereader/images/black.xpm b/tests/benchmarks/gui/image/qimagereader/images/black.xpm
index d7925bf211..4a1f4ec861 100644
--- a/tests/benchmarks/gui/image/qimagereader/images/black.xpm
+++ b/tests/benchmarks/gui/image/qimagereader/images/black.xpm
@@ -15,21 +15,21 @@ static char * ddd_xpm[] = {
"+ c white m white g white g4 white s Light ",
"* c DarkGreen m black g grey25 g4 grey25 s Eye ",
/* Pixels */
-" . . ",
-" . .. ",
-" . . ",
-" .. . ",
-" .. .. .. ",
-" .. . . . ",
-" . . . . .. ",
-" . .X. . ",
-" . *.X.* .. ",
-" .. .. .XXX. .. ... ",
-" . .X...XXX...X. . ",
-" .. ..XXX.XXX.XXX. .. ",
-" .....XXXX...XXXX. . ",
-" .. ..XXXXXXXXX.. .. ",
-" ...XXXXXXX..... ",
+" . . ",
+" . .. ",
+" . . ",
+" .. . ",
+" .. .. .. ",
+" .. . . . ",
+" . . . . .. ",
+" . .X. . ",
+" . *.X.* .. ",
+" .. .. .XXX. .. ... ",
+" . .X...XXX...X. . ",
+" .. ..XXX.XXX.XXX. .. ",
+" .....XXXX...XXXX. . ",
+" .. ..XXXXXXXXX.. .. ",
+" ...XXXXXXX..... ",
" ......... ",
" .XXXXXXX. ",
" .....XXX..... ",
diff --git a/tests/benchmarks/gui/itemviews/qtableview/tst_qtableview.cpp b/tests/benchmarks/gui/itemviews/qtableview/tst_qtableview.cpp
index 07ee8b7804..c32ff0d099 100644
--- a/tests/benchmarks/gui/itemviews/qtableview/tst_qtableview.cpp
+++ b/tests/benchmarks/gui/itemviews/qtableview/tst_qtableview.cpp
@@ -174,7 +174,7 @@ void tst_QTableView::spanInit_helper(QTableView *view)
for (int i=0; i < 40; i++) {
view->setSpan(1+i%2, 1+4*i, 1+i%3, 2);
}
-
+
for (int i=1; i < 40; i++) {
view->setSpan(6 + i*7, 4, 4, 50);
}
@@ -185,7 +185,7 @@ void tst_QTableView::spanInit()
QtTestTableModel model(500, 500);
QTableView v;
v.setModel(&model);
-
+
QBENCHMARK {
spanInit_helper(&v);
}
@@ -196,7 +196,7 @@ void tst_QTableView::spanDraw()
QtTestTableModel model(500, 500);
QTableView v;
v.setModel(&model);
-
+
spanInit_helper(&v);
v.show();
v.resize(500,500);
@@ -214,11 +214,11 @@ void tst_QTableView::spanSelectAll()
QtTestTableModel model(500, 500);
QTableView v;
v.setModel(&model);
-
+
spanInit_helper(&v);
v.show();
QTest::qWait(30);
-
+
QBENCHMARK {
v.selectAll();
}
@@ -229,11 +229,11 @@ void tst_QTableView::spanSelectColumn()
QtTestTableModel model(500, 500);
QTableView v;
v.setModel(&model);
-
+
spanInit_helper(&v);
v.show();
QTest::qWait(30);
-
+
QBENCHMARK {
v.selectColumn(22);
}
diff --git a/tests/benchmarks/gui/painting/qtbench/benchmarktests.h b/tests/benchmarks/gui/painting/qtbench/benchmarktests.h
index 9c0e149ec5..0413290b21 100644
--- a/tests/benchmarks/gui/painting/qtbench/benchmarktests.h
+++ b/tests/benchmarks/gui/painting/qtbench/benchmarktests.h
@@ -487,7 +487,7 @@ public:
m_pixmaps.clear();
m_currentPixmap = 0;
QRect m_bounds = QRect(0,0,p->device()->width(), p->device()->height());
- switch (m_mode) {
+ switch (m_mode) {
case PainterMode:
m_size = (p->boundingRect(m_bounds, 0, m_text)).size();
// m_rect = m_rect.translated(-m_rect.topLeft());
diff --git a/tests/benchmarks/gui/text/qtext/main.cpp b/tests/benchmarks/gui/text/qtext/main.cpp
index 3a7d406777..e7e22f0e65 100644
--- a/tests/benchmarks/gui/text/qtext/main.cpp
+++ b/tests/benchmarks/gui/text/qtext/main.cpp
@@ -291,7 +291,7 @@ void tst_QText::fontResolution()
font.setFamily("DejaVu");
font2.setBold(true);
- QBENCHMARK {
+ QBENCHMARK {
QFont res = font.resolve(font2);
}
}
diff --git a/tests/manual/bearerex/bearerex.cpp b/tests/manual/bearerex/bearerex.cpp
index 4417253930..185dbe123e 100644
--- a/tests/manual/bearerex/bearerex.cpp
+++ b/tests/manual/bearerex/bearerex.cpp
@@ -49,9 +49,9 @@ BearerEx::BearerEx(QWidget* parent)
: QMainWindow(parent)
{
setupUi(this);
-
+
createMenus();
-
+
connect(&m_NetworkConfigurationManager, SIGNAL(updateCompleted()), this, SLOT(configurationsUpdateCompleted()));
connect(&m_NetworkConfigurationManager, SIGNAL(configurationAdded(QNetworkConfiguration)),
this, SLOT(configurationAdded(QNetworkConfiguration)));
@@ -79,19 +79,19 @@ void BearerEx::showConfigurations()
{
listWidget->clear();
QListWidgetItem* listItem;
-
+
QNetworkConfiguration defaultConfig = m_NetworkConfigurationManager.defaultConfiguration();
if (defaultConfig.type() == QNetworkConfiguration::UserChoice) {
listItem = new QListWidgetItem();
QFont font = listItem->font();
font.setBold(true);
font.setUnderline(true);
- listItem->setFont(font);
+ listItem->setFont(font);
listItem->setText(" UserChoice");
listItem->setData(Qt::UserRole, QVariant::fromValue(defaultConfig));
listWidget->addItem(listItem);
}
-
+
QList<QNetworkConfiguration> configurations = m_NetworkConfigurationManager.allConfigurations();
for (int i=0; i<configurations.count(); i++)
{
@@ -102,7 +102,7 @@ void BearerEx::showConfigurations()
} else if (configurations[i].type() == QNetworkConfiguration::ServiceNetwork) {
text.append("(SNAP,");
}
-
+
if ((configurations[i].state() & QNetworkConfiguration::Active) == QNetworkConfiguration::Active) {
text.append("Act) ");
} else if ((configurations[i].state() & QNetworkConfiguration::Discovered) == QNetworkConfiguration::Discovered) {
@@ -111,12 +111,12 @@ void BearerEx::showConfigurations()
text.append("Def) ");
}
text.append(configurations[i].name());
-
+
if (defaultConfig.isValid() && defaultConfig == configurations[i]) {
QFont font = listItem->font();
font.setBold(true);
font.setUnderline(true);
- listItem->setFont(font);
+ listItem->setFont(font);
}
listItem->setText(text);
listItem->setData(Qt::UserRole, QVariant::fromValue(configurations[i]));
@@ -151,7 +151,7 @@ void BearerEx::on_createSessionButton_clicked()
QListWidgetItem* item = listWidget->currentItem();
if (!item) {
return;
- }
+ }
QNetworkConfiguration networkConfiguration = qvariant_cast<QNetworkConfiguration>(item->data(Qt::UserRole));
int newTabIndex = mainTabWidget->count();
SessionTab* newTab = new SessionTab(&networkConfiguration,&m_NetworkConfigurationManager,eventListWidget,newTabIndex-1);
@@ -184,7 +184,7 @@ void BearerEx::onlineStateChanged(bool isOnline)
QListWidgetItem* listItem = new QListWidgetItem();
QFont font = listItem->font();
font.setBold(true);
- listItem->setFont(font);
+ listItem->setFont(font);
if (isOnline) {
listItem->setText(QString("> Online"));
} else {
@@ -231,7 +231,7 @@ DetailedInfoDialog::DetailedInfoDialog(QNetworkConfiguration* apNetworkConfigura
tableWidget->setColumnCount(2);
int rowCount = 2;
-
+
if (apNetworkConfiguration->type() == QNetworkConfiguration::ServiceNetwork) {
rowCount = rowCount + apNetworkConfiguration->children().count();
}
@@ -274,7 +274,7 @@ SessionTab::SessionTab(QNetworkConfiguration* apNetworkConfiguration,
connect(m_NetworkSession, SIGNAL(opened()), this, SLOT(opened()));
connect(m_NetworkSession, SIGNAL(closed()), this, SLOT(closed()));
connect(m_NetworkSession, SIGNAL(error(QNetworkSession::SessionError)), this, SLOT(error(QNetworkSession::SessionError)));
-
+
if (apNetworkConfiguration->type() == QNetworkConfiguration::InternetAccessPoint) {
snapLabel->hide();
snapLineEdit->hide();
@@ -342,7 +342,7 @@ void SessionTab::on_openSessionButton_clicked()
{
m_NetworkSession->open();
if (m_NetworkSession->isOpen()) {
- newState(m_NetworkSession->state());
+ newState(m_NetworkSession->state());
}
}
@@ -350,7 +350,7 @@ void SessionTab::on_closeSessionButton_clicked()
{
m_NetworkSession->close();
if (!m_NetworkSession->isOpen()) {
- newState(m_NetworkSession->state());
+ newState(m_NetworkSession->state());
}
}
@@ -414,10 +414,10 @@ void SessionTab::opened()
QListWidgetItem* listItem = new QListWidgetItem();
QFont font = listItem->font();
font.setBold(true);
- listItem->setFont(font);
+ listItem->setFont(font);
listItem->setText(QString("S")+QString::number(m_index)+QString(" - ")+QString("Opened"));
m_eventListWidget->addItem(listItem);
-
+
QVariant identifier = m_NetworkSession->sessionProperty("ActiveConfiguration");
if (!identifier.isNull()) {
QString configId = identifier.toString();
@@ -445,7 +445,7 @@ void SessionTab::closed()
QListWidgetItem* listItem = new QListWidgetItem();
QFont font = listItem->font();
font.setBold(true);
- listItem->setFont(font);
+ listItem->setFont(font);
listItem->setText(QString("S")+QString::number(m_index)+QString(" - ")+QString("Closed"));
m_eventListWidget->addItem(listItem);
}
@@ -492,10 +492,10 @@ void SessionTab::on_dataObjectChanged(const QString &newObjectType)
}
-void SessionTab::stateChanged(QNetworkSession::State state)
+void SessionTab::stateChanged(QNetworkSession::State state)
{
newState(state);
-
+
QListWidgetItem* listItem = new QListWidgetItem();
listItem->setText(QString("S")+QString::number(m_index)+QString(" - ")+stateString(state));
m_eventListWidget->addItem(listItem);
@@ -527,7 +527,7 @@ void SessionTab::error(QNetworkSession::SessionError error)
QListWidgetItem* listItem = new QListWidgetItem();
QMessageBox msgBox;
msgBox.setStandardButtons(QMessageBox::Close);
-
+
QString errorString;
switch (error)
{
@@ -549,7 +549,7 @@ void SessionTab::error(QNetworkSession::SessionError error)
}
listItem->setText(QString("S")+QString::number(m_index)+QString(" - ")+errorString);
m_eventListWidget->addItem(listItem);
-
+
msgBox.setText(errorString);
msgBox.exec();
}
diff --git a/tests/manual/bearerex/bearerex.h b/tests/manual/bearerex/bearerex.h
index 5ec2e17060..8de2b1d41d 100644
--- a/tests/manual/bearerex/bearerex.h
+++ b/tests/manual/bearerex/bearerex.h
@@ -88,7 +88,7 @@ private Q_SLOTS:
void configurationAdded(const QNetworkConfiguration& config);
void configurationRemoved(const QNetworkConfiguration& config);
void onlineStateChanged(bool isOnline);
- void configurationChanged(const QNetworkConfiguration & config);
+ void configurationChanged(const QNetworkConfiguration & config);
private:
QNetworkConfigurationManager m_NetworkConfigurationManager;
@@ -112,8 +112,8 @@ public:
SessionTab(QNetworkConfiguration* apNetworkConfiguration = 0, QNetworkConfigurationManager* configManager = 0,
QListWidget* eventListWidget = 0, int index = 0, BearerEx* parent = 0);
~SessionTab();
-
- QString stateString(QNetworkSession::State state);
+
+ QString stateString(QNetworkSession::State state);
private Q_SLOTS:
void on_createQNetworkAccessManagerButton_clicked();
@@ -125,7 +125,7 @@ private Q_SLOTS:
void on_dataObjectChanged(const QString& newObjectType);
void on_alrButton_clicked();
void finished(quint32 errorCode, qint64 dataReceived, QString errorType);
-
+
void newConfigurationActivated();
void preferredConfigurationChanged(const QNetworkConfiguration& config, bool isSeamless);
void stateChanged(QNetworkSession::State state);
diff --git a/tests/manual/bearerex/xqlistwidget.cpp b/tests/manual/bearerex/xqlistwidget.cpp
index 556d9e400f..cb03f6e9bf 100644
--- a/tests/manual/bearerex/xqlistwidget.cpp
+++ b/tests/manual/bearerex/xqlistwidget.cpp
@@ -42,7 +42,7 @@
#include "xqlistwidget.h"
XQListWidget::XQListWidget(QWidget* parent) : QListWidget(parent)
-{
+{
}
void XQListWidget::keyPressEvent(QKeyEvent* event)
@@ -59,7 +59,7 @@ void XQListWidget::keyPressEvent(QKeyEvent* event)
focusNextChild();
break;
}
- default:
+ default:
{
QListWidget::keyPressEvent(event);
}
diff --git a/tests/manual/bearerex/xqlistwidget.h b/tests/manual/bearerex/xqlistwidget.h
index b23dfb5735..80aecceb0b 100644
--- a/tests/manual/bearerex/xqlistwidget.h
+++ b/tests/manual/bearerex/xqlistwidget.h
@@ -48,8 +48,8 @@
class XQListWidget: public QListWidget
{
public:
- XQListWidget(QWidget* parent = 0);
-
+ XQListWidget(QWidget* parent = 0);
+
protected:
void keyPressEvent(QKeyEvent* event);
};
diff --git a/tests/manual/inputmethodhints/inputmethodhints.h b/tests/manual/inputmethodhints/inputmethodhints.h
index 09c6ca41f5..ce1724280f 100644
--- a/tests/manual/inputmethodhints/inputmethodhints.h
+++ b/tests/manual/inputmethodhints/inputmethodhints.h
@@ -52,7 +52,7 @@ class inputmethodhints : public QMainWindow
public:
inputmethodhints(QWidget *parent = 0);
~inputmethodhints();
-
+
public slots:
void checkboxChanged(int);
diff --git a/tests/manual/qcursor/grab_override/mainwindow.h b/tests/manual/qcursor/grab_override/mainwindow.h
index c105e22850..eaf4b95615 100644
--- a/tests/manual/qcursor/grab_override/mainwindow.h
+++ b/tests/manual/qcursor/grab_override/mainwindow.h
@@ -64,11 +64,11 @@ private slots:
private:
void keyPressEvent(QKeyEvent* event);
-
+
Ui::MainWindow *ui;
QTimer *timer;
int override;
-
+
QCursor ccurs;
QCursor bcurs;
};
diff --git a/tests/manual/qtouchevent/touchwidget.cpp b/tests/manual/qtouchevent/touchwidget.cpp
index 68206aad22..e2834203f7 100644
--- a/tests/manual/qtouchevent/touchwidget.cpp
+++ b/tests/manual/qtouchevent/touchwidget.cpp
@@ -122,7 +122,7 @@ bool TouchWidget::event(QEvent *event)
case QEvent::MouseButtonRelease:
seenMouseRelease = true;
if (closeWindowOnMouseRelease)
- window()->close();
+ window()->close();
if (acceptMouseRelease) {
event->accept();
return true;
diff --git a/tests/manual/repaint/mainwindow/main.cpp b/tests/manual/repaint/mainwindow/main.cpp
index 173f81de06..eb3096a59c 100644
--- a/tests/manual/repaint/mainwindow/main.cpp
+++ b/tests/manual/repaint/mainwindow/main.cpp
@@ -47,16 +47,16 @@ int main(int argc, char **argv)
QApplication app(argc, argv);
QMainWindow mainWindow;
-
+
mainWindow.setCentralWidget(new StaticWidget());
mainWindow.setStatusBar(new QStatusBar());
-
+
QDockWidget *dockWidget = new QDockWidget();
dockWidget->setWidget(new StaticWidget());
mainWindow.addDockWidget(Qt::LeftDockWidgetArea, dockWidget);
-
+
QToolBar *toolBar = new QToolBar();
-
+
toolBar->addWidget(new StaticWidget())->setVisible(true);;
toolBar->addWidget(new QSpinBox())->setVisible(true);;
@@ -64,6 +64,6 @@ int main(int argc, char **argv)
mainWindow.resize(600, 400);
mainWindow.show();
-
+
return app.exec();
}
diff --git a/tests/manual/repaint/scrollarea/main.cpp b/tests/manual/repaint/scrollarea/main.cpp
index 44b43c30f7..6102ab8ee8 100644
--- a/tests/manual/repaint/scrollarea/main.cpp
+++ b/tests/manual/repaint/scrollarea/main.cpp
@@ -42,7 +42,6 @@
#include <QtWidgets>
#include "../shared/shared.h"
-
int main(int argc, char **argv)
{
QApplication app(argc, argv);
@@ -57,8 +56,7 @@ int main(int argc, char **argv)
scrollView.resize(600, 400);
scrollView.show();
-
-
+
return app.exec();
}
diff --git a/tests/manual/repaint/splitter/main.cpp b/tests/manual/repaint/splitter/main.cpp
index 5ee1e19402..2c01053ae1 100644
--- a/tests/manual/repaint/splitter/main.cpp
+++ b/tests/manual/repaint/splitter/main.cpp
@@ -53,6 +53,6 @@ int main(int argc, char **argv)
splitter.resize(600, 400);
splitter.show();
-
+
return app.exec();
}
diff --git a/tests/manual/repaint/tableview/main.cpp b/tests/manual/repaint/tableview/main.cpp
index 442b1668e0..71f8209d6d 100644
--- a/tests/manual/repaint/tableview/main.cpp
+++ b/tests/manual/repaint/tableview/main.cpp
@@ -45,7 +45,7 @@
class CellWidget : public QWidget
{
public:
- CellWidget (QWidget *parent = 0) : QWidget(parent) { }
+ CellWidget(QWidget *parent = 0) : QWidget(parent) {}
void paintEvent(QPaintEvent * event)
{
static int value = 200;
@@ -69,8 +69,7 @@ int main(int argc, char **argv)
tableWidget.setCellWidget(row, col, new CellWidget());
tableWidget.resize(400, 600);
tableWidget.show();
-
-
+
return app.exec();
}
diff --git a/tests/manual/repaint/task141091/main.cpp b/tests/manual/repaint/task141091/main.cpp
index d2b0f76606..b5b6ae92d7 100644
--- a/tests/manual/repaint/task141091/main.cpp
+++ b/tests/manual/repaint/task141091/main.cpp
@@ -45,11 +45,12 @@
class MyWidget : public QWidget
{
public:
- MyWidget() : QWidget() {
-
-
+ MyWidget() : QWidget()
+ {
setAttribute(Qt::WA_OpaquePaintEvent);
- setAttribute(Qt::WA_StaticContents); }
+ setAttribute(Qt::WA_StaticContents);
+ }
+
protected:
void paintEvent(QPaintEvent *e) { qDebug() << e->rect(); }
};
@@ -60,4 +61,4 @@ int main(int argc, char **argv)
MyWidget w;
w.show();
return a.exec();
-} \ No newline at end of file
+}
diff --git a/tests/manual/repaint/widget/main.cpp b/tests/manual/repaint/widget/main.cpp
index 520b3e22f5..22011a160c 100644
--- a/tests/manual/repaint/widget/main.cpp
+++ b/tests/manual/repaint/widget/main.cpp
@@ -108,24 +108,24 @@ protected:
QPushButton * resizeButton;
QPushButton * movebutton;
QPushButton * moveResizebutton;
- QPushButton * scrollbutton;
+ QPushButton * scrollbutton;
};
int main(int argc, char **argv)
{
QApplication app(argc, argv);
-
+
TopLevel bc;
bc.resize(500, 500);
c = new Child(&bc);
c->move(100, 100);
c->resize(100, 100);
-
+
QWidget *gc = new StaticWidget(c);
gc->move(20, 20);
gc->resize(50,50);
-
+
bc.show();
return app.exec();