/src/xml/

om feed' href='http://service.techsat.com/oss-git/Qt.git/atom/tests/auto?h=v4.7.3' type='application/atom+xml'/>
summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/auto.pro10
-rw-r--r--tests/auto/bic/tst_bic.cpp10
-rw-r--r--tests/auto/compilerwarnings/tst_compilerwarnings.cpp12
-rw-r--r--tests/auto/gestures/tst_gestures.cpp29
-rwxr-xr-xtests/auto/linguist/lconvert/data/makeplurals.pl42
-rwxr-xr-xtests/auto/linguist/lconvert/data/makeplurals.sh43
-rw-r--r--tests/auto/linguist/lconvert/data/test-broken-utf8.po.out2
-rw-r--r--tests/auto/linguist/lconvert/tst_lconvert.cpp11
-rw-r--r--tests/auto/linguist/lrelease/tst_lrelease.cpp29
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/lacksqobject/expectedoutput.txt8
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/lacksqobject/main.cpp4
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/mergeui/project.ts.before2
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/mergeui_obsolete/project.ts.result2
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/mergeui_obsolete/project.ui2
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/parsecpp/main.cpp31
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/parsecpp/project.ts.result39
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/parsecpp2/expectedoutput.txt7
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/parsecpp2/main.cpp24
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/parsecpp2/main2.cpp28
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/parsecpp2/main3.cpp42
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/parsecpp2/project.pro12
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/parsecpp2/project.ts.result4
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/proparsingpaths/file1.cpp9
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/proparsingpaths/filter.cpp9
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/proparsingpaths/project.pro10
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/proparsingpaths/project.ts.result31
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/proparsingpaths/sub/sub.pri3
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/proparsingpaths/sub/subfile1.cpp9
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/proparsingpaths/sub/subfilter.cpp9
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/textsimilarity/project.ts.result2
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/textsimilarity/project.ui2
-rw-r--r--tests/auto/linguist/lupdate/testlupdate.cpp5
-rw-r--r--tests/auto/math3d/qmatrixnxn/tst_qmatrixnxn.cpp35
-rw-r--r--tests/auto/math3d/qquaternion/tst_qquaternion.cpp4
-rw-r--r--tests/auto/math3d/qvectornd/tst_qvectornd.cpp4
-rw-r--r--tests/auto/moc/tst_moc.cpp42
-rw-r--r--tests/auto/patternistheaders/tst_patternistheaders.cpp8
-rw-r--r--tests/auto/q3sqlcursor/tst_q3sqlcursor.cpp12
-rw-r--r--tests/auto/qabstractitemview/tst_qabstractitemview.cpp102
-rw-r--r--tests/auto/qabstractscrollarea/tst_qabstractscrollarea.cpp35
-rw-r--r--tests/auto/qabstractxmlnodemodel/tst_qabstractxmlnodemodel.cpp8
-rw-r--r--tests/auto/qaccessibility/tst_qaccessibility.cpp13
-rw-r--r--tests/auto/qaction/tst_qaction.cpp4
-rw-r--r--tests/auto/qapplication/tst_qapplication.cpp76
-rw-r--r--tests/auto/qbytearray/tst_qbytearray.cpp2
-rw-r--r--tests/auto/qchar/tst_qchar.cpp3
-rw-r--r--tests/auto/qclipboard/tst_qclipboard.cpp2
-rw-r--r--tests/auto/qcolumnview/tst_qcolumnview.cpp42
-rw-r--r--tests/auto/qcombobox/tst_qcombobox.cpp6
-rw-r--r--tests/auto/qcompleter/tst_qcompleter.cpp113
-rw-r--r--tests/auto/qcopchannel/tst_qcopchannel.cpp2
-rw-r--r--tests/auto/qcssparser/qcssparser.pro2
-rw-r--r--tests/auto/qdatetimeedit/tst_qdatetimeedit.cpp2
-rw-r--r--tests/auto/qdbusabstractadaptor/tst_qdbusabstractadaptor.cpp21
-rw-r--r--tests/auto/qdbusabstractinterface/com.trolltech.QtDBus.Pinger.xml30
-rw-r--r--tests/auto/qdbusabstractinterface/interface.cpp48
-rw-r--r--tests/auto/qdbusabstractinterface/interface.h113
-rw-r--r--tests/auto/qdbusabstractinterface/pinger.cpp67
-rw-r--r--tests/auto/qdbusabstractinterface/pinger.h145
-rw-r--r--tests/auto/qdbusabstractinterface/qdbusabstractinterface.pro15
-rw-r--r--tests/auto/qdbusabstractinterface/tst_qdbusabstractinterface.cpp576
-rw-r--r--tests/auto/qdbusinterface/tst_qdbusinterface.cpp194
-rw-r--r--tests/auto/qdbusmarshall/tst_qdbusmarshall.cpp121
-rw-r--r--tests/auto/qdir/tst_qdir.cpp17
-rw-r--r--tests/auto/qdirectpainter/tst_qdirectpainter.cpp4
-rw-r--r--tests/auto/qdiriterator/tst_qdiriterator.cpp31
-rw-r--r--tests/auto/qfile/tst_qfile.cpp127
-rw-r--r--tests/auto/qfiledialog/tst_qfiledialog.cpp39
-rw-r--r--tests/auto/qfileinfo/tst_qfileinfo.cpp49
-rw-r--r--tests/auto/qfilesystemmodel/tst_qfilesystemmodel.cpp2
-rw-r--r--tests/auto/qflags/tst_qflags.cpp24
-rw-r--r--tests/auto/qfontcombobox/tst_qfontcombobox.cpp6
-rw-r--r--tests/auto/qfontdialog/tst_qfontdialog.cpp10
-rw-r--r--tests/auto/qgl/qgl.pro3
-rw-r--r--tests/auto/qgl/tst_qgl.cpp23
-rw-r--r--tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp419
-rw-r--r--tests/auto/qgraphicslayout/tst_qgraphicslayout.cpp1
-rw-r--r--tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp85
-rw-r--r--tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp152
-rw-r--r--tests/auto/qgraphicssceneindex/qgraphicssceneindex.pro3
-rw-r--r--tests/auto/qgraphicssceneindex/tst_qgraphicssceneindex.cpp305
-rw-r--r--tests/auto/qgraphicsview/tst_qgraphicsview.cpp272
-rw-r--r--tests/auto/qgroupbox/tst_qgroupbox.cpp11
-rw-r--r--tests/auto/qhelpgenerator/data/test.qhp7
-rw-r--r--tests/auto/qhttpnetworkconnection/qhttpnetworkconnection.pro2
-rw-r--r--tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp15
-rw-r--r--tests/auto/qhttpnetworkreply/qhttpnetworkreply.pro2
-rw-r--r--tests/auto/qicoimageformat/icons/valid/Qt.icobin0 -> 31371 bytes
-rw-r--r--tests/auto/qicoimageformat/tst_qticoimageformat.cpp33
-rw-r--r--tests/auto/qitemview/tst_qitemview.cpp2
-rw-r--r--tests/auto/qkeysequence/tst_qkeysequence.cpp2
-rw-r--r--tests/auto/qlineedit/tst_qlineedit.cpp6
-rw-r--r--tests/auto/qlistview/tst_qlistview.cpp67
-rw-r--r--tests/auto/qlocale/tst_qlocale.cpp31
-rw-r--r--tests/auto/qlocalsocket/tst_qlocalsocket.cpp50
-rw-r--r--tests/auto/qmainwindow/tst_qmainwindow.cpp6
-rw-r--r--tests/auto/qmenubar/tst_qmenubar.cpp3
-rw-r--r--tests/auto/qnativesocketengine/qnativesocketengine.pro2
-rw-r--r--tests/auto/qnetworkreply/qnetworkreply.pro2
-rw-r--r--tests/auto/qnetworkreply/tst_qnetworkreply.cpp226
-rw-r--r--tests/auto/qobject/tst_qobject.cpp5
-rw-r--r--tests/auto/qpathclipper/qpathclipper.pro2
-rw-r--r--tests/auto/qpixmap/tst_qpixmap.cpp7
-rw-r--r--tests/auto/qplaintextedit/tst_qplaintextedit.cpp2
-rw-r--r--tests/auto/qprocess/tst_qprocess.cpp38
-rw-r--r--tests/auto/qprogressbar/tst_qprogressbar.cpp32
-rw-r--r--tests/auto/qpropertyanimation/tst_qpropertyanimation.cpp57
-rw-r--r--tests/auto/qregion/tst_qregion.cpp6
-rw-r--r--tests/auto/qscriptengine/script/com/__init__.js4
-rw-r--r--tests/auto/qscriptengine/script/com/trolltech/__init__.js4
-rw-r--r--tests/auto/qscriptengine/tst_qscriptengine.cpp7
-rw-r--r--tests/auto/qscriptqobject/tst_qscriptqobject.cpp33
-rw-r--r--tests/auto/qsettings/tst_qsettings.cpp36
-rw-r--r--tests/auto/qsharedmemory/src/qsystemlock_win.cpp26
-rw-r--r--tests/auto/qsharedpointer/externaltests.cpp20
-rw-r--r--tests/auto/qsharedpointer/externaltests.h4
-rw-r--r--tests/auto/qsharedpointer/externaltests.pri1
-rw-r--r--tests/auto/qsharedpointer/forwarddeclaration.cpp52
-rw-r--r--tests/auto/qsharedpointer/forwarddeclared.cpp53
-rw-r--r--tests/auto/qsharedpointer/forwarddeclared.h54
-rw-r--r--tests/auto/qsharedpointer/qsharedpointer.pro10
-rw-r--r--tests/auto/qsharedpointer/tst_qsharedpointer.cpp165
-rw-r--r--tests/auto/qsocketnotifier/qsocketnotifier.pro2
-rw-r--r--tests/auto/qsocks5socketengine/qsocks5socketengine.pro1
-rw-r--r--tests/auto/qsqldatabase/qsqldatabase.pro5
-rw-r--r--tests/auto/qsqldatabase/tst_databases.h84
-rw-r--r--tests/auto/qsqldatabase/tst_qsqldatabase.cpp36
-rw-r--r--tests/auto/qsqldriver/qsqldriver.pro3
-rw-r--r--tests/auto/qsqldriver/tst_qsqldriver.cpp4
-rw-r--r--tests/auto/qsqlquery/qsqlquery.pro3
-rw-r--r--tests/auto/qsqlquery/tst_qsqlquery.cpp42
-rw-r--r--tests/auto/qsqlquerymodel/qsqlquerymodel.pro3
-rw-r--r--tests/auto/qsqlrelationaltablemodel/qsqlrelationaltablemodel.pro3
-rw-r--r--tests/auto/qsqlrelationaltablemodel/tst_qsqlrelationaltablemodel.cpp26
-rw-r--r--tests/auto/qsqltablemodel/qsqltablemodel.pro3
-rw-r--r--tests/auto/qsqltablemodel/tst_qsqltablemodel.cpp62
-rw-r--r--tests/auto/qsqlthread/qsqlthread.pro3
-rw-r--r--tests/auto/qsslsocket/certs/qt-test-server-cacert.pem35
-rw-r--r--tests/auto/qsslsocket/tst_qsslsocket.cpp88
-rw-r--r--tests/auto/qstandarditemmodel/tst_qstandarditemmodel.cpp4
-rw-r--r--tests/auto/qstate/tst_qstate.cpp12
-rw-r--r--tests/auto/qstatemachine/tst_qstatemachine.cpp524
-rw-r--r--tests/auto/qstring/tst_qstring.cpp8
-rw-r--r--tests/auto/qstringbuilder/tst_qstringbuilder.cpp17
-rw-r--r--tests/auto/qstyle/tst_qstyle.cpp2
-rw-r--r--tests/auto/qstylesheetstyle/qstylesheetstyle.pro1
-rw-r--r--tests/auto/qsvgrenderer/tst_qsvgrenderer.cpp280
-rw-r--r--tests/auto/qsyntaxhighlighter/tst_qsyntaxhighlighter.cpp29
-rw-r--r--tests/auto/qtableview/tst_qtableview.cpp56
-rw-r--r--tests/auto/qtcpserver/tst_qtcpserver.cpp120
-rw-r--r--tests/auto/qtextcodec/tst_qtextcodec.cpp4
-rw-r--r--tests/auto/qtextdocumentfragment/tst_qtextdocumentfragment.cpp10
-rw-r--r--tests/auto/qtextedit/tst_qtextedit.cpp4
-rw-r--r--tests/auto/qtextlist/tst_qtextlist.cpp76
-rw-r--r--tests/auto/qtextpiecetable/qtextpiecetable.pro5
-rw-r--r--tests/auto/qtextpiecetable/tst_qtextpiecetable.cpp32
-rw-r--r--tests/auto/qtimer/tst_qtimer.cpp2
-rw-r--r--tests/auto/qtoolbar/tst_qtoolbar.cpp4
-rw-r--r--tests/auto/qtoolbutton/tst_qtoolbutton.cpp27
-rw-r--r--tests/auto/qurl/tst_qurl.cpp104
-rw-r--r--tests/auto/qvector/qvector.pro1
-rw-r--r--tests/auto/qwidget/tst_qwidget.cpp58
-rw-r--r--tests/auto/qwineventnotifier/tst_qwineventnotifier.cpp7
-rw-r--r--tests/auto/qxmlquery/tst_qxmlquery.cpp176
-rw-r--r--tests/auto/qxmlschema/.gitignore1
-rw-r--r--tests/auto/qxmlschema/qxmlschema.pro4
-rw-r--r--tests/auto/qxmlschema/tst_qxmlschema.cpp372
-rw-r--r--tests/auto/qxmlschemavalidator/.gitignore1
-rw-r--r--tests/auto/qxmlschemavalidator/qxmlschemavalidator.pro4
-rw-r--r--tests/auto/qxmlschemavalidator/tst_qxmlschemavalidator.cpp445
-rwxr-xr-xtests/auto/runQtXmlPatternsTests.sh2
-rw-r--r--tests/auto/selftests/exceptionthrow/exceptionthrow.pro (renamed from tests/auto/selftests/exception/exception.pro)4
-rw-r--r--tests/auto/selftests/exceptionthrow/tst_exceptionthrow.cpp (renamed from tests/auto/selftests/exception/tst_exception.cpp)2
-rw-r--r--tests/auto/selftests/expected_crashes_3.txt8
-rw-r--r--tests/auto/selftests/expected_exceptionthrow.txt (renamed from tests/auto/selftests/expected_exception.txt)0
-rw-r--r--tests/auto/selftests/expected_maxwarnings.txt4
-rw-r--r--tests/auto/selftests/selftests.pro2
-rw-r--r--tests/auto/selftests/selftests.qrc3
-rw-r--r--tests/auto/selftests/tst_selftests.cpp12
-rw-r--r--tests/auto/selftests/xunit/xunit.pro11
-rwxr-xr-xtests/auto/test.pl2
-rw-r--r--tests/auto/uiloader/baseline/css_scrollarea_base.ui197
-rw-r--r--tests/auto/windowsmobile/test/tst_windowsmobile.cpp2
-rw-r--r--tests/auto/xmlpatterns.pri14
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/test/tst_xmlpatternsdiagnosticsts.cpp2
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/xmlpatternsdiagnosticsts.pro1
-rw-r--r--tests/auto/xmlpatternsschema/.gitignore1
-rw-r--r--tests/auto/xmlpatternsschema/tst_xmlpatternsschema.cpp988
-rw-r--r--tests/auto/xmlpatternsschema/xmlpatternsschema.pro6
-rw-r--r--tests/auto/xmlpatternsschemats/.gitignore4
-rw-r--r--tests/auto/xmlpatternsschemats/Baseline.xml2
-rw-r--r--tests/auto/xmlpatternsschemats/TESTSUITE/.gitignore3
-rw-r--r--tests/auto/xmlpatternsschemats/TESTSUITE/unifyCatalog.xsl21
-rwxr-xr-xtests/auto/xmlpatternsschemats/TESTSUITE/updateSuite.sh20
-rw-r--r--tests/auto/xmlpatternsschemats/tst_xmlpatternsschemats.cpp44
-rw-r--r--tests/auto/xmlpatternsschemats/xmlpatternsschemats.pro23
-rw-r--r--tests/auto/xmlpatternsvalidator/files/instance.xml3
-rw-r--r--tests/auto/xmlpatternsvalidator/files/invalid_schema.xsd12
-rw-r--r--tests/auto/xmlpatternsvalidator/files/other_valid_schema.xsd12
-rw-r--r--tests/auto/xmlpatternsvalidator/files/sa_invalid_instance.xml3
-rw-r--r--tests/auto/xmlpatternsvalidator/files/sa_valid_instance.xml3
-rw-r--r--tests/auto/xmlpatternsvalidator/files/valid_schema.xsd12
-rw-r--r--tests/auto/xmlpatternsvalidator/tst_xmlpatternsvalidator.cpp174
-rw-r--r--tests/auto/xmlpatternsvalidator/xmlpatternsvalidator.pro5
-rw-r--r--tests/auto/xmlpatternsview/view/MainWindow.cpp32
-rw-r--r--tests/auto/xmlpatternsview/view/MainWindow.h6
-rw-r--r--tests/auto/xmlpatternsview/view/ui_MainWindow.ui9
-rw-r--r--tests/auto/xmlpatternsview/xmlpatternsview.pro1
-rw-r--r--tests/auto/xmlpatternsxqts/lib/TestBaseLine.cpp7
-rw-r--r--tests/auto/xmlpatternsxqts/lib/TestBaseLine.h9
-rw-r--r--tests/auto/xmlpatternsxqts/lib/TestGroup.cpp6
-rw-r--r--tests/auto/xmlpatternsxqts/lib/TestSuite.cpp26
-rw-r--r--tests/auto/xmlpatternsxqts/lib/TestSuite.h14
-rw-r--r--tests/auto/xmlpatternsxqts/lib/TreeModel.cpp9
-rw-r--r--tests/auto/xmlpatternsxqts/lib/XSDTSTestCase.cpp346
-rw-r--r--tests/auto/xmlpatternsxqts/lib/XSDTSTestCase.h130
-rw-r--r--tests/auto/xmlpatternsxqts/lib/XSDTestSuiteHandler.cpp881
-rw-r--r--tests/auto/xmlpatternsxqts/lib/XSDTestSuiteHandler.h90
-rw-r--r--tests/auto/xmlpatternsxqts/lib/lib.pro4
-rw-r--r--tests/auto/xmlpatternsxqts/test/tst_suitetest.cpp15
-rw-r--r--tests/auto/xmlpatternsxqts/test/tst_suitetest.h14
-rw-r--r--tests/auto/xmlpatternsxqts/test/tst_xmlpatternsxqts.cpp2
-rw-r--r--tests/auto/xmlpatternsxqts/xmlpatternsxqts.pro3
-rw-r--r--tests/auto/xmlpatternsxslts/tst_xmlpatternsxslts.cpp2
-rw-r--r--tests/auto/xmlpatternsxslts/xmlpatternsxslts.pro1
225 files changed, 9977 insertions, 1011 deletions
diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro
index 6bc5ad8..1e349d8 100644
--- a/tests/auto/auto.pro
+++ b/tests/auto/auto.pro
@@ -151,6 +151,7 @@ SUBDIRS += _networkselftest \
qgraphicspolygonitem \
qgraphicsproxywidget \
qgraphicsscene \
+ qgraphicssceneindex \
qgraphicsview \
qgraphicswidget \
qgridlayout \
@@ -394,7 +395,8 @@ SUBDIRS += _networkselftest \
symbols \
qrand \
uic \
- uic3
+ uic3 \
+ utf8
contains(QT_CONFIG, OdfWriter):SUBDIRS += qzip qtextodfwriter
@@ -423,9 +425,14 @@ SUBDIRS += checkxmlfiles \
qxmlnodemodelindex \
qxmlquery \
qxmlresultitems \
+ qxmlschema \
+ qxmlschemavalidator \
qxmlserializer \
xmlpatterns \
xmlpatternsdiagnosticsts \
+ xmlpatternsschema \
+ xmlpatternsschemats \
+ xmlpatternsvalidator \
xmlpatternsview \
xmlpatternsxqts \
xmlpatternsxslts
@@ -437,6 +444,7 @@ xmlpatternsxslts.depends = xmlpatternsxqts
unix:!embedded:contains(QT_CONFIG, dbus):SUBDIRS += \
qdbusabstractadaptor \
+ qdbusabstractinterface \
qdbusconnection \
qdbusinterface \
qdbuslocalcalls \
diff --git a/tests/auto/bic/tst_bic.cpp b/tests/auto/bic/tst_bic.cpp
index e7a0c04..36c35ff 100644
--- a/tests/auto/bic/tst_bic.cpp
+++ b/tests/auto/bic/tst_bic.cpp
@@ -43,6 +43,10 @@
#include <QtCore/QtCore>
#include <QtTest/QtTest>
+#ifdef QT_NO_PROCESS
+QTEST_NOOP_MAIN
+#else
+
#include "qbic.h"
#include <stdlib.h>
@@ -145,7 +149,7 @@ void tst_Bic::initTestCase_data()
void tst_Bic::initTestCase()
{
- QString qtDir = QString::fromLocal8Bit(getenv("QTDIR"));
+ QString qtDir = QString::fromLocal8Bit(qgetenv("QTDIR"));
QVERIFY2(!qtDir.isEmpty(), "This test needs $QTDIR");
if (qgetenv("PATH").contains("teambuilder"))
@@ -220,7 +224,7 @@ QBic::Info tst_Bic::getCurrentInfo(const QString &libName)
tmpQFile.write(tmpFileContents);
tmpQFile.flush();
- QString qtDir = QString::fromLocal8Bit(getenv("QTDIR"));
+ QString qtDir = QString::fromLocal8Bit(qgetenv("QTDIR"));
#ifdef Q_OS_WIN
qtDir.replace('\\', '/');
#endif
@@ -367,4 +371,4 @@ void tst_Bic::sizesAndVTables()
QTEST_APPLESS_MAIN(tst_Bic)
#include "tst_bic.moc"
-
+#endif
diff --git a/tests/auto/compilerwarnings/tst_compilerwarnings.cpp b/tests/auto/compilerwarnings/tst_compilerwarnings.cpp
index 2f5cf6c..d5fef1b 100644
--- a/tests/auto/compilerwarnings/tst_compilerwarnings.cpp
+++ b/tests/auto/compilerwarnings/tst_compilerwarnings.cpp
@@ -47,6 +47,10 @@
#include <QtTest/QtTest>
+#ifdef QT_NO_PROCESS
+QTEST_NOOP_MAIN
+#else
+
#include <stdlib.h>
QT_USE_NAMESPACE
@@ -67,8 +71,8 @@ private slots:
static QStringList getFeatures()
{
QStringList srcDirs;
- srcDirs << QString::fromLocal8Bit(getenv("QTDIR"))
- << QString::fromLocal8Bit(getenv("QTSRCDIR"));
+ srcDirs << QString::fromLocal8Bit(qgetenv("QTDIR"))
+ << QString::fromLocal8Bit(qgetenv("QTSRCDIR"));
QString featurefile;
foreach (QString dir, srcDirs) {
@@ -157,7 +161,7 @@ void tst_CompilerWarnings::warnings()
QStringList args;
QString compilerName;
- static QString qtDir = QString::fromLocal8Bit(getenv("QTDIR"));
+ static QString qtDir = QString::fromLocal8Bit(qgetenv("QTDIR"));
QVERIFY2(!qtDir.isEmpty(), "This test needs $QTDIR");
args << cflags;
@@ -248,4 +252,4 @@ void tst_CompilerWarnings::warnings()
QTEST_APPLESS_MAIN(tst_CompilerWarnings)
#include "tst_compilerwarnings.moc"
-
+#endif // QT_NO_PROCESS
diff --git a/tests/auto/gestures/tst_gestures.cpp b/tests/auto/gestures/tst_gestures.cpp
index 6d3bc0a..d2ef64a 100644
--- a/tests/auto/gestures/tst_gestures.cpp
+++ b/tests/auto/gestures/tst_gestures.cpp
@@ -140,6 +140,13 @@ struct GestureState
last.secondfinger.lastPoint = TouchPoint();
last.secondfinger.point = TouchPoint();
last.secondfinger.offset = QPoint();
+ last.pan.delivered = false;
+ last.pan.startPoints[0] = TouchPoint();
+ last.pan.startPoints[1] = TouchPoint();
+ last.pan.lastPoints[0] = TouchPoint();
+ last.pan.lastPoints[1] = TouchPoint();
+ last.pan.points[0] = TouchPoint();
+ last.pan.points[1] = TouchPoint();
last.cancelled.clear();
}
};
@@ -760,7 +767,8 @@ void tst_Gestures::simpleGraphicsItem()
scene.addItem(item);
QApplication::processEvents();
- SingleshotEvent event(50, 80);
+ QPoint pt = view.mapFromScene(item->mapToScene(30, 30));
+ SingleshotEvent event(pt.x(), pt.y());
sendSpontaneousEvent(&view, &event);
QVERIFY(item->gesture.seenGestureEvent);
QVERIFY(scene.gesture.seenGestureEvent);
@@ -771,7 +779,9 @@ void tst_Gestures::simpleGraphicsItem()
mainWidget->reset();
item->shouldAcceptSingleshotGesture = false;
- SingleshotEvent event2(20, 40);
+ // outside of the graphicsitem
+ pt = view.mapFromScene(item->mapToScene(-10, -10));
+ SingleshotEvent event2(pt.x(), pt.y());
sendSpontaneousEvent(&view, &event2);
QVERIFY(!item->gesture.seenGestureEvent);
QVERIFY(scene.gesture.seenGestureEvent);
@@ -790,9 +800,11 @@ void tst_Gestures::overlappingGraphicsItems()
scene.addItem(item);
GraphicsItem *subitem1 = new GraphicsItem(50, 70);
subitem1->setPos(70, 70);
+ subitem1->setZValue(1);
scene.addItem(subitem1);
GraphicsItem *subitem2 = new GraphicsItem(50, 70);
subitem2->setPos(250, 70);
+ subitem2->setZValue(1);
scene.addItem(subitem2);
QApplication::processEvents();
@@ -802,13 +814,14 @@ void tst_Gestures::overlappingGraphicsItems()
subitem1->grabSingleshotGesture();
subitem2->grabSecondFingerGesture();
- SingleshotEvent event(100, 100);
+ QPoint pt = view.mapFromScene(subitem1->mapToScene(20, 20));
+ SingleshotEvent event(pt.x(), pt.y());
sendSpontaneousEvent(&view, &event);
- QVERIFY(subitem1->gesture.seenGestureEvent);
+ QVERIFY(scene.gesture.seenGestureEvent);
QVERIFY(!subitem2->gesture.seenGestureEvent);
QVERIFY(!item->gesture.seenGestureEvent);
- QVERIFY(scene.gesture.seenGestureEvent);
QVERIFY(!mainWidget->gesture.seenGestureEvent);
+ QVERIFY(subitem1->gesture.seenGestureEvent);
QVERIFY(subitem1->gesture.last.singleshot.delivered);
item->reset();
@@ -818,12 +831,12 @@ void tst_Gestures::overlappingGraphicsItems()
mainWidget->reset();
subitem1->shouldAcceptSingleshotGesture = false;
- SingleshotEvent event2(100, 100);
+ SingleshotEvent event2(pt.x(), pt.y());
sendSpontaneousEvent(&view, &event2);
- QVERIFY(subitem1->gesture.seenGestureEvent);
+ QVERIFY(scene.gesture.seenGestureEvent);
QVERIFY(!subitem2->gesture.seenGestureEvent);
+ QVERIFY(subitem1->gesture.seenGestureEvent);
QVERIFY(item->gesture.seenGestureEvent);
- QVERIFY(scene.gesture.seenGestureEvent);
QVERIFY(!mainWidget->gesture.seenGestureEvent);
QVERIFY(subitem1->gesture.last.singleshot.delivered);
QVERIFY(item->gesture.last.singleshot.delivered);
diff --git a/tests/auto/linguist/lconvert/data/makeplurals.pl b/tests/auto/linguist/lconvert/data/makeplurals.pl
new file mode 100755
index 0000000..19bffe0
--- /dev/null
+++ b/tests/auto/linguist/lconvert/data/makeplurals.pl
@@ -0,0 +1,42 @@
+#! /usr/bin/env perl
+
+sub makeit2($$$)
+{
+ for (my $i = 0; $i < (1 << $_[0]); $i++) {
+ print OUTFILE "\n";
+ print OUTFILE "$_[2]\n" unless $3 eq "";
+ print OUTFILE "msgid \"singular $_[1] $i\"\n";
+ print OUTFILE "msgid_plural \"plural $_[1] $i\"\n";
+ for (my $j = 0; $j < $_[0]; $j++) {
+ my $tr;
+ if (($i & (1 << $j)) == 0) {
+ $tr = "translated $_[1] $i $j";
+ }
+ print OUTFILE "msgstr[$j] \"$tr\"\n";
+ }
+ }
+}
+
+sub makeit($$)
+{
+ open OUTFILE, ">${OUTDIR}plural-$_[0].po" || die "cannot write file in $OUTDIR";
+ print OUTFILE <<EOF;
+msgid ""
+msgstr ""
+"X-FooBar: yup\\n"
+"X-Language: $_[1]\\n"
+EOF
+ makeit2($_[0], "one", "");
+ makeit2($_[0], "two", "#, fuzzy
+#| msgid \"old untranslated one\"");
+ makeit2($_[0], "three", "#, fuzzy
+#| msgid \"old untranslated two\"
+#| msgid_plural \"old untranslated plural two\"");
+ makeit2($_[0], "four", "#, fuzzy
+#| msgid_plural \"old untranslated only plural three\"");
+}
+
+$OUTDIR = $ARGV[0];
+makeit(1, "zh_CN");
+makeit(2, "de_DE");
+makeit(3, "pl_PL");
diff --git a/tests/auto/linguist/lconvert/data/makeplurals.sh b/tests/auto/linguist/lconvert/data/makeplurals.sh
deleted file mode 100755
index 2e0f375..0000000
--- a/tests/auto/linguist/lconvert/data/makeplurals.sh
+++ /dev/null
@@ -1,43 +0,0 @@
-#! /bin/bash
-
-function makeit2()
-{
- for ((i = 0; i < (1 << $1); i++)); do
- echo
- test -n "$3" && echo "$3"
- echo "msgid \"singular $2 $i\""
- echo "msgid_plural \"plural $2 $i\""
- for ((j = 0; j < $1; j++)); do
- tr=
- if test $((i & (1 << j))) = 0; then
- tr="translated $2 $i $j"
- fi
- echo "msgstr[$j] \"$tr\""
- done
- done
-}
-
-function makeit()
-{
- {
- cat <<EOF
-msgid ""
-msgstr ""
-"X-FooBar: yup\n"
-"X-Language: $2\n"
-EOF
- makeit2 $1 one ""
- makeit2 $1 two "#, fuzzy
-#| msgid \"old untranslated one\""
- makeit2 $1 three "#, fuzzy
-#| msgid \"old untranslated two\"
-#| msgid_plural \"old untranslated plural two\""
- makeit2 $1 four "#, fuzzy
-#| msgid_plural \"old untranslated only plural three\""
- } > ${OUTDIR}plural-$1.po
-}
-
-OUTDIR=$1
-makeit 1 zh_CN
-makeit 2 de_DE
-makeit 3 pl_PL
diff --git a/tests/auto/linguist/lconvert/data/test-broken-utf8.po.out b/tests/auto/linguist/lconvert/data/test-broken-utf8.po.out
index c00fd19..0a9f4c8 100644
--- a/tests/auto/linguist/lconvert/data/test-broken-utf8.po.out
+++ b/tests/auto/linguist/lconvert/data/test-broken-utf8.po.out
@@ -6,4 +6,4 @@ msgid "this works"
msgstr "das geht: ä"
msgid "this is broken"
-msgstr "das ist kaputt: i"
+msgstr "das ist kaputt: �i"
diff --git a/tests/auto/linguist/lconvert/tst_lconvert.cpp b/tests/auto/linguist/lconvert/tst_lconvert.cpp
index 40be55a..1ed71ab 100644
--- a/tests/auto/linguist/lconvert/tst_lconvert.cpp
+++ b/tests/auto/linguist/lconvert/tst_lconvert.cpp
@@ -47,7 +47,7 @@ class tst_lconvert : public QObject
Q_OBJECT
public:
- tst_lconvert() : dataDir("data/") {}
+ tst_lconvert() : dataDir("data/"), binDir(QLibraryInfo::location(QLibraryInfo::BinariesPath)) {}
private slots:
void initTestCase();
@@ -73,12 +73,13 @@ private:
const QList<QStringList> &args);
QString dataDir;
+ QString binDir;
};
void tst_lconvert::initTestCase()
{
if (!QFile::exists(QLatin1String("data/plural-1.po")))
- QProcess::execute(QLatin1String("data/makeplurals.sh"), QStringList() << QLatin1String("data/"));
+ QProcess::execute(QLatin1String("perl"), QStringList() << QLatin1String("data/makeplurals.pl") << QLatin1String("data/"));
QVERIFY(QFile::exists(QLatin1String("data/plural-1.po")));
}
@@ -151,7 +152,7 @@ void tst_lconvert::doCompare(QIODevice *actualDev, const QString &expectedFn)
void tst_lconvert::verifyReadFail(const QString &fn)
{
QProcess cvt;
- cvt.start("lconvert", QStringList() << (dataDir + fn));
+ cvt.start(binDir + "/lconvert", QStringList() << (dataDir + fn));
QVERIFY(cvt.waitForFinished(1000));
QVERIFY(cvt.exitStatus() == QProcess::NormalExit);
QVERIFY2(cvt.exitCode() == 2, "Accepted invalid input");
@@ -178,7 +179,7 @@ void tst_lconvert::convertChain(const QString &_inFileName, const QString &_outF
if (!argList.isEmpty())
args += argList[i];
args << "-if" << stations[i] << "-i" << "-" << "-of" << stations[i + 1];
- cvts.at(i)->start("lconvert", args);
+ cvts.at(i)->start(binDir + "/lconvert", args);
}
int st = 0;
foreach (QProcess *cvt, cvts)
@@ -242,7 +243,7 @@ void tst_lconvert::converts()
QString outFileNameFq = dataDir + outFileName;
QProcess cvt;
- cvt.start("lconvert", QStringList() << "-i" << (dataDir + inFileName) << "-of" << format);
+ cvt.start(binDir + "/lconvert", QStringList() << "-i" << (dataDir + inFileName) << "-of" << format);
doWait(&cvt, 0);
if (QTest::currentTestFailed())
return;
diff --git a/tests/auto/linguist/lrelease/tst_lrelease.cpp b/tests/auto/linguist/lrelease/tst_lrelease.cpp
index 512987d..4928a4f 100644
--- a/tests/auto/linguist/lrelease/tst_lrelease.cpp
+++ b/tests/auto/linguist/lrelease/tst_lrelease.cpp
@@ -49,16 +49,23 @@
class tst_lrelease : public QObject
{
Q_OBJECT
+
+public:
+ tst_lrelease() : binDir(QLibraryInfo::location(QLibraryInfo::BinariesPath)) {}
+
private:
private slots:
void translate();
void mixedcodecs();
void compressed();
+ void idbased();
void dupes();
private:
void doCompare(const QStringList &actual, const QString &expectedFn);
+
+ QString binDir;
};
void tst_lrelease::doCompare(const QStringList &actual, const QString &expectedFn)
@@ -111,7 +118,7 @@ void tst_lrelease::doCompare(const QStringList &actual, const QString &expectedF
void tst_lrelease::translate()
{
- QVERIFY(!QProcess::execute("lrelease testdata/translate.ts"));
+ QVERIFY(!QProcess::execute(binDir + "/lrelease testdata/translate.ts"));
QTranslator translator;
QVERIFY(translator.load("testdata/translate.qm"));
@@ -161,8 +168,8 @@ void tst_lrelease::translate()
void tst_lrelease::mixedcodecs()
{
- QVERIFY(!QProcess::execute("lrelease testdata/mixedcodecs-ts11.ts"));
- QVERIFY(!QProcess::execute("lrelease testdata/mixedcodecs-ts20.ts"));
+ QVERIFY(!QProcess::execute(binDir + "/lrelease testdata/mixedcodecs-ts11.ts"));
+ QVERIFY(!QProcess::execute(binDir + "/lrelease testdata/mixedcodecs-ts20.ts"));
QVERIFY(!QProcess::execute("cmp testdata/mixedcodecs-ts11.qm testdata/mixedcodecs-ts20.qm"));
QTranslator translator;
QVERIFY(translator.load("testdata/mixedcodecs-ts11.qm"));
@@ -176,7 +183,7 @@ void tst_lrelease::mixedcodecs()
void tst_lrelease::compressed()
{
- QVERIFY(!QProcess::execute("lrelease -compress testdata/compressed.ts"));
+ QVERIFY(!QProcess::execute(binDir + "/lrelease -compress testdata/compressed.ts"));
QTranslator translator;
QVERIFY(translator.load("testdata/compressed.qm"));
@@ -191,10 +198,22 @@ void tst_lrelease::compressed()
}
+void tst_lrelease::idbased()
+{
+ QVERIFY(!QProcess::execute(binDir + "/lrelease -idbased testdata/idbased.ts"));
+
+ QTranslator translator;
+ QVERIFY(translator.load("testdata/idbased.qm"));
+ qApp->installTranslator(&translator);
+
+ QCOMPARE(qtTrId("test_id"), QString::fromAscii("This is a test string."));
+ QCOMPARE(qtTrId("untranslated_id"), QString::fromAscii("This has no translation."));
+}
+
void tst_lrelease::dupes()
{
QProcess proc;
- proc.start("lrelease testdata/dupes.ts");
+ proc.start(binDir + "/lrelease testdata/dupes.ts");
QVERIFY(proc.waitForFinished());
QVERIFY(proc.exitStatus() == QProcess::NormalExit);
doCompare(QString(proc.readAllStandardError()).trimmed().remove('\r').split('\n'), "testdata/dupes.errors");
diff --git a/tests/auto/linguist/lupdate/testdata/good/lacksqobject/expectedoutput.txt b/tests/auto/linguist/lupdate/testdata/good/lacksqobject/expectedoutput.txt
index 8a0bd11..1a6cfeb 100644
--- a/tests/auto/linguist/lupdate/testdata/good/lacksqobject/expectedoutput.txt
+++ b/tests/auto/linguist/lupdate/testdata/good/lacksqobject/expectedoutput.txt
@@ -1,4 +1,8 @@
.*/lupdate/testdata/good/lacksqobject/main.cpp:17: Class 'B' lacks Q_OBJECT macro
-.*/lupdate/testdata/good/lacksqobject/main.cpp:26: Class 'C' lacks Q_OBJECT macro
+
+.*/lupdate/testdata/good/lacksqobject/main.cpp:24: Class 'C' lacks Q_OBJECT macro
+
.*/lupdate/testdata/good/lacksqobject/main.cpp:37: Class 'nsB::B' lacks Q_OBJECT macro
-.*/lupdate/testdata/good/lacksqobject/main.cpp:45: Class 'nsB::C' lacks Q_OBJECT macro
+
+.*/lupdate/testdata/good/lacksqobject/main.cpp:43: Class 'nsB::C' lacks Q_OBJECT macro
+
diff --git a/tests/auto/linguist/lupdate/testdata/good/lacksqobject/main.cpp b/tests/auto/linguist/lupdate/testdata/good/lacksqobject/main.cpp
index 05fcd79..0e42d52 100644
--- a/tests/auto/linguist/lupdate/testdata/good/lacksqobject/main.cpp
+++ b/tests/auto/linguist/lupdate/testdata/good/lacksqobject/main.cpp
@@ -1,8 +1,8 @@
// IMPORTANT!!!! If you want to add testdata to this file,
// always add it to the end in order to not change the linenumbers of translations!!!
-#include <QtCore>
-
+#define QTCORE <QtCore>
+#include QTCORE // Hidden from lupdate, but compiles
//
// Test 'lacks Q_OBJECT' reporting on namespace scopes
diff --git a/tests/auto/linguist/lupdate/testdata/good/mergeui/project.ts.before b/tests/auto/linguist/lupdate/testdata/good/mergeui/project.ts.before
index e297784..076520a 100644
--- a/tests/auto/linguist/lupdate/testdata/good/mergeui/project.ts.before
+++ b/tests/auto/linguist/lupdate/testdata/good/mergeui/project.ts.before
@@ -5,7 +5,7 @@
<message>
<location filename="project.ui" line="27"/>
<source>Qt Assistant - Find text</source>
- <!--should be changed to unfinished, since we are changing the sourcetext in the ui file-->
+ <!--should be changed to unfinished, since we are changing the sourcetext in the UI file-->
<translation>Qt Assistant - Finn tekst</translation>
</message>
<message>
diff --git a/tests/auto/linguist/lupdate/testdata/good/mergeui_obsolete/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/mergeui_obsolete/project.ts.result
index d65110a..6bc565c 100644
--- a/tests/auto/linguist/lupdate/testdata/good/mergeui_obsolete/project.ts.result
+++ b/tests/auto/linguist/lupdate/testdata/good/mergeui_obsolete/project.ts.result
@@ -9,7 +9,7 @@
</message>
<message>
<location filename="project.ui" line="20"/>
- <source>This should not be considered to be more or less equal to the corresponding one in the ts file.</source>
+ <source>This should not be considered to be more or less equal to the corresponding one in the TS file.</source>
<translation type="unfinished"></translation>
</message>
<message>
diff --git a/tests/auto/linguist/lupdate/testdata/good/mergeui_obsolete/project.ui b/tests/auto/linguist/lupdate/testdata/good/mergeui_obsolete/project.ui
index 0d0defd..a5f8e9f 100644
--- a/tests/auto/linguist/lupdate/testdata/good/mergeui_obsolete/project.ui
+++ b/tests/auto/linguist/lupdate/testdata/good/mergeui_obsolete/project.ui
@@ -17,7 +17,7 @@
<widget class="QWidget" name="FindDialog" >
<property name="test1">
<!-- If the sourcetext is not similar to the vernacular sourcetext, mark the old one as obsolete and the new one as unfinished -->
- <string>This should not be considered to be more or less equal to the corresponding one in the ts file.</string>
+ <string>This should not be considered to be more or less equal to the corresponding one in the TS file.</string>
</property>
<property name="test2">
<string>Here, similarity should kick in!</string>
diff --git a/tests/auto/linguist/lupdate/testdata/good/parsecpp/main.cpp b/tests/auto/linguist/lupdate/testdata/good/parsecpp/main.cpp
index df75baf..735e4cd 100644
--- a/tests/auto/linguist/lupdate/testdata/good/parsecpp/main.cpp
+++ b/tests/auto/linguist/lupdate/testdata/good/parsecpp/main.cpp