From b11317a64339f5a4bcffc8234ecaf15c7fb416f2 Mon Sep 17 00:00:00 2001 From: Axel Waggershauser Date: Fri, 15 Mar 2013 00:42:15 +0100 Subject: Whitespace cleanup: remove trailing whitespace Remove all trailing whitespace from the following list of files: *.cpp *.h *.conf *.qdoc *.pro *.pri *.mm *.rc *.pl *.qps *.xpm *.txt *README excluding 3rdparty, test-data and auto generated code. Note A): the only non 3rdparty c++-files that still have trailing whitespace after this change are: * src/corelib/codecs/cp949codetbl_p.h * src/corelib/codecs/qjpunicode.cpp * src/corelib/codecs/qbig5codec.cpp * src/corelib/xml/qxmlstream_p.h * src/tools/qdoc/qmlparser/qqmljsgrammar.cpp * src/tools/uic/ui4.cpp * tests/auto/other/qtokenautomaton/tokenizers/* * tests/benchmarks/corelib/tools/qstring/data.cpp * util/lexgen/tokenizer.cpp Note B): in about 30 files some overlapping 'leading tab' and 'TAB character in non-leading whitespace' issues have been fixed to make the sanity bot happy. Plus some general ws-fixes here and there as asked for during review. Change-Id: Ia713113c34d82442d6ce4d93d8b1cf545075d11d Reviewed-by: Oswald Buddenhagen --- .../qtconcurrentfilter/tst_qtconcurrentfilter.cpp | 23 +- .../tst_qtconcurrentiteratekernel.cpp | 10 +- .../qtconcurrentmap/tst_qtconcurrentmap.cpp | 6 +- .../qtconcurrentrun/tst_qtconcurrentrun.cpp | 6 +- tests/auto/corelib/global/qrand/tst_qrand.cpp | 2 +- tests/auto/corelib/io/qfile/stdinprocess/main.cpp | 2 +- tests/auto/corelib/io/qfile/tst_qfile.cpp | 6 +- .../io/qprocess/testProcessEchoGui/main_win.cpp | 4 +- .../corelib/io/qprocess/testSoftExit/main_unix.cpp | 2 +- .../corelib/io/qprocess/testSoftExit/main_win.cpp | 2 +- .../io/qresourceengine/tst_qresourceengine.cpp | 2 +- .../plugin/quuid/testProcessUniqueness/main.cpp | 2 +- .../corelib/statemachine/qstate/tst_qstate.cpp | 16 +- tests/auto/corelib/thread/qfuture/tst_qfuture.cpp | 32 +- .../thread/qfuturewatcher/tst_qfuturewatcher.cpp | 12 +- tests/auto/corelib/thread/qthread/tst_qthread.cpp | 2 +- .../corelib/thread/qthreadpool/tst_qthreadpool.cpp | 2 +- .../qcryptographichash/tst_qcryptographichash.cpp | 6 +- tests/auto/corelib/tools/qmargins/tst_qmargins.cpp | 2 +- tests/auto/corelib/tools/qqueue/tst_qqueue.cpp | 18 +- .../corelib/tools/qsharedpointer/externaltests.pri | 2 +- .../dbus/qdbusmetaobject/tst_qdbusmetaobject.cpp | 26 +- .../dbus/qdbusxmlparser/tst_qdbusxmlparser.cpp | 4 +- tests/auto/gui/image/qicon/tst_qicon.cpp | 2 +- .../image/qimageiohandler/tst_qimageiohandler.cpp | 2 +- tests/auto/gui/image/qimagereader/images/black.xpm | 30 +- tests/auto/gui/image/qpicture/tst_qpicture.cpp | 39 +- .../gui/kernel/qtouchevent/tst_qtouchevent.cpp | 6 +- tests/auto/gui/painting/qpathclipper/paths.cpp | 14 +- .../auto/gui/text/qstatictext/tst_qstatictext.cpp | 2 +- .../qsyntaxhighlighter/tst_qsyntaxhighlighter.cpp | 10 +- .../auto/gui/text/qtextformat/tst_qtextformat.cpp | 2 +- .../gui/text/qtextscriptengine/generate/main.cpp | 2 +- .../qtextscriptengine/tst_qtextscriptengine.cpp | 898 ++++++++++----------- .../tst_qhttpnetworkconnection.cpp | 6 +- .../qnetworkdiskcache/tst_qnetworkdiskcache.cpp | 2 +- .../network/access/qnetworkreply/echo/main.cpp | 2 +- .../tst_qnetworkconfiguration.cpp | 8 +- .../tst_qnetworkconfigurationmanager.cpp | 4 +- .../qnetworksession/test/tst_qnetworksession.cpp | 60 +- .../kernel/qhostaddress/tst_qhostaddress.cpp | 2 +- .../socket/qlocalsocket/tst_qlocalsocket.cpp | 6 +- .../network/socket/qtcpsocket/stressTest/Test.cpp | 4 +- .../network/socket/qtcpsocket/stressTest/main.cpp | 2 +- .../network/socket/qudpsocket/udpServer/main.cpp | 6 +- tests/auto/network/ssl/qsslerror/tst_qsslerror.cpp | 2 +- tests/auto/other/collections/tst_collections.cpp | 2 +- tests/auto/other/lancelot/scripts/background.qps | 26 +- tests/auto/other/lancelot/scripts/bitmaps.qps | 4 +- tests/auto/other/lancelot/scripts/clippaths.qps | 12 +- tests/auto/other/lancelot/scripts/cliprects.qps | 12 +- .../other/lancelot/scripts/conical_gradients.qps | 2 +- tests/auto/other/lancelot/scripts/dashes.qps | 38 +- .../auto/other/lancelot/scripts/deviceclipping.qps | 2 +- .../auto/other/lancelot/scripts/pixmap_scaling.qps | 38 +- .../other/lancelot/scripts/pixmap_subpixel.qps | 12 +- tests/auto/other/lancelot/scripts/pixmaps.qps | 10 +- tests/auto/other/lancelot/scripts/rasterops.qps | 4 +- tests/auto/other/lancelot/scripts/sizes.qps | 6 +- tests/auto/other/lancelot/scripts/text.qps | 50 +- tests/auto/other/lancelot/scripts/tiled_pixmap.qps | 10 +- tests/auto/other/macgui/guitest.cpp | 22 +- tests/auto/other/macgui/guitest.h | 8 +- tests/auto/other/macgui/tst_macgui.cpp | 6 +- .../other/macnativeevents/tst_macnativeevents.cpp | 2 +- ...t_qnetworkaccessmanager_and_qprogressdialog.cpp | 2 +- .../other/windowsmobile/test/tst_windowsmobile.cpp | 2 +- .../auto/other/windowsmobile/testQMenuBar/main.cpp | 2 +- tests/auto/sql/kernel/qsql/tst_qsql.cpp | 148 ++-- tests/auto/test.pl | 2 +- .../testlib/selftests/datetime/tst_datetime.cpp | 2 +- tests/auto/tools/moc/gadgetwithnoenums.h | 30 +- tests/auto/tools/moc/task189996.h | 10 +- tests/auto/tools/moc/template-gtgt.h | 4 +- .../dialogs/qerrormessage/tst_qerrormessage.cpp | 2 +- tests/auto/widgets/dialogs/qwizard/tst_qwizard.cpp | 6 +- .../tst_qgraphicsgridlayout.cpp | 2 +- .../itemviews/qtablewidget/tst_qtablewidget.cpp | 2 +- .../kernel/qapplication/wincmdline/main.cpp | 7 +- .../widgets/kernel/qformlayout/tst_qformlayout.cpp | 6 +- tests/auto/widgets/kernel/qlayout/tst_qlayout.cpp | 12 +- .../auto/widgets/kernel/qtooltip/tst_qtooltip.cpp | 2 +- .../widgets/styles/qmacstyle/tst_qmacstyle.cpp | 4 +- tests/auto/widgets/styles/qstyle/tst_qstyle.cpp | 4 +- .../styles/qstyleoption/tst_qstyleoption.cpp | 6 +- .../widgets/util/qundogroup/tst_qundogroup.cpp | 2 +- .../widgets/util/qundostack/tst_qundostack.cpp | 92 +-- .../widgets/qdatetimeedit/tst_qdatetimeedit.cpp | 4 +- .../widgets/qmainwindow/tst_qmainwindow.cpp | 10 +- .../widgets/qscrollarea/tst_qscrollarea.cpp | 2 +- .../widgets/widgets/qsplitter/tst_qsplitter.cpp | 14 +- .../widgets/widgets/qtabwidget/tst_qtabwidget.cpp | 4 +- tests/auto/xml/dom/qdom/tst_qdom.cpp | 18 +- tests/auto/xml/sax/qxml/tst_qxml.cpp | 6 +- .../sax/qxmlinputsource/tst_qxmlinputsource.cpp | 4 +- .../xml/sax/qxmlsimplereader/parser/parser.cpp | 2 +- tests/baselineserver/shared/lookup3.cpp | 32 +- tests/benchmarks/README | 48 +- .../corelib/io/qdir/tree/bench_qdir_tree.cpp | 6 +- .../io/qdiriterator/qfilesystemiterator.cpp | 14 +- tests/benchmarks/corelib/io/qfile/main.cpp | 16 +- .../corelib/tools/containers-associative/main.cpp | 16 +- tests/benchmarks/corelib/tools/qregexp/main.cpp | 10 +- tests/benchmarks/corelib/tools/qvector/main.cpp | 2 +- .../benchmarks/corelib/tools/qvector/qrawvector.h | 2 +- .../widgets/abstractitemcontainer.cpp | 14 +- .../widgets/abstractitemview.cpp | 23 +- .../widgets/abstractscrollarea.cpp | 14 +- .../widgets/abstractscrollarea.h | 4 +- .../widgets/backgrounditem.cpp | 1 - .../GraphicsViewBenchmark/widgets/backgrounditem.h | 8 +- .../GraphicsViewBenchmark/widgets/button.cpp | 22 +- .../GraphicsViewBenchmark/widgets/button.h | 8 +- .../GraphicsViewBenchmark/widgets/commandline.cpp | 4 +- .../GraphicsViewBenchmark/widgets/commandline.h | 2 +- .../GraphicsViewBenchmark/widgets/dummydatagen.cpp | 22 +- .../GraphicsViewBenchmark/widgets/dummydatagen.h | 6 +- .../GraphicsViewBenchmark/widgets/gvbwidget.h | 2 +- .../GraphicsViewBenchmark/widgets/iconitem.cpp | 6 +- .../GraphicsViewBenchmark/widgets/iconitem.h | 2 +- .../widgets/itemrecyclinglist.cpp | 12 +- .../widgets/itemrecyclinglist.h | 2 +- .../GraphicsViewBenchmark/widgets/label.cpp | 16 +- .../GraphicsViewBenchmark/widgets/label.h | 2 +- .../GraphicsViewBenchmark/widgets/listitem.cpp | 74 +- .../widgets/listitemcache.cpp | 4 +- .../GraphicsViewBenchmark/widgets/listitemcache.h | 2 +- .../widgets/listitemcontainer.cpp | 6 +- .../GraphicsViewBenchmark/widgets/listmodel.cpp | 2 +- .../GraphicsViewBenchmark/widgets/listwidget.cpp | 8 +- .../GraphicsViewBenchmark/widgets/mainview.cpp | 18 +- .../GraphicsViewBenchmark/widgets/mainview.h | 6 +- .../GraphicsViewBenchmark/widgets/menu.cpp | 24 +- .../GraphicsViewBenchmark/widgets/menu.h | 6 +- .../widgets/recycledlistitem.cpp | 4 +- .../widgets/resourcemoninterface.h | 16 +- .../GraphicsViewBenchmark/widgets/scrollbar.cpp | 36 +- .../GraphicsViewBenchmark/widgets/scrollbar.h | 6 +- .../GraphicsViewBenchmark/widgets/scroller.cpp | 10 +- .../GraphicsViewBenchmark/widgets/settings.h | 8 +- .../GraphicsViewBenchmark/widgets/simplelist.cpp | 10 +- .../widgets/simplelistview.cpp | 24 +- .../GraphicsViewBenchmark/widgets/simplelistview.h | 2 +- .../GraphicsViewBenchmark/widgets/themeevent.cpp | 4 +- .../GraphicsViewBenchmark/widgets/themeevent.h | 2 +- .../GraphicsViewBenchmark/widgets/topbar.cpp | 156 ++-- .../GraphicsViewBenchmark/widgets/topbar.h | 31 +- .../GraphicsViewBenchmark/widgets/webview.cpp | 28 +- .../GraphicsViewBenchmark/widgets/webview_p.h | 2 +- .../qgraphicsview/benchapps/chipTest/main.cpp | 2 +- .../qgraphicsview/benchapps/chipTest/mainwindow.h | 2 +- .../qgraphicsview/benchapps/chipTest/view.h | 2 +- .../qgraphicsview/chiptester/chiptester.h | 4 +- tests/benchmarks/gui/image/blendbench/main.cpp | 2 +- .../gui/image/qimagereader/images/black.xpm | 30 +- .../gui/itemviews/qtableview/tst_qtableview.cpp | 14 +- .../gui/painting/qtbench/benchmarktests.h | 2 +- tests/benchmarks/gui/text/qtext/main.cpp | 2 +- tests/manual/bearerex/bearerex.cpp | 42 +- tests/manual/bearerex/bearerex.h | 8 +- tests/manual/bearerex/xqlistwidget.cpp | 4 +- tests/manual/bearerex/xqlistwidget.h | 4 +- tests/manual/inputmethodhints/inputmethodhints.h | 2 +- tests/manual/qcursor/grab_override/mainwindow.h | 4 +- tests/manual/qtouchevent/touchwidget.cpp | 2 +- tests/manual/repaint/mainwindow/main.cpp | 10 +- tests/manual/repaint/scrollarea/main.cpp | 4 +- tests/manual/repaint/splitter/main.cpp | 2 +- tests/manual/repaint/tableview/main.cpp | 5 +- tests/manual/repaint/task141091/main.cpp | 11 +- tests/manual/repaint/widget/main.cpp | 8 +- 171 files changed, 1466 insertions(+), 1484 deletions(-) (limited to 'tests') 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() << 2 << 4); } - // function { QList list; @@ -554,7 +553,6 @@ void tst_QtConcurrentFilter::filteredReduced() int sum = QtConcurrent::filteredReduced(vector, KeepEvenIntegers(), IntSumReduce()); QCOMPARE(sum, 6); } - { int sum = QtConcurrent::filteredReduced(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 ints; + QList ints; for (int i=0; i < 1000; ++i) ints << i; QFuture 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 ints; + QList ints; for (int i=0; i < count; ++i) ints << i; QFuture future = QtConcurrent::filtered(ints, waitFilterfn); - + QList 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 ints; + QList ints; for (int i=0; i < count; ++i) ints << i; QFuture future = QtConcurrent::mapped(ints, mapper); - + QList results; while (future.isFinished() == false) { @@ -2311,7 +2311,7 @@ void tst_QtConcurrentMap::stlContainers() QCOMPARE(list2.size(), (std::vector::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 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 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("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 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 it(f); QFutureIterator it2(it); @@ -1122,7 +1122,7 @@ void tst_QFuture::iterators() { QFutureIterator 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 *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 ints; + QList 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 ints; + QList 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 queue_v; - QQueue queue_p; + QFETCH(int, num_items); + + int *values = new int[num_items]; + QQueue queue_v; + QQueue 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") << "" << 0 << 0 << 0 << introspection; QTest::newRow("interface-inside-junk") << "" << 0 << 0 << 0 << introspection; @@ -429,7 +429,7 @@ void tst_QDBusXmlParser::signals__data() QTest::newRow("one-out-no-direction") << "" "" - "" << map; + "" << 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 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.type() << + qDebug() << p.name() <<": isvalid->" <"<< 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 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 (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(stateChangedSpy.at(stateChangedSpy.count() - 1).at(0)); - + state = qvariant_cast(stateChangedSpy.at(stateChangedSpy.count() - 1).at(0)); + for (int i = 0; i < stateChangedSpy.count(); i++) { QNetworkSession::State state_temp = qvariant_cast(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(stateChangedSpy.at(stateChangedSpy.count() - 2).at(0)); + state = qvariant_cast(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(stateChangedSpy2.at(0).at(0)); @@ -797,7 +797,7 @@ void tst_QNetworkSession::sessionOpenCloseStop() QNetworkSession::State state = qvariant_cast(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 -#include +#include #include #include #include @@ -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(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(argv), false); - QSqlDatabase::registerSqlDriver( "QSQLTESTDRIVER", new QSqlDriverCreator ); - QVERIFY( QSqlDatabase::drivers().contains( "QSQLTESTDRIVER" ) ); + QSqlDatabase::registerSqlDriver("QSQLTESTDRIVER", new QSqlDriverCreator); + 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 -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 - -class InlineSlotsWithThrowDeclaration : public QObject { - Q_OBJECT +#include + +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 myTemplate : +class myTemplate : QString, QVector> {}; template -class myTemplate2 : +class myTemplate2 : QString, QVector> 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(&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("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 #include -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 expectedWidths; + QVector 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 -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("testOption"); QTest::addColumn("canCastToComplex"); - QTest::addColumn("type"); + QTest::addColumn("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, 0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x0, 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 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("text"), 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("")); 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("")); - + 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("")); - + 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 +template void testInsert(int size) { T container; @@ -69,7 +69,7 @@ void tst_associative_containers::insert_data() QTest::addColumn("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 testMap; if (useHash) { - testInsert >(size); + testInsert >(size); } else { - testInsert >(size); + testInsert >(size); } } @@ -101,7 +101,7 @@ void tst_associative_containers::lookup_data() QTest::addColumn("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 +template 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 themeChange(); } -void AbstractItemContainer::updateContent() +void AbstractItemContainer::updateContent() { - for (int i = 0; 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 ¤t, 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(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 -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(); QList textkeys = data.texts.keys(); - for( int i = 0; i iconkeys = data.icons.keys(); - for( int i = 0; isetFileName(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