summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason McDonald <jason.mcdonald@nokia.com>2009-11-13 05:57:16 (GMT)
committerJason McDonald <jason.mcdonald@nokia.com>2009-11-13 05:57:16 (GMT)
commitba49bc095b5c86f4266bfe0531820f9d79cfa920 (patch)
treea1b9be373210485863e0f7a9f6f9a4916f658023
parent452abe700a910356f140aa9a4512827f1cac8567 (diff)
parentfae182ebe716cf805805564af95fd2d4c73ae20e (diff)
downloadQt-ba49bc095b5c86f4266bfe0531820f9d79cfa920.zip
Qt-ba49bc095b5c86f4266bfe0531820f9d79cfa920.tar.gz
Qt-ba49bc095b5c86f4266bfe0531820f9d79cfa920.tar.bz2
Merge branch '4.5' of git@scm.dev.nokia.troll.no:qt/qt into 4.5
-rw-r--r--tests/auto/linguist/lconvert/tst_lconvert.cpp8
-rw-r--r--tests/auto/linguist/lrelease/tst_lrelease.cpp8
-rw-r--r--tests/auto/linguist/lupdate/testlupdate.cpp4
-rw-r--r--tests/auto/linguist/lupdate/tst_lupdate.cpp12
4 files changed, 17 insertions, 15 deletions
diff --git a/tests/auto/linguist/lconvert/tst_lconvert.cpp b/tests/auto/linguist/lconvert/tst_lconvert.cpp
index e38e22c..10098a4 100644
--- a/tests/auto/linguist/lconvert/tst_lconvert.cpp
+++ b/tests/auto/linguist/lconvert/tst_lconvert.cpp
@@ -105,7 +105,7 @@ void tst_lconvert::doCompare(QIODevice *actualDev, const QString &expectedFn)
QList<QByteArray> actual = actualDev->readAll().split('\n');
QFile file(expectedFn);
- QVERIFY(file.open(QIODevice::ReadOnly));
+ QVERIFY(file.open(QIODevice::ReadOnly | QIODevice::Text));
QList<QByteArray> expected = file.readAll().split('\n');
int i = 0, ei = expected.size(), gi = actual.size();
@@ -179,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(binDir + "/lconvert", args);
+ cvts.at(i)->start(binDir + "/lconvert", args, QIODevice::ReadWrite | QIODevice::Text);
}
int st = 0;
foreach (QProcess *cvt, cvts)
@@ -243,7 +243,9 @@ void tst_lconvert::converts()
QString outFileNameFq = dataDir + outFileName;
QProcess cvt;
- cvt.start(binDir + "/lconvert", QStringList() << "-i" << (dataDir + inFileName) << "-of" << format);
+ cvt.start(binDir + "/lconvert",
+ QStringList() << "-i" << (dataDir + inFileName) << "-of" << format,
+ QIODevice::ReadWrite | QIODevice::Text);
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 9a3bba6..9d30fe7 100644
--- a/tests/auto/linguist/lrelease/tst_lrelease.cpp
+++ b/tests/auto/linguist/lrelease/tst_lrelease.cpp
@@ -70,8 +70,8 @@ private:
void tst_lrelease::doCompare(const QStringList &actual, const QString &expectedFn)
{
QFile file(expectedFn);
- QVERIFY(file.open(QIODevice::ReadOnly));
- QStringList expected = QString(file.readAll()).trimmed().remove('\r').split('\n');
+ QVERIFY(file.open(QIODevice::ReadOnly | QIODevice::Text));
+ QStringList expected = QString(file.readAll()).trimmed().split('\n');
int i = 0, ei = expected.size(), gi = actual.size();
for (; ; i++) {
@@ -200,10 +200,10 @@ void tst_lrelease::compressed()
void tst_lrelease::dupes()
{
QProcess proc;
- proc.start(binDir + "/lrelease testdata/dupes.ts");
+ proc.start(binDir + "/lrelease testdata/dupes.ts", QIODevice::ReadWrite | QIODevice::Text);
QVERIFY(proc.waitForFinished());
QVERIFY(proc.exitStatus() == QProcess::NormalExit);
- doCompare(QString(proc.readAllStandardError()).trimmed().remove('\r').split('\n'), "testdata/dupes.errors");
+ doCompare(QString(proc.readAllStandardError()).trimmed().split('\n'), "testdata/dupes.errors");
}
QTEST_MAIN(tst_lrelease)
diff --git a/tests/auto/linguist/lupdate/testlupdate.cpp b/tests/auto/linguist/lupdate/testlupdate.cpp
index 8e57323..d43fbc4 100644
--- a/tests/auto/linguist/lupdate/testlupdate.cpp
+++ b/tests/auto/linguist/lupdate/testlupdate.cpp
@@ -98,9 +98,9 @@ bool TestLUpdate::runChild( bool showOutput, const QString &program, const QStri
connect(childProc, SIGNAL(finished(int)), this, SLOT(childReady(int)));
childProc->setProcessChannelMode(QProcess::MergedChannels);
if (argList.isEmpty()) {
- childProc->start( program );
+ childProc->start( program, QIODevice::ReadWrite | QIODevice::Text );
} else {
- childProc->start( program, argList );
+ childProc->start( program, argList, QIODevice::ReadWrite | QIODevice::Text );
}
bool ok;
diff --git a/tests/auto/linguist/lupdate/tst_lupdate.cpp b/tests/auto/linguist/lupdate/tst_lupdate.cpp
index 8443621..359c5a10 100644
--- a/tests/auto/linguist/lupdate/tst_lupdate.cpp
+++ b/tests/auto/linguist/lupdate/tst_lupdate.cpp
@@ -80,8 +80,8 @@ private:
void tst_lupdate::doCompare(const QStringList &actual, const QString &expectedFn, bool err)
{
QFile file(expectedFn);
- QVERIFY(file.open(QIODevice::ReadOnly));
- QStringList expected = QString(file.readAll()).trimmed().remove('\r').split('\n');
+ QVERIFY(file.open(QIODevice::ReadOnly | QIODevice::Text));
+ QStringList expected = QString(file.readAll()).trimmed().split('\n');
int i = 0, ei = expected.size(), gi = actual.size();
for (; ; i++) {
@@ -130,8 +130,8 @@ void tst_lupdate::doCompare(const QStringList &actual, const QString &expectedFn
void tst_lupdate::doCompare(const QString &actualFn, const QString &expectedFn, bool err)
{
QFile afile(actualFn);
- QVERIFY(afile.open(QIODevice::ReadOnly));
- QStringList actual = QString(afile.readAll()).trimmed().remove('\r').split('\n');
+ QVERIFY(afile.open(QIODevice::ReadOnly | QIODevice::Text));
+ QStringList actual = QString(afile.readAll()).trimmed().split('\n');
doCompare(actual, expectedFn, err);
}
@@ -169,7 +169,7 @@ void tst_lupdate::good()
QString lupdatecmd;
QFile file(dir + "/lupdatecmd");
if (file.exists()) {
- QVERIFY(file.open(QIODevice::ReadOnly));
+ QVERIFY(file.open(QIODevice::ReadOnly | QIODevice::Text));
while (!file.atEnd()) {
QByteArray cmdstring = file.readLine().simplified();
if (cmdstring.startsWith('#'))
@@ -215,7 +215,7 @@ void tst_lupdate::output_ts()
QString lupdatecmd;
QFile file(dir + "/lupdatecmd");
if (file.exists()) {
- QVERIFY(file.open(QIODevice::ReadOnly));
+ QVERIFY(file.open(QIODevice::ReadOnly | QIODevice::Text));
while (!file.atEnd()) {
QByteArray cmdstring = file.readLine().simplified();
if (cmdstring.startsWith('#'))