summaryrefslogtreecommitdiffstats
path: root/qmake
diff options
context:
space:
mode:
authorJens Bache-Wiig <jbache@trolltech.com>2009-06-29 11:47:24 (GMT)
committerJens Bache-Wiig <jbache@trolltech.com>2009-06-29 11:54:31 (GMT)
commitb6171cfbe3b1453a2c46f78db0df4819e4e5e54f (patch)
treebc86f0aa2843d484094b01118771955b285212dc /qmake
parent4efa1ba22825fb9a8be572dbf595cb29a4e4840b (diff)
downloadQt-b6171cfbe3b1453a2c46f78db0df4819e4e5e54f.zip
Qt-b6171cfbe3b1453a2c46f78db0df4819e4e5e54f.tar.gz
Qt-b6171cfbe3b1453a2c46f78db0df4819e4e5e54f.tar.bz2
Fix coverity warning
Coverity was complaining because we were not checking the return value of find() but instead using the pixmap handle to check the result. This makes the call more consistent Reviewed-by: mgoetz
Diffstat (limited to 'qmake')
0 files changed, 0 insertions, 0 deletions
ndow(QWidget *parent) // Make app better lookin on small screen QHBoxLayout *topLayout2 = new QHBoxLayout; topLayout2->addWidget(cdToParentButton); - topLayout2->addWidget(connectButton); + topLayout2->addWidget(connectButton); #endif - + QVBoxLayout *mainLayout = new QVBoxLayout; mainLayout->addLayout(topLayout); -#ifdef Q_OS_SYMBIAN +#ifdef Q_OS_SYMBIAN // Make app better lookin on small screen mainLayout->addLayout(topLayout2); -#endif +#endif mainLayout->addWidget(fileList); mainLayout->addWidget(statusLabel); mainLayout->addWidget(buttonBox); @@ -161,7 +161,7 @@ void FtpWindow::connectOrDisconnect() setCursor(Qt::WaitCursor); #endif -//![1] +//![1] ftp = new QFtp(this); connect(ftp, SIGNAL(commandFinished(int, bool)), this, SLOT(ftpCommandFinished(int, bool))); diff --git a/examples/network/ftp/main.cpp b/examples/network/ftp/main.cpp index f928bcb..978db0b 100644 --- a/examples/network/ftp/main.cpp +++ b/examples/network/ftp/main.cpp @@ -55,12 +55,12 @@ int main(int argc, char *argv[]) // in order that user can access the downloaded content QDir::setCurrent( "c:\\data" ); #endif - QApplication app(argc, argv); + QApplication app(argc, argv); FtpWindow ftpWin; -#ifdef Q_OS_SYMBIAN +#ifdef Q_OS_SYMBIAN // Make application better looking and more usable on small screen ftpWin.showMaximized(); -#else +#else ftpWin.show(); #endif return ftpWin.exec(); diff --git a/examples/network/ftp/sym_iap_util.h b/examples/network/ftp/sym_iap_util.h index 74fe93a..c399b35 100644 --- a/examples/network/ftp/sym_iap_util.h +++ b/examples/network/ftp/sym_iap_util.h @@ -293,7 +293,7 @@ static QString qt_RouteInfoL() { return output; } -QString qt_TDesC2QStringL(const TDesC& aDescriptor) +QString qt_TDesC2QStringL(const TDesC& aDescriptor) { #ifdef QT_NO_UNICODE return QString::fromLocal8Bit(aDescriptor.Ptr(), aDescriptor.Length()); diff --git a/examples/painting/svgviewer/svgviewer.pro b/examples/painting/svgviewer/svgviewer.pro index 523dcf6..ea77946 100644 --- a/examples/painting/svgviewer/svgviewer.pro +++ b/examples/painting/svgviewer/svgviewer.pro @@ -28,5 +28,5 @@ symbian: { TARGET.UID3 = 0xA000A64E addFiles.sources = files\*.svg addFiles.path = . - DEPLOYMENT += addFiles + DEPLOYMENT += addFiles } diff --git a/examples/sql/drilldown/drilldown.pro b/examples/sql/drilldown/drilldown.pro index 7907bd2..1d0714b 100644 --- a/examples/sql/drilldown/drilldown.pro +++ b/examples/sql/drilldown/drilldown.pro @@ -1,7 +1,7 @@ HEADERS = ../connection.h \ imageitem.h \ informationwindow.h \ - view.h + view.h RESOURCES = drilldown.qrc SOURCES = imageitem.cpp \ informationwindow.cpp \ @@ -15,6 +15,6 @@ sources.files = $$SOURCES *.h $$RESOURCES $$FORMS drilldown.pro *.png *.jpg imag sources.path = $$[QT_INSTALL_EXAMPLES]/sql/drilldown INSTALLS += target sources -symbian:TARGET.UID3 = 0xA000C612 +symbian:TARGET.UID3 = 0xA000C612 include($$QT_SOURCE_TREE/examples/examplebase.pri) diff --git a/examples/sql/drilldown/informationwindow.cpp b/examples/sql/drilldown/informationwindow.cpp index b01b753..8b5fd0c 100644 --- a/examples/sql/drilldown/informationwindow.cpp +++ b/examples/sql/drilldown/informationwindow.cpp @@ -101,9 +101,9 @@ InformationWindow::InformationWindow(int id, QSqlRelationalTableModel *offices, setWindowFlags(Qt::Window); enableButtons(false); setWindowTitle(tr("Office: %1").arg(locationText->text())); -#ifndef Q_OS_SYMBIAN +#ifndef Q_OS_SYMBIAN resize(320, sizeHint().height()); -#endif +#endif } //! [4] diff --git a/examples/sql/drilldown/main.cpp b/examples/sql/drilldown/main.cpp index 432849d..57a11ed 100644 --- a/examples/sql/drilldown/main.cpp +++ b/examples/sql/drilldown/main.cpp @@ -54,10 +54,10 @@ int main(int argc, char *argv[]) return 1; View view("offices", "images"); -#ifndef Q_OS_SYMBIAN +#ifndef Q_OS_SYMBIAN view.show(); -#else - view.showFullScreen(); -#endif +#else + view.showFullScreen(); +#endif return app.exec(); } diff --git a/examples/sql/drilldown/view.cpp b/examples/sql/drilldown/view.cpp index e288ac6..349547a 100644 --- a/examples/sql/drilldown/view.cpp +++ b/examples/sql/drilldown/view.cpp @@ -62,15 +62,15 @@ View::View(const QString &offices, const QString &images, QWidget *parent) QGraphicsPixmapItem *logo = scene->addPixmap(QPixmap(":/logo.png")); logo->setPos(30, 515); - + #ifndef Q_OS_SYMBIAN setMinimumSize(470, 620); - setMaximumSize(470, 620); + setMaximumSize(470, 620); #else - setDragMode(QGraphicsView::ScrollHandDrag); -#endif + setDragMode(QGraphicsView::ScrollHandDrag); +#endif - setWindowTitle(tr("Offices World Wide")); + setWindowTitle(tr("Offices World Wide")); } //! [1] @@ -135,7 +135,7 @@ void View::showInformation(ImageItem *image) window->show(); #else window->showFullScreen(); -#endif +#endif } else { InformationWindow *window; window = new InformationWindow(id, officeTable, this); @@ -148,7 +148,7 @@ void View::showInformation(ImageItem *image) window->show(); #else window->showFullScreen(); -#endif +#endif informationWindows.append(window); } } diff --git a/examples/widgets/softkeys/softkeys.cpp b/examples/widgets/softkeys/softkeys.cpp index 110f2e6..d8ab09a 100644 --- a/examples/widgets/softkeys/softkeys.cpp +++ b/examples/widgets/softkeys/softkeys.cpp @@ -65,7 +65,7 @@ MainWindow::MainWindow(QWidget *parent) toggleButton = new QPushButton(tr("Custom softkeys"), this); toggleButton->setContextMenuPolicy(Qt::NoContextMenu); - toggleButton->setCheckable(true); + toggleButton->setCheckable(true); pushButton = new QPushButton(tr("Open File Dialog"), this); pushButton->setContextMenuPolicy(Qt::NoContextMenu); -- cgit v0.12 From 4b07c9d95087cc69956bfe309cd9b4eec26235ec Mon Sep 17 00:00:00 2001 From: Janne Anttila Date: Tue, 4 Aug 2009 13:45:34 +0300 Subject: Further code style cleanup fro demos and examples --- examples/draganddrop/dropsite/dropsite.pro | 1 - examples/draganddrop/fridgemagnets/dragwidget.cpp | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/examples/draganddrop/dropsite/dropsite.pro b/examples/draganddrop/dropsite/dropsite.pro index 268e247..a42f717 100644 --- a/examples/draganddrop/dropsite/dropsite.pro +++ b/examples/draganddrop/dropsite/dropsite.pro @@ -11,4 +11,3 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/draganddrop/dropsite INSTALLS += target sources include($$QT_SOURCE_TREE/examples/examplebase.pri) - diff --git a/examples/draganddrop/fridgemagnets/dragwidget.cpp b/examples/draganddrop/fridgemagnets/dragwidget.cpp index 81dbc00..92a6960 100644 --- a/examples/draganddrop/fridgemagnets/dragwidget.cpp +++ b/examples/draganddrop/fridgemagnets/dragwidget.cpp @@ -76,7 +76,7 @@ DragWidget::DragWidget(QWidget *parent) //! [2] #ifndef Q_WS_S60 - //Fridge magnets is used for demoing Qt on S60 and themed backgrounds look better than white + //Fridge magnets is used for demoing Qt on S60 and themed backgrounds look better than white QPalette newPalette = palette(); newPalette.setColor(QPalette::Window, Qt::white); setPalette(newPalette); -- cgit v0.12 From cd10d1a8dbb3b77c2d4e9c389e134b1f3cc3c2cf Mon Sep 17 00:00:00 2001 From: Janne Anttila Date: Tue, 4 Aug 2009 14:02:56 +0300 Subject: Trailing whitespace and tab/space fixes for auto tests --- tests/auto/_Categories/QtCore.txt | 4 +- tests/auto/_Categories/QtGui.txt | 4 +- .../auto/_networkselftest/tst_networkselftest.cpp | 16 +- tests/auto/languagechange/tst_languagechange.cpp | 6 +- .../qabstractitemview/tst_qabstractitemview.cpp | 50 +- .../tst_qabstractnetworkcache.cpp | 4 +- tests/auto/qautoptr/qautoptr.pro | 2 +- tests/auto/qbitarray/tst_qbitarray.cpp | 2 +- tests/auto/qclipboard/tst_qclipboard.cpp | 6 +- tests/auto/qcombobox/tst_qcombobox.cpp | 4 +- tests/auto/qcssparser/qcssparser.pro | 1 - tests/auto/qcssparser/tst_cssparser.cpp | 4 +- tests/auto/qdatetimeedit/tst_qdatetimeedit.cpp | 6 +- tests/auto/qdesktopservices/qdesktopservices.pro | 16 +- .../auto/qdesktopservices/tst_qdesktopservices.cpp | 176 ++--- tests/auto/qdir/tst_qdir.cpp | 56 +- tests/auto/qfiledialog/qfiledialog.pro | 2 - tests/auto/qfileinfo/tst_qfileinfo.cpp | 2 +- tests/auto/qfilesystemmodel/qfilesystemmodel.pro | 4 +- tests/auto/qfontdatabase/tst_qfontdatabase.cpp | 4 +- tests/auto/qfontdialog/tst_qfontdialog.cpp | 2 +- tests/auto/qftp/tst_qftp.cpp | 10 +- tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp | 8 +- tests/auto/qgraphicslayout/tst_qgraphicslayout.cpp | 62 +- .../tst_qgraphicsproxywidget.cpp | 3 +- tests/auto/qhostinfo/tst_qhostinfo.cpp | 6 +- tests/auto/qhttp/tst_qhttp.cpp | 12 +- .../tst_qhttpnetworkconnection.cpp | 12 +- .../qhttpsocketengine/tst_qhttpsocketengine.cpp | 24 +- tests/auto/qimage/tst_qimage.cpp | 6 +- tests/auto/qimagereader/qimagereader.pro | 1 - tests/auto/qitemdelegate/tst_qitemdelegate.cpp | 2 +- tests/auto/qitemview/tst_qitemview.cpp | 4 +- tests/auto/qkeyevent/tst_qkeyevent.cpp | 6 +- tests/auto/qlibrary/tst/tst.pro | 2 +- tests/auto/qlocalsocket/lackey/lackey.pro | 4 +- tests/auto/qlocalsocket/test/test.pro | 2 +- tests/auto/qlocalsocket/tst_qlocalsocket.cpp | 18 +- tests/auto/qmenu/tst_qmenu.cpp | 14 +- .../tst_qnativesocketengine.cpp | 22 +- .../qnetworkinterface/tst_qnetworkinterface.cpp | 8 +- tests/auto/qnetworkreply/test/test.pro | 4 +- tests/auto/qnetworkreply/tst_qnetworkreply.cpp | 42 +- tests/auto/qobject/qobject.pro | 2 - tests/auto/qobject/tst_qobject.cpp | 2 +- tests/auto/qobject/tst_qobject.pro | 1 - tests/auto/qobjectrace/tst_qobjectrace.cpp | 14 +- tests/auto/qpluginloader/tst/tst.pro | 3 +- tests/auto/qpluginloader/tst_qpluginloader.cpp | 19 +- tests/auto/qprogressbar/tst_qprogressbar.cpp | 2 +- tests/auto/qresourceengine/qresourceengine.pro | 14 +- .../qscriptv8testsuite/tst_qscriptv8testsuite.cpp | 4 +- tests/auto/qsettings/tst_qsettings.cpp | 4 +- tests/auto/qsocketnotifier/tst_qsocketnotifier.cpp | 14 +- .../tst_qsocks5socketengine.cpp | 28 +- tests/auto/qsql/qsql.pro | 4 +- tests/auto/qsqldatabase/qsqldatabase.pro | 4 +- tests/auto/qsqldriver/qsqldriver.pro | 2 +- tests/auto/qsqlerror/qsqlerror.pro | 2 +- tests/auto/qsqlfield/qsqlfield.pro | 2 +- tests/auto/qsqlquery/qsqlquery.pro | 4 +- tests/auto/qsqlquery/tst_qsqlquery.cpp | 2 +- tests/auto/qsqlquerymodel/qsqlquerymodel.pro | 2 +- tests/auto/qsqlrecord/qsqlrecord.pro | 2 +- .../qsqlrelationaltablemodel.pro | 4 +- tests/auto/qsqltablemodel/qsqltablemodel.pro | 4 +- tests/auto/qsqlthread/qsqlthread.pro | 4 +- tests/auto/qsslsocket/qsslsocket.pro | 4 +- tests/auto/qsslsocket/tst_qsslsocket.cpp | 40 +- tests/auto/qstatemachine/tst_qstatemachine.cpp | 182 +++--- tests/auto/qtcpserver/crashingServer/main.cpp | 2 +- tests/auto/qtcpserver/tst_qtcpserver.cpp | 8 +- tests/auto/qtcpsocket/tst_qtcpsocket.cpp | 36 +- tests/auto/qtemporaryfile/qtemporaryfile.pro | 2 +- tests/auto/qtextcodec/test/test.pro | 2 +- tests/auto/qtextedit/tst_qtextedit.cpp | 2 +- tests/auto/qtextodfwriter/qtextodfwriter.pro | 2 +- tests/auto/qtextstream/test/test.pro | 2 +- tests/auto/qtextstream/tst_qtextstream.cpp | 4 +- tests/auto/qtimer/tst_qtimer.cpp | 1 - tests/auto/qudpsocket/tst_qudpsocket.cpp | 152 ++--- tests/auto/qvariant/tst_qvariant.cpp | 6 +- tests/auto/qwaitcondition/tst_qwaitcondition.cpp | 716 ++++++++++----------- tests/auto/qwidget/tst_qwidget.cpp | 12 +- .../auto/qxmlsimplereader/tst_qxmlsimplereader.cpp | 4 +- .../orientationchange/orientationchange.pro | 4 +- .../orientationchange/tst_orientationchange.cpp | 36 +- .../symbian/qmainexceptions/qmainexceptions.pro | 4 +- .../qmainexceptions/tst_qmainexceptions.cpp | 8 +- 89 files changed, 1000 insertions(+), 1015 deletions(-) diff --git a/tests/auto/_Categories/QtCore.txt b/tests/auto/_Categories/QtCore.txt index c3fb879..452b6ba 100644 --- a/tests/auto/_Categories/QtCore.txt +++ b/tests/auto/_Categories/QtCore.txt @@ -5,7 +5,7 @@ exceptionsafety qabstractitemmodel #Requires STL qalgorithms -qanimationgroup +qanimationgroup qatomicint qatomicpointer qbitarray @@ -80,7 +80,7 @@ qsocketnotifier qstate qstatemachine #Requires STL -qstl +qstl qstring qstringlist qstringmatcher diff --git a/tests/auto/_Categories/QtGui.txt b/tests/auto/_Categories/QtGui.txt index 6ef7cfe..dcb3be5 100644 --- a/tests/auto/_Categories/QtGui.txt +++ b/tests/auto/_Categories/QtGui.txt @@ -43,7 +43,7 @@ qdirmodel qdockwidget qdoublespinbox qdoublevalidator -qdrag +qdrag qerrormessage qfiledialog qfileiconprovider @@ -166,7 +166,7 @@ qtextlist qtextobject qtextodfwriter #This test can only be compiled on HW currently, because it does not use reduced exports -#Because we are planning to use class level exports also in HW later on, there is no +#Because we are planning to use class level exports also in HW later on, there is no #sense to enable this at all #qtextpiecetable qtextscriptengine diff --git a/tests/auto/_networkselftest/tst_networkselftest.cpp b/tests/auto/_networkselftest/tst_networkselftest.cpp index cfb5c3c..2c57e83 100644 --- a/tests/auto/_networkselftest/tst_networkselftest.cpp +++ b/tests/auto/_networkselftest/tst_networkselftest.cpp @@ -52,8 +52,8 @@ class tst_NetworkSelfTest: public QObject Q_OBJECT public: tst_NetworkSelfTest(); - virtual ~tst_NetworkSelfTest(); - + virtual ~tst_NetworkSelfTest(); + private slots: void hostTest(); void dnsResolution_data(); @@ -68,7 +68,7 @@ private slots: void httpServer(); void httpsServer(); void httpProxy(); - void httpProxyBasicAuth(); + void httpProxyBasicAuth(); void httpProxyNtlmAuth(); void socks5Proxy(); void socks5ProxyAuth(); @@ -371,7 +371,7 @@ void tst_NetworkSelfTest::remotePortsOpen_data() QTest::newRow("https") << 443; QTest::newRow("http-proxy") << 3128; QTest::newRow("http-proxy-auth-basic") << 3129; - QTest::newRow("http-proxy-auth-ntlm") << 3130; + QTest::newRow("http-proxy-auth-ntlm") << 3130; QTest::newRow("socks5-proxy") << 1080; QTest::newRow("socks5-proxy-auth") << 1081; } @@ -381,8 +381,8 @@ void tst_NetworkSelfTest::remotePortsOpen() #ifdef Q_OS_SYMBIAN if (qstrcmp(QTest::currentDataTag(), "http-proxy-auth-ntlm") == 0) QSKIP("NTML authentication not yet supported in Symbian", SkipSingle); -#endif - +#endif + QFETCH(int, portNumber); QTcpSocket socket; socket.connectToHost(QtNetworkSettings::serverName(), portNumber); @@ -538,7 +538,7 @@ void tst_NetworkSelfTest::httpProxyNtlmAuth() { #ifdef Q_OS_SYMBIAN QSKIP("NTML authentication not yet supported in Symbian", SkipAll); -#else +#else netChat(3130, QList() // test auth required response << Chat::send("GET http://" + QtNetworkSettings::serverName().toLatin1() + "/ HTTP/1.0\r\n" @@ -551,7 +551,7 @@ void tst_NetworkSelfTest::httpProxyNtlmAuth() << Chat::discardUntil("\r\nProxy-Authenticate: NTLM\r\n") << Chat::DiscardUntilDisconnect ); -#endif +#endif } // SOCKSv5 is a binary protocol diff --git a/tests/auto/languagechange/tst_languagechange.cpp b/tests/auto/languagechange/tst_languagechange.cpp index f856f67..9ffadb1 100644 --- a/tests/auto/languagechange/tst_languagechange.cpp +++ b/tests/auto/languagechange/tst_languagechange.cpp @@ -213,11 +213,11 @@ void tst_languageChange::retranslatability() "get proper widget layout."); TransformTranslator translator; #if defined(Q_OS_SYMBIAN) && defined(Q_CC_NOKIAX86) - // Allow a little extra time or emulator startup delays cause failure + // Allow a little extra time or emulator startup delays cause failure QTimer::singleShot(5000, &translator, SLOT(install())); -#else +#else QTimer::singleShot(500, &translator, SLOT(install())); -#endif +#endif switch (dialogType) { case InputDialog: (void)QInputDialog::getInteger(0, QLatin1String("title"), QLatin1String("label")); diff --git a/tests/auto/qabstractitemview/tst_qabstractitemview.cpp b/tests/auto/qabstractitemview/tst_qabstractitemview.cpp index a35270a..67aac6f 100644 --- a/tests/auto/qabstractitemview/tst_qabstractitemview.cpp +++ b/tests/auto/qabstractitemview/tst_qabstractitemview.cpp @@ -211,7 +211,7 @@ private slots: void noFallbackToRoot(); void setCurrentIndex_data(); void setCurrentIndex(); - + void task221955_selectedEditor(); void task250754_fontChange(); }; @@ -453,7 +453,7 @@ void tst_QAbstractItemView::basic_tests(TestView *view) view->setDragEnabled(true); QCOMPARE(view->dragEnabled(), true); #endif - + // setAlternatingRowColors view->setAlternatingRowColors(false); QCOMPARE(view->alternatingRowColors(), false); @@ -566,7 +566,7 @@ void tst_QAbstractItemView::basic_tests(TestView *view) view->tst_setState(TestView::CollapsingState); QVERIFY(view->tst_state()==TestView::CollapsingState); #endif - + view->tst_startAutoScroll(); view->tst_stopAutoScroll(); view->tst_doAutoScroll(); @@ -951,12 +951,12 @@ void tst_QAbstractItemView::dragAndDropOnChild() class TestModel : public QStandardItemModel { public: - TestModel(int rows, int columns) : QStandardItemModel(rows, columns) + TestModel(int rows, int columns) : QStandardItemModel(rows, columns) { setData_count = 0; } - virtual bool setData(const QModelIndex &/*index*/, const QVariant &/*value*/, int /*role = Qt::EditRole*/) + virtual bool setData(const QModelIndex &/*index*/, const QVariant &/*value*/, int /*role = Qt::EditRole*/) { ++setData_count; return true; @@ -973,20 +973,20 @@ void tst_QAbstractItemView::setItemDelegate_data() // default is rows, a -1 will switch to columns QTest::addColumn("rowsOrColumnsWithDelegate"); QTest::addColumn("cellToEdit"); - QTest::newRow("4 columndelegates") - << (IntList() << -1 << 0 << 1 << 2 << 3) + QTest::newRow("4 columndelegates") + << (IntList() << -1 << 0 << 1 << 2 << 3) << QPoint(0, 0); - QTest::newRow("2 identical rowdelegates on the same row") - << (IntList() << 0 << 0) + QTest::newRow("2 identical rowdelegates on the same row") + << (IntList() << 0 << 0) << QPoint(0, 0); - QTest::newRow("2 identical columndelegates on the same column") - << (IntList() << -1 << 2 << 2) + QTest::newRow("2 identical columndelegates on the same column") + << (IntList() << -1 << 2 << 2) << QPoint(2, 0); - QTest::newRow("2 duplicate delegates, 1 row and 1 column") - << (IntList() << 0 << -1 << 2) + QTest::newRow("2 duplicate delegates, 1 row and 1 column") + << (IntList() << 0 << -1 << 2) << QPoint(2, 0); - QTest::newRow("4 duplicate delegates, 2 row and 2 column") - << (IntList() << 0 << 0 << -1 << 2 << 2) + QTest::newRow("4 duplicate delegates, 2 row and 2 column") + << (IntList() << 0 << 0 << -1 << 2 << 2) << QPoint(2, 0); } @@ -1008,7 +1008,7 @@ void tst_QAbstractItemView::setItemDelegate() if (row) { v.setItemDelegateForRow(rc, delegate); } else { - v.setItemDelegateForColumn(rc, delegate); + v.setItemDelegateForColumn(rc, delegate); } } } @@ -1126,42 +1126,42 @@ void tst_QAbstractItemView::setCurrentIndex() void tst_QAbstractItemView::task221955_selectedEditor() { QPushButton *button; - + QTreeWidget tree; tree.setColumnCount(2); tree.addTopLevelItem(new QTreeWidgetItem(QStringList() << "Foo" <<"1")); tree.addTopLevelItem(new QTreeWidgetItem(QStringList() << "Bar" <<"2")); tree.addTopLevelItem(new QTreeWidgetItem(QStringList() << "Baz" <<"3")); - + QTreeWidgetItem *dummy = new QTreeWidgetItem(); tree.addTopLevelItem(dummy); tree.setItemWidget(dummy, 0, button = new QPushButton("More...")); button->setAutoFillBackground(true); // as recommended in doc - + tree.show(); tree.setFocus(); tree.setCurrentIndex(tree.model()->index(1,0)); QTest::qWait(100); QApplication::setActiveWindow(&tree); - + QVERIFY(! tree.selectionModel()->selectedIndexes().contains(tree.model()->index(3,0))); //We set the focus to the button, the index need to be selected - button->setFocus(); + button->setFocus(); QTest::qWait(100); QVERIFY(tree.selectionModel()->selectedIndexes().contains(tree.model()->index(3,0))); - + tree.setCurrentIndex(tree.model()->index(1,0)); QVERIFY(! tree.selectionModel()->selectedIndexes().contains(tree.model()->index(3,0))); - + //Same thing but with the flag NoSelection, nothing can be selected. tree.setFocus(); tree.setSelectionMode(QAbstractItemView::NoSelection); tree.clearSelection(); QVERIFY(tree.selectionModel()->selectedIndexes().isEmpty()); QTest::qWait(10); - button->setFocus(); + button->setFocus(); QTest::qWait(50); QVERIFY(tree.selectionModel()->selectedIndexes().isEmpty()); } @@ -1202,7 +1202,7 @@ void tst_QAbstractItemView::task250754_fontChange() QTest::qWait(30); //now with the huge items, the scrollbar must be visible QVERIFY(tree.verticalScrollBar()->isVisible()); - + qApp->setStyleSheet(app_css); } diff --git a/tests/auto/qabstractnetworkcache/tst_qabstractnetworkcache.cpp b/tests/auto/qabstractnetworkcache/tst_qabstractnetworkcache.cpp index 2a4a1a7..b3f918b 100644 --- a/tests/auto/qabstractnetworkcache/tst_qabstractnetworkcache.cpp +++ b/tests/auto/qabstractnetworkcache/tst_qabstractnetworkcache.cpp @@ -84,7 +84,7 @@ public: #ifdef Q_OS_SYMBIAN QString location = QLatin1String("./cache/"); #else - QString location = QDesktopServices::storageLocation(QDesktopServices::DataLocation) + QString location = QDesktopServices::storageLocation(QDesktopServices::DataLocation) + QLatin1String("/cache/"); #endif setCacheDirectory(location); @@ -111,7 +111,7 @@ tst_QAbstractNetworkCache::tst_QAbstractNetworkCache() } tst_QAbstractNetworkCache::~tst_QAbstractNetworkCache() -{ +{ } static bool AlwaysTrue = true; diff --git a/tests/auto/qautoptr/qautoptr.pro b/tests/auto/qautoptr/qautoptr.pro index 9eab084..b0c574f 100644 --- a/tests/auto/qautoptr/qautoptr.pro +++ b/tests/auto/qautoptr/qautoptr.pro @@ -1,4 +1,4 @@ load(qttest_p4) SOURCES += tst_qautoptr.cpp -QT = core +QT = core include(../xmlpatterns.pri) diff --git a/tests/auto/qbitarray/tst_qbitarray.cpp b/tests/auto/qbitarray/tst_qbitarray.cpp index 3c9ef53..f8f288f 100644 --- a/tests/auto/qbitarray/tst_qbitarray.cpp +++ b/tests/auto/qbitarray/tst_qbitarray.cpp @@ -646,7 +646,7 @@ void tst_QBitArray::resize() // grow the array back and check the new bit a.resize(10); QCOMPARE( a, QStringToQBitArray(QString("1100000000")) ); - + // other test with and a.resize(9); QBitArray b = QStringToQBitArray(QString("1111111111")); diff --git a/tests/auto/qclipboard/tst_qclipboard.cpp b/tests/auto/qclipboard/tst_qclipboard.cpp index 2929aab..88c7a2c 100644 --- a/tests/auto/qclipboard/tst_qclipboard.cpp +++ b/tests/auto/qclipboard/tst_qclipboard.cpp @@ -197,7 +197,7 @@ void tst_QClipboard::copy_exit_paste() // ### It's still possible to test copy/paste - just keep the apps running #elif defined (Q_OS_SYMBIAN) && defined (Q_CC_NOKIAX86) QSKIP("emulator cannot launch multiple processes",SkipAll); -#endif +#endif if (!nativeClipboardWorking()) QSKIP("Native clipboard not working in this setup", SkipAll); const QStringList stringArgument = QStringList() << "Test string."; @@ -240,7 +240,7 @@ void tst_QClipboard::setMimeData() QApplication::clipboard()->setMimeData(data, QClipboard::Clipboard); QApplication::clipboard()->setMimeData(data, QClipboard::Selection); QApplication::clipboard()->setMimeData(data, QClipboard::FindBuffer); - + QSignalSpy spySelection(QApplication::clipboard(), SIGNAL(selectionChanged())); QSignalSpy spyData(QApplication::clipboard(), SIGNAL(dataChanged())); QSignalSpy spyFindBuffer(QApplication::clipboard(), SIGNAL(findBufferChanged())); @@ -277,7 +277,7 @@ void tst_QClipboard::setMimeData() spySelection.clear(); spyData.clear(); spyFindBuffer.clear(); - + QApplication::clipboard()->setMimeData(newData, QClipboard::Clipboard); QApplication::clipboard()->setMimeData(newData, QClipboard::Selection); // used to crash on X11 QApplication::clipboard()->setMimeData(newData, QClipboard::FindBuffer); diff --git a/tests/auto/qcombobox/tst_qcombobox.cpp b/tests/auto/qcombobox/tst_qcombobox.cpp index 4976b30..8b5acc7 100644 --- a/tests/auto/qcombobox/tst_qcombobox.cpp +++ b/tests/auto/qcombobox/tst_qcombobox.cpp @@ -1246,7 +1246,7 @@ void tst_QComboBox::insertItem() QCOMPARE(testWidget->count(), initialItems.count() + 1); QCOMPARE(testWidget->itemText(expectedIndex), itemLabel); - + if (editable) QCOMPARE(testWidget->currentText(), QString("FOO")); } @@ -2196,7 +2196,7 @@ void tst_QComboBox::noScrollbar() QVERIFY(!comboBox.view()->horizontalScrollBar()->isVisible()); QVERIFY(!comboBox.view()->verticalScrollBar()->isVisible()); } - + { QTableWidget *table = new QTableWidget(2,2); QComboBox comboBox; diff --git a/tests/auto/qcssparser/qcssparser.pro b/tests/auto/qcssparser/qcssparser.pro index b655db1..abf7187 100644 --- a/tests/auto/qcssparser/qcssparser.pro +++ b/tests/auto/qcssparser/qcssparser.pro @@ -11,4 +11,3 @@ wince*|symbian: { addFiles.path = . DEPLOYMENT += addFiles } - diff --git a/tests/auto/qcssparser/tst_cssparser.cpp b/tests/auto/qcssparser/tst_cssparser.cpp index ce923e1..9870ec2 100644 --- a/tests/auto/qcssparser/tst_cssparser.cpp +++ b/tests/auto/qcssparser/tst_cssparser.cpp @@ -1139,8 +1139,8 @@ void tst_CssParser::specificity() QVERIFY(parser.parse(&sheet)); QCOMPARE(sheet.styleRules.count() + sheet.nameIndex.count() + sheet.idIndex.count() , 1); - QCss::StyleRule rule = (!sheet.styleRules.isEmpty()) ? sheet.styleRules.at(0) - : (!sheet.nameIndex.isEmpty()) ? *sheet.nameIndex.begin() + QCss::StyleRule rule = (!sheet.styleRules.isEmpty()) ? sheet.styleRules.at(0) + : (!sheet.nameIndex.isEmpty()) ? *sheet.nameIndex.begin() : *sheet.idIndex.begin(); QCOMPARE(rule.selectors.count(), 1); QTEST(rule.selectors.at(0).specificity(), "specificity"); diff --git a/tests/auto/qdatetimeedit/tst_qdatetimeedit.cpp b/tests/auto/qdatetimeedit/tst_qdatetimeedit.cpp index 55dd85c..e5cb4486 100644 --- a/tests/auto/qdatetimeedit/tst_qdatetimeedit.cpp +++ b/tests/auto/qdatetimeedit/tst_qdatetimeedit.cpp @@ -2216,12 +2216,12 @@ void tst_QDateTimeEdit::mousePress() // Ask the SC_SpinBoxUp button location from style QStyleOptionSpinBox so; - so.rect = testWidget->rect(); + so.rect = testWidget->rect(); QRect rectUp = testWidget->style()->subControlRect(QStyle::CC_SpinBox, &so, QStyle::SC_SpinBoxUp, testWidget); - + // Send mouseClick to center of SC_SpinBoxUp QTest::mouseClick(testWidget, Qt::LeftButton, 0, rectUp.center()); - QCOMPARE(testWidget->date().year(), 2005); + QCOMPARE(testWidget->date().year(), 2005); } diff --git a/tests/auto/qdesktopservices/qdesktopservices.pro b/tests/auto/qdesktopservices/qdesktopservices.pro index 3c96e85..7c1bdb9 100644 --- a/tests/auto/qdesktopservices/qdesktopservices.pro +++ b/tests/auto/qdesktopservices/qdesktopservices.pro @@ -10,22 +10,22 @@ symbian: { dummy.path = . text.sources = text\* - text.path = \data\others\ + text.path = \data\others\ image.sources = image\* image.path = \data\images\ - + audio.sources = audio\* audio.path = \data\sounds\ - + video.sources = video\* - video.path = \data\videos\ - + video.path = \data\videos\ + install.sources = install\* - install.path = \data\installs\ - + install.path = \data\installs\ + DEPLOYMENT += image audio video install - + # These are only needed for manual tests #DEPLOYMENT += dummy text } diff --git a/tests/auto/qdesktopservices/tst_qdesktopservices.cpp b/tests/auto/qdesktopservices/tst_qdesktopservices.cpp index c69b112..5e3ae4a 100644 --- a/tests/auto/qdesktopservices/tst_qdesktopservices.cpp +++ b/tests/auto/qdesktopservices/tst_qdesktopservices.cpp @@ -61,16 +61,16 @@ private slots: void cleanup(); void openUrl(); #ifdef Q_OS_SYMBIAN - // These test are manual ones, you need to check from device that + // These test are manual ones, you need to check from device that // correct system application is started with correct content - // When you want to run these test, uncomment //#define RUN_MANUAL_TESTS + // When you want to run these test, uncomment //#define RUN_MANUAL_TESTS void openHttpUrl_data(); void openHttpUrl(); void openMailtoUrl_data(); - void openMailtoUrl(); + void openMailtoUrl(); void openFileUrl_data(); void openFileUrl(); -#endif +#endif void handlers(); void storageLocation_data(); void storageLocation(); @@ -104,7 +104,7 @@ void tst_qdesktopservices::openUrl() // At the bare minimum check that they return false for invalid url's QCOMPARE(QDesktopServices::openUrl(QUrl()), false); #if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) - // this test is only valid on windows on other systems it might mean open a new document in the application handling .file + // this test is only valid on windows on other systems it might mean open a new document in the application handling .file QCOMPARE(QDesktopServices::openUrl(QUrl("file://invalid.file")), false); #endif } @@ -112,32 +112,32 @@ void tst_qdesktopservices::openUrl() #ifdef Q_OS_SYMBIAN void tst_qdesktopservices::openHttpUrl_data() { - QTest::addColumn("url"); - QTest::addColumn("result"); - QTest::newRow("BasicWithHttp") << QUrl("http://www.google.fi") << true; - QTest::newRow("BasicWithoutHttp") << QUrl("www.nokia.fi") << true; + QTest::addColumn("url"); + QTest::addColumn("result"); + QTest::newRow("BasicWithHttp") << QUrl("http://www.google.fi") << true; + QTest::newRow("BasicWithoutHttp") << QUrl("www.nokia.fi") << true; QTest::newRow("BasicWithUserAndPw") << QUrl("http://s60prereleases:oslofjord@pepper.troll.no/s60prereleases/patches/") << true; QTest::newRow("URL with space") << QUrl("http://www.manataka.org/Contents Page.html") << true; - + } void tst_qdesktopservices::openHttpUrl() { -#ifndef RUN_MANUAL_TESTS - QSKIP("Test disabled -- only for manual purposes", SkipAll); -#endif - - QFETCH(QUrl, url); - QFETCH(bool, result); - QCOMPARE(QDesktopServices::openUrl(url), result); +#ifndef RUN_MANUAL_TESTS + QSKIP("Test disabled -- only for manual purposes", SkipAll); +#endif + + QFETCH(QUrl, url); + QFETCH(bool, result); + QCOMPARE(QDesktopServices::openUrl(url), result); QTest::qWait(30000); } void tst_qdesktopservices::openMailtoUrl_data() { QTest::addColumn("url"); - QTest::addColumn("result"); - + QTest::addColumn("result"); + // http://en.wikipedia.org/wiki/E-mail_address // RFC Valid e-mail addresses QTest::newRow("Wiki valid email 1") << QUrl("mailto:abc@example.com") << true; @@ -149,97 +149,97 @@ void tst_qdesktopservices::openMailtoUrl_data() QTest::newRow("Wiki valid email 7") << QUrl("mailto:abc+mailbox/department=shipping@example.com") << true; // S60 email client considers the next URL invalid, even ity should be valid QTest::newRow("Wiki valid email 8") << QUrl("mailto:!#$%&'*+-/=?^_`.{|}~@example.com") << true; // all of these characters are allowed - QTest::newRow("Wiki valid email 9") << QUrl("mailto:\"abc@def\"@example.com") << true; // anything goes inside quotation marks + QTest::newRow("Wiki valid email 9") << QUrl("mailto:\"abc@def\"@example.com") << true; // anything goes inside quotation marks QTest::newRow("Wiki valid email 10") << QUrl("mailto:\"Fred \\\"quota\\\" Bloggs\"@example.com") << true; // however, quotes need escaping - - // RFC invalid e-mail addresses - // These return true even though they are invalid, but check that user is notified about invalid URL in mail application - QTest::newRow("Wiki invalid email 1") << QUrl("mailto:Abc.example.com") << true; // character @ is missing - QTest::newRow("Wiki invalid email 2") << QUrl("mailto:Abc.@example.com") << true; // character dot(.) is last in local part - QTest::newRow("Wiki invalid email 3") << QUrl("mailto:Abc..123@example.com") << true; // character dot(.) is double - QTest::newRow("Wiki invalid email 4") << QUrl("mailto:A@b@c@example.com") << true; // only one @ is allowed outside quotations marks - QTest::newRow("Wiki invalid email 5") << QUrl("mailto:()[]\\;:,<>@example.com") << true; // none of the characters before the @ is allowed outside quotation marks - - QTest::newRow("Basic") << QUrl("mailto:test@nokia.com") << true; + + // RFC invalid e-mail addresses + // These return true even though they are invalid, but check that user is notified about invalid URL in mail application + QTest::newRow("Wiki invalid email 1") << QUrl("mailto:Abc.example.com") << true; // character @ is missing + QTest::newRow("Wiki invalid email 2") << QUrl("mailto:Abc.@example.com") << true; // character dot(.) is last in local part + QTest::newRow("Wiki invalid email 3") << QUrl("mailto:Abc..123@example.com") << true; // character dot(.) is double + QTest::newRow("Wiki invalid email 4") << QUrl("mailto:A@b@c@example.com") << true; // only one @ is allowed outside quotations marks + QTest::newRow("Wiki invalid email 5") << QUrl("mailto:()[]\\;:,<>@example.com") << true; // none of the characters before the @ is allowed outside quotation marks + + QTest::newRow("Basic") << QUrl("mailto:test@nokia.com") << true; QTest::newRow("BasicSeveralAddr") << QUrl("mailto:test@nokia.com,test2@nokia.com,test3@nokia.com") << true; - QTest::newRow("BasicAndSubject") << QUrl("mailto:test@nokia.com?subject=hello nokia") << true; - QTest::newRow("BasicAndTo") << QUrl("mailto:test@nokia.com?to=test2@nokia.com") << true; - + QTest::newRow("BasicAndSubject") << QUrl("mailto:test@nokia.com?subject=hello nokia") << true; + QTest::newRow("BasicAndTo") << QUrl("mailto:test@nokia.com?to=test2@nokia.com") << true; + QTest::newRow("BasicAndCc") << QUrl("mailto:test@nokia.com?cc=mycc@address.com") << true; - QTest::newRow("BasicAndBcc") << QUrl("mailto:test@nokia.com?bcc=mybcc@address.com") << true; - QTest::newRow("BasicAndBody") << QUrl("mailto:test@nokia.com?body=Test email message body") << true; - + QTest::newRow("BasicAndBcc") << QUrl("mailto:test@nokia.com?bcc=mybcc@address.com") << true; + QTest::newRow("BasicAndBody") << QUrl("mailto:test@nokia.com?body=Test email message body") << true; + // RFC examples, these are actually invalid because there is not host defined // Check that user is notified about invalid URL in mail application QTest::newRow("RFC2368 Example 1") << QUrl::fromEncoded("mailto:addr1%2C%20addr2") << true; QTest::newRow("RFC2368 Example 2") << QUrl::fromEncoded("mailto:?to=addr1%2C%20addr2") << true; QTest::newRow("RFC2368 Example 3") << QUrl("mailto:addr1?to=addr2") << true; - - QTest::newRow("RFC2368 Example 4") << QUrl("mailto:joe@example.com?cc=bob@example.com&body=hello") << true; + + QTest::newRow("RFC2368 Example 4") << QUrl("mailto:joe@example.com?cc=bob@example.com&body=hello") << true; QTest::newRow("RFC2368 Example 5") << QUrl("mailto:?to=joe@example.com&cc=bob@example.com&body=hello") << true; QTest::newRow("RFC2368 Example 6") << QUrl("mailto:foobar@example.com?In-Reply-To=%3c3469A91.D10AF4C@example.com") << true; // OpaqueData QTest::newRow("RFC2368 Example 7") << QUrl::fromEncoded("mailto:infobot@example.com?body=send%20current-issue%0D%0Asend%20index") << true; QTest::newRow("RFC2368 Example 8") << QUrl::fromEncoded("mailto:infobot@example.com?body=send%20current-issue") << true; QTest::newRow("RFC2368 Example 9") << QUrl("mailto:infobot@example.com?subject=current-issue") << true; QTest::newRow("RFC2368 Example 10") << QUrl("mailto:chris@example.com") << true; - + //QTest::newRow("RFC2368 Example 11 - illegal chars") << QUrl("mailto:joe@example.com?cc=bob@example.com?body=hello") << false; QTest::newRow("RFC2368 Example 12") << QUrl::fromEncoded("mailto:gorby%25kremvax@example.com") << true; // encoded reserved chars '%' - QTest::newRow("RFC2368 Example 13") << QUrl::fromEncoded("mailto:unlikely%3Faddress@example.com?blat=foop") << true; // encoded reserved chars `?' + QTest::newRow("RFC2368 Example 13") << QUrl::fromEncoded("mailto:unlikely%3Faddress@example.com?blat=foop") << true; // encoded reserved chars `?' } void tst_qdesktopservices::openMailtoUrl() { -#ifndef RUN_MANUAL_TESTS - QSKIP("Test disabled -- only for manual purposes", SkipAll); -#endif - - QFETCH(QUrl, url); - QFETCH(bool, result); - QCOMPARE(QDesktopServices::openUrl(url), result); +#ifndef RUN_MANUAL_TESTS + QSKIP("Test disabled -- only for manual purposes", SkipAll); +#endif + + QFETCH(QUrl, url); + QFETCH(bool, result); + QCOMPARE(QDesktopServices::openUrl(url), result); } void tst_qdesktopservices::openFileUrl_data() { QTest::addColumn("url"); - QTest::addColumn("result"); - + QTest::addColumn("result"); + // Text files - QTest::newRow("DOS text file") << QUrl("file:///c:/data/others/dosfile.txt") << true; - QTest::newRow("No EOF text file") << QUrl("file:///c:/data/others/noendofline.txt") << true; + QTest::newRow("DOS text file") << QUrl("file:///c:/data/others/dosfile.txt") << true; + QTest::newRow("No EOF text file") << QUrl("file:///c:/data/others/noendofline.txt") << true; QTest::newRow("text file") << QUrl("file:///c:/data/others/testfile.txt") << true; - QTest::newRow("text file with space") << QUrl("file:///c:/data/others/test file.txt") << true; - + QTest::newRow("text file with space") << QUrl("file:///c:/data/others/test file.txt") << true; + // Images - QTest::newRow("BMP image") << QUrl("file:///c:/data/images/image.bmp") << true; - QTest::newRow("GIF image") << QUrl("file:///c:/data/images/image.gif") << true; - QTest::newRow("JPG image") << QUrl("file:///c:/data/images/image.jpg") << true; - QTest::newRow("PNG image") << QUrl("file:///c:/data/images/image.png") << true; - - // Audio - QTest::newRow("MP4 audio") << QUrl("file:///c:/data/sounds/aac-only.mp4") << true; - QTest::newRow("3GP audio") << QUrl("file:///c:/data/sounds/audio_3gpp.3gp") << true; - - // Video - QTest::newRow("MP4 video") << QUrl("file:///c:/data/videos/vid-mpeg4-22k.mp4") << true; - - // Installs - QTest::newRow("SISX") << QUrl("file:///c:/data/installs/ErrRd.sisx") << true; - - // Errors - QTest::newRow("File does not exist") << QUrl("file:///c:/thisfileneverexists.txt") << false; + QTest::newRow("BMP image") << QUrl("file:///c:/data/images/image.bmp") << true; + QTest::newRow("GIF image") << QUrl("file:///c:/data/images/image.gif") << true; + QTest::newRow("JPG image") << QUrl("file:///c:/data/images/image.jpg") << true; + QTest::newRow("PNG image") << QUrl("file:///c:/data/images/image.png") << true; + + // Audio + QTest::newRow("MP4 audio") << QUrl("file:///c:/data/sounds/aac-only.mp4") << true; + QTest::newRow("3GP audio") << QUrl("file:///c:/data/sounds/audio_3gpp.3gp") << true; + + // Video + QTest::newRow("MP4 video") << QUrl("file:///c:/data/videos/vid-mpeg4-22k.mp4") << true; + + // Installs + QTest::newRow("SISX") << QUrl("file:///c:/data/installs/ErrRd.sisx") << true; + + // Errors + QTest::newRow("File does not exist") << QUrl("file:///c:/thisfileneverexists.txt") << false; } void tst_qdesktopservices::openFileUrl() { -#ifndef RUN_MANUAL_TESTS - QSKIP("Test disabled -- only for manual purposes", SkipAll); -#endif - - QFETCH(QUrl, url); - QFETCH(bool, result); +#ifndef RUN_MANUAL_TESTS + QSKIP("Test disabled -- only for manual purposes", SkipAll); +#endif + + QFETCH(QUrl, url); + QFETCH(bool, result); QCOMPARE(QDesktopServices::openUrl(url), result); - QTest::qWait(15000); + QTest::qWait(15000); } #endif @@ -297,11 +297,11 @@ void tst_qdesktopservices::storageLocation() QString storageLocation = QDesktopServices::storageLocation(location); QString displayName = QDesktopServices::displayName(location); //qDebug( "displayName: %s", displayName ); - + storageLocation = storageLocation.toLower(); displayName = displayName.toLower(); - - QString drive = QDir::currentPath().left(2).toLower(); + + QString drive = QDir::currentPath().left(2).toLower(); if( drive == "z:" ) drive = "c:"; @@ -319,9 +319,9 @@ void tst_qdesktopservices::storageLocation() case QDesktopServices::ApplicationsLocation: #ifdef Q_CC_NOKIAX86 QCOMPARE( storageLocation, QString("z:/sys/bin") ); -#else - QCOMPARE( storageLocation, drive + QString("/sys/bin") ); -#endif +#else + QCOMPARE( storageLocation, drive + QString("/sys/bin") ); +#endif break; case QDesktopServices::MusicLocation: QCOMPARE( storageLocation, drive + QString("/data/sounds") ); @@ -331,7 +331,7 @@ void tst_qdesktopservices::storageLocation() break; case QDesktopServices::PicturesLocation: QCOMPARE( storageLocation, drive + QString("/data/images") ); - break; + break; case QDesktopServices::TempLocation: QCOMPARE( storageLocation, QDir::tempPath().toLower()); break; @@ -339,18 +339,18 @@ void tst_qdesktopservices::storageLocation() QCOMPARE( storageLocation, QDir::homePath().toLower()); break; case QDesktopServices::DataLocation: - // Just check the folder not the drive + // Just check the folder not the drive QCOMPARE( storageLocation.mid(2), QDir::currentPath().mid(2).toLower()); - break; + break; default: QCOMPARE( storageLocation, QString() ); - break; + break; } #else QDesktopServices::storageLocation(location); QDesktopServices::displayName(location); -#endif +#endif } diff --git a/tests/auto/qdir/tst_qdir.cpp b/tests/auto/qdir/tst_qdir.cpp index 8f8200c..503c3e9 100644 --- a/tests/auto/qdir/tst_qdir.cpp +++ b/tests/auto/qdir/tst_qdir.cpp @@ -382,20 +382,20 @@ void tst_QDir::entryList_data() QTest::addColumn("sortspec"); QTest::addColumn("expected"); QTest::newRow("spaces1") << SRCDIR "testdir/spaces" << QStringList("*. bar") - << (int)(QDir::NoFilter) << (int)(QDir::NoSort) - << QStringList("foo. bar"); // notice how spaces5 works + << (int)(QDir::NoFilter) << (int)(QDir::NoSort) + << QStringList("foo. bar"); // notice how spaces5 works QTest::newRow("spaces2") << SRCDIR "testdir/spaces" << QStringList("*.bar") - << (int)(QDir::NoFilter) << (int)(QDir::NoSort) - << QStringList("foo.bar"); + << (int)(QDir::NoFilter) << (int)(QDir::NoSort) + << QStringList("foo.bar"); QTest::newRow("spaces3") << SRCDIR "testdir/spaces" << QStringList("foo.*") - << (int)(QDir::NoFilter) << (int)(QDir::NoSort) - << QString("foo. bar,foo.bar").split(','); + << (int)(QDir::NoFilter) << (int)(QDir::NoSort) + << QString("foo. bar,foo.bar").split(','); QTest::newRow("files1") << SRCDIR "testdir/dir" << QString("*r.cpp *.pro").split(" ") - << (int)(QDir::NoFilter) << (int)(QDir::NoSort) - << QString("qdir.pro,qrc_qdir.cpp,tst_qdir.cpp").split(','); + << (int)(QDir::NoFilter) << (int)(QDir::NoSort) + << QString("qdir.pro,qrc_qdir.cpp,tst_qdir.cpp").split(','); QTest::newRow("testdir1") << SRCDIR "testdir" << QStringList() - << (int)(QDir::AllDirs) << (int)(QDir::NoSort) - << QString(".,..,dir,spaces").split(','); + << (int)(QDir::AllDirs) << (int)(QDir::NoSort) + << QString(".,..,dir,spaces").split(','); // #### this test uses filenames that cannot be represented on all filesystems we test, in // particular HFS+ on the Mac. When checking out the files with perforce it silently ignores the // error that it cannot represent the file names stored in the repository and the test fails. That @@ -404,8 +404,8 @@ void tst_QDir::entryList_data() // ignored but git reports an error. The test only tried to prevent QDir from _hanging_ when listing // the directory. // QTest::newRow("unprintablenames") << SRCDIR "unprintablenames" << QStringList("*") -// << (int)(QDir::NoFilter) << (int)(QDir::NoSort) -// << QString(".,..").split(","); +// << (int)(QDir::NoFilter) << (int)(QDir::NoSort) +// << QString(".,..").split(","); QTest::newRow("resources1") << QString(":/tst_qdir/resources/entryList") << QStringList("*.data") << (int)(QDir::NoFilter) << (int)(QDir::NoSort) << QString("file1.data,file2.data,file3.data").split(','); @@ -540,10 +540,10 @@ void tst_QDir::entryList() QFile::remove(SRCDIR "entrylist/brokenlink.lnk"); QFile::remove(SRCDIR "entrylist/brokenlink"); - // WinCE/Symbian does not have . and .. in the directory listing + // WinCE/Symbian does not have . and .. in the directory listing #if defined(Q_OS_WINCE) || defined(Q_OS_SYMBIAN) - expected.removeAll("."); - expected.removeAll(".."); + expected.removeAll("."); + expected.removeAll(".."); #endif #if defined(Q_OS_WIN) @@ -553,7 +553,7 @@ void tst_QDir::entryList() QFile::link(SRCDIR "entryList/nothing", SRCDIR "entrylist/brokenlink.lnk"); #elif defined(Q_OS_SYMBIAN) // Symbian doesn't support links to directories - expected.removeAll("linktodirectory.lnk"); + expected.removeAll("linktodirectory.lnk"); // Expecting failures from a couple of OpenC bugs. Do checks only once. static int xFailChecked = false; @@ -737,7 +737,7 @@ void tst_QDir::canonicalPath_data() } #endif - QTest::newRow("relative") << "." << appPath; + QTest::newRow("relative") << "." << appPath; QTest::newRow("relativeSubDir") << "./testData/../testData" << appPath + "/testData"; #ifndef Q_WS_WIN @@ -784,10 +784,10 @@ void tst_QDir::current_data() else appPath.chop(1); // remove the ending slash #if defined Q_WS_WIN - if (appPath.endsWith("release", Qt::CaseInsensitive)) - appPath = appPath.left(appPath.length()-8); + if (appPath.endsWith("release", Qt::CaseInsensitive)) + appPath = appPath.left(appPath.length()-8); else if (appPath.endsWith("debug", Qt::CaseInsensitive)) - appPath = appPath.left(appPath.length()-6); + appPath = appPath.left(appPath.length()-6); #endif QTest::newRow("startup") << QString() << appPath; @@ -821,9 +821,9 @@ void tst_QDir::current() QDir newCurrent = QDir::current(); QDir::setCurrent(oldDir); #if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN) - QCOMPARE(newCurrent.absolutePath().toLower(), currentDir.toLower()); + QCOMPARE(newCurrent.absolutePath().toLower(), currentDir.toLower()); #else - QCOMPARE(newCurrent.absolutePath(), currentDir); + QCOMPARE(newCurrent.absolutePath(), currentDir); #endif } @@ -838,8 +838,8 @@ void tst_QDir::cd_data() QTest::addColumn("newDir"); QString appPath = QDir::currentPath(); - int index = appPath.lastIndexOf("/"); - QTest::newRow("cdUp") << QDir::currentPath() << ".." << true << appPath.left(index==0?1:index); + int index = appPath.lastIndexOf("/"); + QTest::newRow("cdUp") << QDir::currentPath() << ".." << true << appPath.left(index==0?1:index); QTest::newRow("noChange") << QDir::currentPath() << "." << true << appPath; #if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN) // on windows QDir::root() is usually c:/ but cd "/" will not force it to be root QTest::newRow("absolute") << QDir::currentPath() << "/" << true << "/"; @@ -881,11 +881,11 @@ void tst_QDir::setNameFilters_data() QTest::newRow("spaces1") << appPath + "testdir/spaces" << QStringList("*. bar") << QStringList("foo. bar"); QTest::newRow("spaces2") << appPath + "testdir/spaces" << QStringList("*.bar") - << QStringList("foo.bar"); + << QStringList("foo.bar"); QTest::newRow("spaces3") << appPath + "testdir/spaces" << QStringList("foo.*") - << QString("foo. bar,foo.bar").split(","); + << QString("foo. bar,foo.bar").split(","); QTest::newRow("files1") << appPath + "testdir/dir" << QString("*r.cpp *.pro").split(" ") - << QString("qdir.pro,qrc_qdir.cpp,tst_qdir.cpp").split(","); + << QString("qdir.pro,qrc_qdir.cpp,tst_qdir.cpp").split(","); QTest::newRow("resources1") << QString(":/tst_qdir/resources/entryList") << QStringList("*.data") << QString("file1.data,file2.data,file3.data").split(','); } @@ -1172,7 +1172,7 @@ void tst_QDir::operator_eq() void tst_QDir::dotAndDotDot() { #if defined(Q_OS_WINCE) || defined(Q_OS_SYMBIAN) - QSKIP("WinCE and Symbian do not have . nor ..", SkipAll); + QSKIP("WinCE and Symbian do not have . nor ..", SkipAll); #endif QDir dir(QString(SRCDIR "testdir/")); QStringList entryList = dir.entryList(QDir::Dirs); diff --git a/tests/auto/qfiledialog/qfiledialog.pro b/tests/auto/qfiledialog/qfiledialog.pro index 3c238ec..bea7716 100644 --- a/tests/auto/qfiledialog/qfiledialog.pro +++ b/tests/auto/qfiledialog/qfiledialog.pro @@ -15,6 +15,4 @@ wince*|symbian: { } symbian:TARGET.EPOCHEAPSIZE="0x100 0x1000000" - symbian:HEADERS += ../../../include/qtgui/private/qfileinfogatherer_p.h - diff --git a/tests/auto/qfileinfo/tst_qfileinfo.cpp b/tests/auto/qfileinfo/tst_qfileinfo.cpp index d94c7e4..fde4e0a 100644 --- a/tests/auto/qfileinfo/tst_qfileinfo.cpp +++ b/tests/auto/qfileinfo/tst_qfileinfo.cpp @@ -1101,7 +1101,7 @@ void tst_QFileInfo::isExecutable() #ifdef Q_OS_SYMBIAN # if defined(Q_CC_NOKIAX86) QSKIP("Impossible to implement reading/touching of application binaries in Symbian emulator", SkipAll); -# endif +# endif QString appPath = "c:/sys/bin/tst_qfileinfo.exe"; #else QString appPath = QCoreApplication::applicationDirPath(); diff --git a/tests/auto/qfilesystemmodel/qfilesystemmodel.pro b/tests/auto/qfilesystemmodel/qfilesystemmodel.pro index e9d7272..9750c43 100644 --- a/tests/auto/qfilesystemmodel/qfilesystemmodel.pro +++ b/tests/auto/qfilesystemmodel/qfilesystemmodel.pro @@ -3,12 +3,12 @@ CONFIG += qttest_p4 include(../../src/qfiledialog.pri) include(../../../../modeltest/modeltest.pri) -SOURCES += tst_qfilesystemmodel.cpp +SOURCES += tst_qfilesystemmodel.cpp TARGET = tst_qfilesystemmodel symbian: { HEADERS += ../../../include/qtgui/private/qfileinfogatherer_p.h - + # need to deploy something to create the private directory dummyDeploy.sources = tst_qfilesystemmodel.cpp dummyDeploy.path = . diff --git a/tests/auto/qfontdatabase/tst_qfontdatabase.cpp b/tests/auto/qfontdatabase/tst_qfontdatabase.cpp index 7dd2fd0..eec9872 100644 --- a/tests/auto/qfontdatabase/tst_qfontdatabase.cpp +++ b/tests/auto/qfontdatabase/tst_qfontdatabase.cpp @@ -193,7 +193,7 @@ void tst_QFontDatabase::addAppFont() { #ifdef Q_OS_SYMBIAN QSKIP( "Symbian: Application fonts are not yet supported", SkipAll ); -#else +#else QFETCH(bool, useMemoryFont); QSignalSpy fontDbChangedSpy(QApplication::instance(), SIGNAL(fontDatabaseChanged())); @@ -243,7 +243,7 @@ void tst_QFontDatabase::addAppFont() QCOMPARE(fontDbChangedSpy.count(), 2); QVERIFY(db.families() == oldFamilies); -#endif +#endif } QTEST_MAIN(tst_QFontDatabase) diff --git a/tests/auto/qfontdialog/tst_qfontdialog.cpp b/tests/auto/qfontdialog/tst_qfontdialog.cpp index 1444ee0..57098a8 100644 --- a/tests/auto/qfontdialog/tst_qfontdialog.cpp +++ b/tests/auto/qfontdialog/tst_qfontdialog.cpp @@ -170,7 +170,7 @@ void tst_QFontDialog::task256466_wrongStyle() for (int i = 0; i < familyList->model()->rowCount(); ++i) { QModelIndex currentFamily = familyList->model()->index(i, 0); familyList->setCurrentIndex(currentFamily); - QCOMPARE(dialog.currentFont(), fdb.font(currentFamily.data().toString(), + QCOMPARE(dialog.currentFont(), fdb.font(currentFamily.data().toString(), styleList->currentIndex().data().toString(), sizeList->currentIndex().data().toInt())); } } diff --git a/tests/auto/qftp/tst_qftp.cpp b/tests/auto/qftp/tst_qftp.cpp index 7942d4b..f32803e 100644 --- a/tests/auto/qftp/tst_qftp.cpp +++ b/tests/auto/qftp/tst_qftp.cpp @@ -193,7 +193,7 @@ tst_QFtp::tst_QFtp() } tst_QFtp::~tst_QFtp() -{ +{ } void tst_QFtp::initTestCase_data() @@ -201,12 +201,12 @@ void tst_QFtp::initTestCase_data() QTest::addColumn("setProxy"); QTest::addColumn("proxyType"); - QTest::newRow("WithoutProxy") << false << 0; -#ifdef TEST_QNETWORK_PROXY + QTest::newRow("WithoutProxy") << false << 0; +#ifdef TEST_QNETWORK_PROXY QTest::newRow("WithSocks5Proxy") << true << int(QNetworkProxy::Socks5Proxy); //### doesn't work well yet. //QTest::newRow("WithHttpProxy") << true << int(QNetworkProxy::HttpProxy); -#endif +#endif } void tst_QFtp::initTestCase() @@ -1293,7 +1293,7 @@ void tst_QFtp::abort_data() QTest::newRow( "get_fluke02" ) << QtNetworkSettings::serverName() << (uint)21 << QString("qtest/rfc3252") << QByteArray(); // Qt/CE and Symbian test environment has to less memory for this test -#if !defined(Q_OS_WINCE) && !defined(Q_OS_SYMBIAN) +#if !defined(Q_OS_WINCE) && !defined(Q_OS_SYMBIAN) QByteArray bigData( 10*1024*1024, 0 ); bigData.fill( 'B' ); diff --git a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp index 7552f18..5df4e9e 100644 --- a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp +++ b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp @@ -6468,7 +6468,7 @@ public: QGraphicsRectItem::paint(painter, option, widget); painter->drawText(boundingRect(), Qt::AlignCenter, QString("%1x%2\n%3x%4").arg(p.x()).arg(p.y()).arg(sp.x()).arg(sp.y())); } - + protected: void hoverMoveEvent(QGraphicsSceneHoverEvent *event) { @@ -6650,7 +6650,7 @@ void tst_QGraphicsItem::setTransformProperties_data() QTest::newRow("rotationXYZ") << QPointF() << qreal(-25) << qreal(12) << qreal(556) << qreal(1.0) << qreal(1.0) << qreal(0.0) << qreal(0.0); - QTest::newRow("rotationXYZ dicentred") << QPointF(-53, 25.2) + QTest::newRow("rotationXYZ dicentred") << QPointF(-53, 25.2) << qreal(-2578.2) << qreal(4565.2) << qreal(56) << qreal(1.0) << qreal(1.0) << qreal(0.0) << qreal(0.0); @@ -6789,7 +6789,7 @@ void tst_QGraphicsItem::setTransformProperties() QCOMPARE_TRANSFORM(item1->sceneTransform(), item2->sceneTransform()); - QCOMPARE_TRANSFORM(item1->itemTransform(item2), QTransform()); + QCOMPARE_TRANSFORM(item1->itemTransform(item2), QTransform()); QCOMPARE_TRANSFORM(item2->itemTransform(item1), QTransform()); } @@ -6819,7 +6819,7 @@ void tst_QGraphicsItem::setTransformProperties() QCOMPARE_TRANSFORM(item1->sceneTransform(), item2->sceneTransform()); - QCOMPARE_TRANSFORM(item1->itemTransform(item2), QTransform()); + QCOMPARE_TRANSFORM(item1->itemTransform(item2), QTransform()); QCOMPARE_TRANSFORM(item2->itemTransform(item1), QTransform()); } } diff --git a/tests/auto/qgraphicslayout/tst_qgraphicslayout.cpp b/tests/auto/qgraphicslayout/tst_qgraphicslayout.cpp index 536c750..ea2646e 100644 --- a/tests/auto/qgraphicslayout/tst_qgraphicslayout.cpp +++ b/tests/auto/qgraphicslayout/tst_qgraphicslayout.cpp @@ -178,7 +178,7 @@ void tst_QGraphicsLayout::automaticReparenting() QCOMPARE(w1->parentItem(), static_cast(window)); QCOMPARE(w2->parentItem(), static_cast(window)); - // Sublayouts + // Sublayouts QGraphicsLinearLayout *l2 = new QGraphicsLinearLayout(); QGraphicsWidget *w3 = new QGraphicsWidget(); l2->addItem(w3); @@ -212,7 +212,7 @@ void tst_QGraphicsLayout::automaticReparenting() class TestLayout : public QGraphicsLinearLayout { public: - TestLayout(QGraphicsLayoutItem *parent = 0) + TestLayout(QGraphicsLayoutItem *parent = 0) : QGraphicsLinearLayout(parent) { m_count = 0; @@ -224,7 +224,7 @@ class TestLayout : public QGraphicsLinearLayout QGraphicsLinearLayout::setGeometry(rect); } - + int m_count; }; @@ -320,9 +320,9 @@ public: } void setGeometry(const QRectF &geom); - + QSizeF sizeHint(Qt::SizeHint which, const QSizeF & constraint = QSizeF() ) const; - + inline QGraphicsRectItem *rectItem() { return static_cast(graphicsItem()); } @@ -354,20 +354,20 @@ QSizeF AnimatedLayoutItem::sizeHint(Qt::SizeHint which, const QSizeF &constraint class AnimatedLayout : public QObject, public QGraphicsLinearLayout { Q_OBJECT public: - AnimatedLayout(QGraphicsWidget *widget) : QGraphicsLinearLayout(widget), m_timeline(500, this) + AnimatedLayout(QGraphicsWidget *widget) : QGraphicsLinearLayout(widget), m_timeline(500, this) { connect(&m_timeline, SIGNAL(valueChanged(qreal)), this, SLOT(valueChanged(qreal))); } - + void setGeometry(const QRectF &geom) { fromGeoms.clear(); toGeoms.clear(); for (int i = 0; i < count(); ++i) { fromGeoms << itemAt(i)->geometry(); } - + QGraphicsLinearLayout::setGeometry(geom); - + for (int i = 0; i < count(); ++i) { toGeoms << itemAt(i)->geometry(); } @@ -380,13 +380,13 @@ private slots: QGraphicsLayoutItem *li = itemAt(i); QRectF from = fromGeoms.at(i); QRectF to = toGeoms.at(i); - - QRectF geom(from.topLeft() + (to.topLeft() - from.topLeft()) * value, + + QRectF geom(from.topLeft() + (to.topLeft() - from.topLeft()) * value, from.size() + (to.size() - from.size()) * value); static_cast(li->graphicsItem())->setRect(geom); } } -private: +private: QTimeLine m_timeline; QVector fromGeoms; QVector toGeoms; @@ -407,7 +407,7 @@ void tst_QGraphicsLayout::alternativeLayoutItems() QGraphicsRectItem *item1 = new QGraphicsRectItem; AnimatedLayoutItem *li1 = new AnimatedLayoutItem(item1); lout->addItem(li1); - + QGraphicsRectItem *item2 = new QGraphicsRectItem; AnimatedLayoutItem *li2 = new AnimatedLayoutItem(item2); lout->addItem(li2); @@ -417,7 +417,7 @@ void tst_QGraphicsLayout::alternativeLayoutItems() lout->addItem(li3); window->setLayout(lout); - + window->setGeometry(0, 0, 99, 99); view.setSceneRect(QRectF(-10, -10, 110, 110)); view.resize(150, 150); @@ -426,11 +426,11 @@ void tst_QGraphicsLayout::alternativeLayoutItems() QApplication::processEvents(); QTest::qWait(750); QApplication::processEvents(); - + QCOMPARE(static_cast(li1->graphicsItem())->rect(), QRectF( 0, 0, 33, 99)); QCOMPARE(static_cast(li2->graphicsItem())->rect(), QRectF(33, 0, 33, 99)); QCOMPARE(static_cast(li3->graphicsItem())->rect(), QRectF(66, 0, 33, 99)); - + lout->setOrientation(Qt::Vertical); QApplication::processEvents(); @@ -439,7 +439,7 @@ void tst_QGraphicsLayout::alternativeLayoutItems() QCOMPARE(static_cast(li1->graphicsItem())->rect(), QRectF(0, 0, 99, 33)); QCOMPARE(static_cast(li2->graphicsItem())->rect(), QRectF(0, 33, 99, 33)); QCOMPARE(static_cast(li3->graphicsItem())->rect(), QRectF(0, 66, 99, 33)); - + } class CustomLayoutItem : public QGraphicsLayoutItem { @@ -451,8 +451,8 @@ public: setOwnedByLayout(true); } - QSizeF sizeHint(Qt::SizeHint which, const QSizeF & constraint = QSizeF() ) const; - + QSizeF sizeHint(Qt::SizeHint which, const QSizeF & constraint = QSizeF() ) const; + ~CustomLayoutItem() { m_destructedSet->insert(this); } @@ -482,8 +482,8 @@ public: m_destructedSet = destructedSet; } - QSizeF sizeHint(Qt::SizeHint which, const QSizeF & constraint = QSizeF() ) const; - + QSizeF sizeHint(Qt::SizeHint which, const QSizeF & constraint = QSizeF() ) const; + void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget * = 0) { const QRect r = option->rect.adjusted(0, 0, -1, -1); @@ -565,7 +565,7 @@ void insertItem(int index, QGraphicsLayoutItem *item) QGraphicsWidget *widget = static_cast(item); updateParentWidget(widget); - + if (index == items.count()) { items.append(item); @@ -613,7 +613,7 @@ void tst_QGraphicsLayout::ownership() CustomLayoutItem *li3 = new CustomLayoutItem(&destructedSet); lay->addItem(li3); destructedSet.clear(); - + delete lay; QSet expected; expected << li1 << li2 << li3; @@ -642,10 +642,10 @@ void tst_QGraphicsLayout::ownership() { QGraphicsWidget *window = new QGraphicsWidget(0, Qt::Window); QGraphicsLinearLayout *lay = new QGraphicsLinearLayout; - + CustomGraphicsWidget *li1 = new CustomGraphicsWidget; lay->addItem(li1); - + QGraphicsLinearLayout *li2 = new QGraphicsLinearLayout; CustomGraphicsWidget *li2_1 = new CustomGraphicsWidget; li2->addItem(li2_1); @@ -654,25 +654,25 @@ void tst_QGraphicsLayout::ownership() CustomGraphicsWidget *li2_3 = new CustomGraphicsWidget; li2->addItem(li2_3); lay->addItem(li2); - + CustomGraphicsWidget *li3 = new CustomGraphicsWidget; lay->addItem(li3); - + window->setLayout(lay); scene.addItem(window); view.resize(500, 200); view.show(); - + for (int i = li2->count(); i > 0; --i) { QCOMPARE(li2->count(), i); delete li2->itemAt(0); } - + for (int i = lay->count(); i > 0; --i) { QCOMPARE(lay->count(), i); delete lay->itemAt(0); } - + delete window; } @@ -687,7 +687,7 @@ void tst_QGraphicsLayout::ownership() delete top; //don't crash after that. } - + } QTEST_MAIN(tst_QGraphicsLayout) diff --git a/tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp b/tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp index 0b1d5cf..b07d87e 100644 --- a/tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp +++ b/tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp @@ -3187,7 +3187,7 @@ void tst_QGraphicsProxyWidget::windowFlags() QVERIFY((widget->windowFlags() & widgetWFlags) == widgetWFlags); proxy.setWidget(widget); - + if (resultingProxyFlags == 0) QVERIFY(!proxy.windowFlags()); else @@ -3223,4 +3223,3 @@ QTEST_MAIN(tst_QGraphicsProxyWidget) #else // QT_NO_STYLE_CLEANLOOKS QTEST_NOOP_MAIN #endif - diff --git a/tests/auto/qhostinfo/tst_qhostinfo.cpp b/tests/auto/qhostinfo/tst_qhostinfo.cpp index 50d2325..f4ad307 100644 --- a/tests/auto/qhostinfo/tst_qhostinfo.cpp +++ b/tests/auto/qhostinfo/tst_qhostinfo.cpp @@ -165,7 +165,7 @@ tst_QHostInfo::tst_QHostInfo() } tst_QHostInfo::~tst_QHostInfo() -{ +{ } void tst_QHostInfo::initTestCase() @@ -223,7 +223,7 @@ void tst_QHostInfo::lookupIPv4_data() QTest::newRow("empty") << "" << "" << int(QHostInfo::HostNotFound); QTest::newRow("lupinella_00") << "l" << lupinellaIp << int(QHostInfo::NoError); - QTest::newRow("lupinella_01") << "lupinella" << lupinellaIp << int(QHostInfo::NoError); + QTest::newRow("lupinella_01") << "lupinella" << lupinellaIp << int(QHostInfo::NoError); QTest::newRow("lupinella_02") << "lupinella.troll.no" << lupinellaIp << int(QHostInfo::NoError); QTest::newRow("lupinella_03") << "lupinella.trolltech.com" << lupinellaIp << int(QHostInfo::NoError); QTest::newRow("multiple_ip4") << "multi.dev.troll.no" << "1.2.3.4 1.2.3.5 10.3.3.31" << int(QHostInfo::NoError); @@ -392,7 +392,7 @@ protected: void tst_QHostInfo::threadSafety() { const int nattempts = 5; -#if defined(Q_OS_WINCE) || defined(Q_OS_SYMBIAN) +#if defined(Q_OS_WINCE) || defined(Q_OS_SYMBIAN) const int runs = 10; #else const int runs = 100; diff --git a/tests/auto/qhttp/tst_qhttp.cpp b/tests/auto/qhttp/tst_qhttp.cpp index a6bec39..37ce256 100644 --- a/tests/auto/qhttp/tst_qhttp.cpp +++ b/tests/auto/qhttp/tst_qhttp.cpp @@ -198,9 +198,9 @@ void tst_QHttp::initTestCase_data() QTest::addColumn("proxyType"); QTest::newRow("WithoutProxy") << false << 0; -#ifdef TEST_QNETWORK_PROXY +#ifdef TEST_QNETWORK_PROXY QTest::newRow("WithSocks5Proxy") << true << int(QNetworkProxy::Socks5Proxy); -#endif +#endif } void tst_QHttp::initTestCase() @@ -426,7 +426,7 @@ void tst_QHttp::head_data() QTest::newRow( "failprot_01" ) << QtNetworkSettings::serverName() << 80u << QString("/t") << 1 << 404 << 0u; - + QTest::newRow( "failprot_02" ) << QtNetworkSettings::serverName() << 80u << QString("qtest/rfc3252.txt") << 1 << 400 << 0u; @@ -1242,11 +1242,11 @@ void tst_QHttp::unexpectedRemoteClose() QCoreApplication::instance()->processEvents(); QEventLoop loop; -#ifndef Q_OS_SYMBIAN +#ifndef Q_OS_SYMBIAN QTimer::singleShot(3000, &loop, SLOT(quit())); -#else +#else QTimer::singleShot(30000, &loop, SLOT(quit())); -#endif +#endif QHttp http; QObject::connect(&http, SIGNAL(done(bool)), &loop, SLOT(quit())); diff --git a/tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp b/tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp index 236d1a1..9fe59c9 100644 --- a/tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp +++ b/tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp @@ -419,17 +419,17 @@ void tst_QHttpNetworkConnection::post() QCOMPARE(reply->statusCode(), statusCode); QCOMPARE(reply->reasonPhrase(), statusString); - + qint64 cLen = reply->contentLength(); if (cLen==-1) { - // HTTP 1.1 server may respond with chunked encoding and in that + // HTTP 1.1 server may respond with chunked encoding and in that // case contentLength is not present in reply -> verify that it is the case QByteArray transferEnc = reply->headerField("Transfer-Encoding"); QCOMPARE(transferEnc, QByteArray("chunked")); - } else { + } else { QCOMPARE(cLen, qint64(contentLength)); - } - + } + stopWatch.start(); QByteArray ba; do { @@ -442,7 +442,7 @@ void tst_QHttpNetworkConnection::post() QVERIFY(reply->isFinished()); QCOMPARE(ba.size(), downloadSize); - + delete reply; } diff --git a/tests/auto/qhttpsocketengine/tst_qhttpsocketengine.cpp b/tests/auto/qhttpsocketengine/tst_qhttpsocketengine.cpp index ce96a2c..4287a16 100644 --- a/tests/auto/qhttpsocketengine/tst_qhttpsocketengine.cpp +++ b/tests/auto/qhttpsocketengine/tst_qhttpsocketengine.cpp @@ -324,9 +324,9 @@ void tst_QHttpSocketEngine::simpleConnectToIMAP() array.resize(available); QVERIFY(socketDevice.read(array.data(), array.size()) == available); - // Check that the greeting is what we expect it to be - QCOMPARE(array.constData(), QtNetworkSettings::expectedReplyIMAP().constData()); - + // Check that the greeting is what we expect it to be + QCOMPARE(array.constData(), QtNetworkSettings::expectedReplyIMAP().constData()); + // Write a logout message QByteArray array2 = "XXXX LOGOUT\r\n"; @@ -455,7 +455,7 @@ void tst_QHttpSocketEngine::tcpSocketBlockingTest() // Read greeting QVERIFY(socket.waitForReadyRead(5000)); QString s = socket.readLine(); - QCOMPARE(s.toLatin1().constData(), QtNetworkSettings::expectedReplyIMAP().constData()); + QCOMPARE(s.toLatin1().constData(), QtNetworkSettings::expectedReplyIMAP().constData()); // Write NOOP QCOMPARE((int) socket.write("1 NOOP\r\n", 8), 8); @@ -528,11 +528,11 @@ void tst_QHttpSocketEngine::tcpSocketNonBlockingTest() } // Read greeting - QVERIFY(!tcpSocketNonBlocking_data.isEmpty()); - QCOMPARE(tcpSocketNonBlocking_data.at(0).toLatin1().constData(), - QtNetworkSettings::expectedReplyIMAP().constData()); - - + QVERIFY(!tcpSocketNonBlocking_data.isEmpty()); + QCOMPARE(tcpSocketNonBlocking_data.at(0).toLatin1().constData(), + QtNetworkSettings::expectedReplyIMAP().constData()); + + tcpSocketNonBlocking_data.clear(); tcpSocketNonBlocking_totalWritten = 0; @@ -710,10 +710,10 @@ void tst_QHttpSocketEngine::passwordAuth() QByteArray array; array.resize(available); QVERIFY(socketDevice.read(array.data(), array.size()) == available); - + // Check that the greeting is what we expect it to be - QCOMPARE(array.constData(), QtNetworkSettings::expectedReplyIMAP().constData()); - + QCOMPARE(array.constData(), QtNetworkSettings::expectedReplyIMAP().constData()); + // Write a logout message QByteArray array2 = "XXXX LOGOUT\r\n"; diff --git a/tests/auto/qimage/tst_qimage.cpp b/tests/auto/qimage/tst_qimage.cpp index af02bbf..703be80 100644 --- a/tests/auto/qimage/tst_qimage.cpp +++ b/tests/auto/qimage/tst_qimage.cpp @@ -270,7 +270,7 @@ void tst_QImage::formatHandlersInput_data() const QString prefix = QLatin1String(SRCDIR) + "images/"; #else const QString prefix = QLatin1String(SRCDIR) + "/images/"; - #endif + #endif // add a new line here when a file is added QTest::newRow("ICO") << "ICO" << prefix + "image.ico"; @@ -1476,9 +1476,9 @@ void tst_QImage::smoothScale3() void tst_QImage::smoothScaleBig() { #if defined(Q_OS_WINCE) - int bigValue = 2000; + int bigValue = 2000; #elif defined(Q_OS_SYMBIAN) - int bigValue = 2000; + int bigValue = 2000; #else int bigValue = 200000; #endif diff --git a/tests/auto/qimagereader/qimagereader.pro b/tests/auto/qimagereader/qimagereader.pro index 44a0ddc..b4e1de1 100644 --- a/tests/auto/qimagereader/qimagereader.pro +++ b/tests/auto/qimagereader/qimagereader.pro @@ -35,4 +35,3 @@ symbian*: { DEPLOYMENT += images imagePlugins } - diff --git a/tests/auto/qitemdelegate/tst_qitemdelegate.cpp b/tests/auto/qitemdelegate/tst_qitemdelegate.cpp index f1adc51..df0853b 100644 --- a/tests/auto/qitemdelegate/tst_qitemdelegate.cpp +++ b/tests/auto/qitemdelegate/tst_qitemdelegate.cpp @@ -1120,7 +1120,7 @@ void tst_QItemDelegate::enterKey() QTest::keyClick(editor, Qt::Key(key)); QApplication::processEvents(); - + if (widget == 2 || widget == 3) { QVERIFY(!editor.isNull()); QCOMPARE(editor && editor->hasFocus(), expectedFocus); diff --git a/tests/auto/qitemview/tst_qitemview.cpp b/tests/auto/qitemview/tst_qitemview.cpp index 6b664e7..afe679c 100644 --- a/tests/auto/qitemview/tst_qitemview.cpp +++ b/tests/auto/qitemview/tst_qitemview.cpp @@ -256,7 +256,7 @@ void tst_QItemView::populate() { treeModel = new CheckerModel; QModelIndex parent; -#if defined(QT_ARCH_ARM) || defined(Q_OS_SYMBIAN) +#if defined(QT_ARCH_ARM) || defined(Q_OS_SYMBIAN) const int baseInsert = 4; #else const int baseInsert = 26; @@ -360,7 +360,7 @@ void tst_QItemView::nonDestructiveBasicTest() QCOMPARE(view->showDropIndicator(), false); view->setDropIndicatorShown(true); QCOMPARE(view->showDropIndicator(), true); - + // setDragEnabled view->setDragEnabled(false); QCOMPARE(view->dragEnabled(), false); diff --git a/tests/auto/qkeyevent/tst_qkeyevent.cpp b/tests/auto/qkeyevent/tst_qkeyevent.cpp index 1e19a49..9adf97c 100644 --- a/tests/auto/qkeyevent/tst_qkeyevent.cpp +++ b/tests/auto/qkeyevent/tst_qkeyevent.cpp @@ -179,7 +179,7 @@ void tst_QKeyEvent::sendRecieveKeyEvents() QFETCH( QString, text ); testWidget->recievedKeyPress = false; -#ifdef Q_WS_WIN +#ifdef Q_WS_WIN // Will be eaten by Windows system if ( key == Qt::Key_Print ) return; @@ -208,7 +208,7 @@ void tst_QKeyEvent::sendRecieveKeyEvents() if ( key >= Qt::Key_BracketRight && key <= Qt::Key_ydiaeresis ) return; #endif // Q_WS_WIN - + #ifdef Q_OS_SYMBIAN // Not supported on symbian if ( key == Qt::Key_Print ) @@ -238,7 +238,7 @@ void tst_QKeyEvent::sendRecieveKeyEvents() if ( key >= Qt::Key_BracketRight && key <= Qt::Key_ydiaeresis ) return; #endif // Q_WS_WIN - + if ( key == Qt::Key_F1 ) return; // Ignore for the moment diff --git a/tests/auto/qlibrary/tst/tst.pro b/tests/auto/qlibrary/tst/tst.pro index 06c2cd8..e15d7ed 100644 --- a/tests/auto/qlibrary/tst/tst.pro +++ b/tests/auto/qlibrary/tst/tst.pro @@ -22,7 +22,7 @@ wince*: { system.trolltech.test.mylib.dll binDep.path = /sys/bin #mylib.dl2 nonstandard binary deployment will cause warning in emulator, -#but it can be safely ignored. +#but it can be safely ignored. custBinDep.sources = mylib.dl2 custBinDep.path = /sys/bin diff --git a/tests/auto/qlocalsocket/lackey/lackey.pro b/tests/auto/qlocalsocket/lackey/lackey.pro index f073e7a..7bb6bc3 100644 --- a/tests/auto/qlocalsocket/lackey/lackey.pro +++ b/tests/auto/qlocalsocket/lackey/lackey.pro @@ -12,7 +12,7 @@ mac:CONFIG -= app_bundle DEFINES += QLOCALSERVER_DEBUG DEFINES += QLOCALSOCKET_DEBUG -SOURCES += main.cpp +SOURCES += main.cpp TARGET = lackey -symbian:TARGET.CAPABILITY = ALL -TCB \ No newline at end of file +symbian:TARGET.CAPABILITY = ALL -TCB \ No newline at end of file diff --git a/tests/auto/qlocalsocket/test/test.pro b/tests/auto/qlocalsocket/test/test.pro index e399a29..da741b9 100644 --- a/tests/auto/qlocalsocket/test/test.pro +++ b/tests/auto/qlocalsocket/test/test.pro @@ -43,5 +43,5 @@ wince*|symbian { scriptFiles.path = lackey/scripts DEPLOYMENT = additionalFiles scriptFiles QT += script # for easy deployment of QtScript -} +} diff --git a/tests/auto/qlocalsocket/tst_qlocalsocket.cpp b/tests/auto/qlocalsocket/tst_qlocalsocket.cpp index be8ec3f..e20105b 100644 --- a/tests/auto/qlocalsocket/tst_qlocalsocket.cpp +++ b/tests/auto/qlocalsocket/tst_qlocalsocket.cpp @@ -55,7 +55,7 @@ #ifdef Q_OS_SYMBIAN #define STRINGIFY(x) #x #define TOSTRING(x) STRINGIFY(x) - #define SRCDIR "C:/Private/" TOSTRING(SYMBIAN_SRCDIR_UID) "/" + #define SRCDIR "C:/Private/" TOSTRING(SYMBIAN_SRCDIR_UID) "/" #endif Q_DECLARE_METATYPE(QLocalSocket::LocalSocketError) Q_DECLARE_METATYPE(QLocalSocket::LocalSocketState) @@ -377,7 +377,7 @@ void tst_QLocalSocket::listenAndConnect() QSignalSpy spyReadyRead(socket, SIGNAL(readyRead())); socket->connectToServer(name); -#if defined(QT_LOCALSOCKET_TCP) || defined (Q_OS_SYMBIAN) +#if defined(QT_LOCALSOCKET_TCP) || defined (Q_OS_SYMBIAN) QTest::qWait(250); #endif @@ -579,10 +579,10 @@ void tst_QLocalSocket::fullPath() LocalSocket socket; socket.connectToServer(serverName); -#if defined (Q_OS_SYMBIAN) +#if defined (Q_OS_SYMBIAN) QTest::qWait(250); -#endif - +#endif + QCOMPARE(socket.serverName(), serverName); QCOMPARE(socket.fullServerName(), serverName); socket.disconnectFromServer(); @@ -730,16 +730,16 @@ void tst_QLocalSocket::threadedConnection() Server server; #if defined(Q_OS_SYMBIAN) server.setStackSize(0x14000); -#endif +#endif server.clients = threads; server.start(); QList clients; for (int i = 0; i < threads; ++i) { clients.append(new Client()); -#if defined(Q_OS_SYMBIAN) +#if defined(Q_OS_SYMBIAN) clients.last()->setStackSize(0x14000); -#endif +#endif clients.last()->start(); } @@ -951,7 +951,7 @@ void tst_QLocalSocket::unlink(QString name) int result = ::unlink(fullName.toUtf8().data()); if(result != 0) { - qWarning() << "Unlinking " << fullName << " failed with " << strerror(errno); + qWarning() << "Unlinking " << fullName << " failed with " << strerror(errno); } } #endif diff --git a/tests/auto/qmenu/tst_qmenu.cpp b/tests/auto/qmenu/tst_qmenu.cpp index ce6afa1..9568e69 100644 --- a/tests/auto/qmenu/tst_qmenu.cpp +++ b/tests/auto/qmenu/tst_qmenu.cpp @@ -443,7 +443,7 @@ void tst_QMenu::overrideMenuAction() delete aFileMenu; - //after the deletion of the override menu action, + //after the deletion of the override menu action, //the menu should have its default menu action back QCOMPARE(m->menuAction(), menuaction); @@ -472,7 +472,7 @@ void tst_QMenu::statusTip() QVERIFY(btn != NULL); - //because showMenu calls QMenu::exec, we need to use a singleshot + //because showMenu calls QMenu::exec, we need to use a singleshot //to continue the test QTimer::singleShot(200,this, SLOT(onStatusTipTimer())); btn->showMenu(); @@ -486,10 +486,10 @@ void tst_QMenu::onStatusTipTimer() QVERIFY(menu != 0); QVERIFY(menu->isVisible()); QTest::keyClick(menu, Qt::Key_Down); - + //we store the statustip to press escape in any case //otherwise, if the test fails it blocks (never gets out of QMenu::exec - const QString st=statustip; + const QString st=statustip; menu->close(); //goes out of the menu @@ -554,10 +554,10 @@ void tst_QMenu::tearOff() menu->popup(QPoint(0,0)); QTest::qWait(50); QVERIFY(!menu->isTearOffMenuVisible()); - + QTest::mouseClick(menu, Qt::LeftButton, 0, QPoint(3, 3), 10); QTest::qWait(100); - + QVERIFY(menu->isTearOffMenuVisible()); QPointer torn = 0; foreach (QWidget *w, QApplication::allWidgets()) { @@ -640,7 +640,7 @@ void tst_QMenu::activeSubMenuPosition() main->setActiveAction(menuAction); sub->setActiveAction(subAction); -#ifdef Q_OS_SYMBIAN +#ifdef Q_OS_SYMBIAN main->popup(QPoint(50,200)); #else main->popup(QPoint(200,200)); diff --git a/tests/auto/qnativesocketengine/tst_qnativesocketengine.cpp b/tests/auto/qnativesocketengine/tst_qnativesocketengine.cpp index dd584a0..be0bfe3 100644 --- a/tests/auto/qnativesocketengine/tst_qnativesocketengine.cpp +++ b/tests/auto/qnativesocketengine/tst_qnativesocketengine.cpp @@ -204,9 +204,9 @@ void tst_QNativeSocketEngine::simpleConnectToIMAP() //--------------------------------------------------------------------------- void tst_QNativeSocketEngine::udpLoopbackTest() { -#ifdef SYMBIAN_WINSOCK_CONNECTIVITY +#ifdef SYMBIAN_WINSOCK_CONNECTIVITY QSKIP("Not working on Emulator without WinPCAP", SkipAll); -#endif +#endif QNativeSocketEngine udpSocket; // Initialize device #1 @@ -257,7 +257,7 @@ void tst_QNativeSocketEngine::udpIPv6LoopbackTest() { #if defined(Q_OS_SYMBIAN) QSKIP("Symbian: IPv6 is not yet supported", SkipAll); -#endif +#endif QNativeSocketEngine udpSocket; // Initialize device #1 @@ -309,7 +309,7 @@ void tst_QNativeSocketEngine::broadcastTest() { #ifdef Q_OS_AIX QSKIP("Broadcast does not work on darko", SkipAll); -#endif +#endif QNativeSocketEngine broadcastSocket; // Initialize a regular Udp socket @@ -401,10 +401,10 @@ void tst_QNativeSocketEngine::serverTest() //--------------------------------------------------------------------------- void tst_QNativeSocketEngine::udpLoopbackPerformance() -{ -#ifdef SYMBIAN_WINSOCK_CONNECTIVITY +{ +#ifdef SYMBIAN_WINSOCK_CONNECTIVITY QSKIP("Not working on Emulator without WinPCAP", SkipAll); -#endif +#endif QNativeSocketEngine udpSocket; // Initialize device #1 @@ -576,13 +576,13 @@ void tst_QNativeSocketEngine::bind() QNativeSocketEngine binder3; QVERIFY(binder3.initialize(QAbstractSocket::TcpSocket, QAbstractSocket::IPv4Protocol)); QVERIFY(!binder3.bind(QHostAddress::Any, 31180)); - -#ifdef SYMBIAN_WINSOCK_CONNECTIVITY + +#ifdef SYMBIAN_WINSOCK_CONNECTIVITY qDebug("On Symbian Emulator (WinSock) we get EADDRNOTAVAIL instead of EADDRINUSE"); - QVERIFY(binder3.error() == QAbstractSocket::SocketAddressNotAvailableError); + QVERIFY(binder3.error() == QAbstractSocket::SocketAddressNotAvailableError); #else QVERIFY(binder3.error() == QAbstractSocket::AddressInUseError); -#endif +#endif } //--------------------------------------------------------------------------- diff --git a/tests/auto/qnetworkinterface/tst_qnetworkinterface.cpp b/tests/auto/qnetworkinterface/tst_qnetworkinterface.cpp index cf3d856..f3f343b 100644 --- a/tests/auto/qnetworkinterface/tst_qnetworkinterface.cpp +++ b/tests/auto/qnetworkinterface/tst_qnetworkinterface.cpp @@ -129,8 +129,8 @@ void tst_QNetworkInterface::loopbackIPv6() { #ifdef Q_OS_SYMBIAN QSKIP( "Symbian: IPv6 is not yet supported", SkipAll ); -#else - +#else + QList all = QNetworkInterface::allAddresses(); bool loopbackfound = false; @@ -142,9 +142,9 @@ void tst_QNetworkInterface::loopbackIPv6() break; } else if (addr.protocol() == QAbstractSocket::IPv6Protocol) anyIPv6 = true; - + QVERIFY(!anyIPv6 || loopbackfound); -#endif +#endif } void tst_QNetworkInterface::localAddress() diff --git a/tests/auto/qnetworkreply/test/test.pro b/tests/auto/qnetworkreply/test/test.pro index 593de8b..e0df503 100644 --- a/tests/auto/qnetworkreply/test/test.pro +++ b/tests/auto/qnetworkreply/test/test.pro @@ -25,12 +25,10 @@ symbian:{ addFiles.sources = ../empty ../rfc3252.txt ../resource ../bigfile addFiles.path = . DEPLOYMENT += addFiles - + # Symbian toolchain does not support correct include semantics INCPATH+=..\..\..\..\include\QtNetwork\private # bigfile test case requires more heap TARGET.EPOCHEAPSIZE="0x100 0x1000000" TARGET.CAPABILITY="ALL -TCB" } - - diff --git a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp index 305eca6..3817d9e 100644 --- a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp +++ b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp @@ -876,7 +876,7 @@ tst_QNetworkReply::tst_QNetworkReply() } tst_QNetworkReply::~tst_QNetworkReply() -{ +{ } @@ -1721,11 +1721,11 @@ void tst_QNetworkReply::ioGetFromFtp() DataReader reader(reply); connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); -#ifdef Q_OS_SYMBIAN +#ifdef Q_OS_SYMBIAN QTestEventLoop::instance().enterLoop(20); #else - QTestEventLoop::instance().enterLoop(10); -#endif + QTestEventLoop::instance().enterLoop(10); +#endif QVERIFY(!QTestEventLoop::instance().timeout()); QCOMPARE(reply->url(), request.url()); @@ -1755,19 +1755,19 @@ void tst_QNetworkReply::ioGetFromFtpWithReuse() QSignalSpy spy(reply1, SIGNAL(finished())); connect(reply2, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); -#ifdef Q_OS_SYMBIAN +#ifdef Q_OS_SYMBIAN QTestEventLoop::instance().enterLoop(20); #else - QTestEventLoop::instance().en