summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/gui')
-rw-r--r--tests/auto/gui/image/qimagereader/tst_qimagereader.cpp4
-rw-r--r--tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp18
-rw-r--r--tests/auto/gui/text/qtextdocumentfragment/tst_qtextdocumentfragment.cpp16
-rw-r--r--tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp2
4 files changed, 20 insertions, 20 deletions
diff --git a/tests/auto/gui/image/qimagereader/tst_qimagereader.cpp b/tests/auto/gui/image/qimagereader/tst_qimagereader.cpp
index 12c90445cb..a1d050cd52 100644
--- a/tests/auto/gui/image/qimagereader/tst_qimagereader.cpp
+++ b/tests/auto/gui/image/qimagereader/tst_qimagereader.cpp
@@ -1617,14 +1617,14 @@ void tst_QImageReader::pixelCompareWithBaseline()
// least one file succeeded we know that the plugin was built.
// The other failures are then real failures.
QImage icoImg;
- const QString inputFileName(QString::fromAscii("images/%1").arg(fileName));
+ const QString inputFileName(QString::fromLatin1("images/%1").arg(fileName));
QFileInfo fi(inputFileName);
++enteredCount;
// might fail if the plugin does not exist, which is ok.
if (icoImg.load(inputFileName)) {
icoImg = icoImg.convertToFormat(QImage::Format_ARGB32_Premultiplied);
- const QString baselineFileName(QString::fromAscii("baseline/%1.png").arg(fi.baseName()));
+ const QString baselineFileName(QString::fromLatin1("baseline/%1.png").arg(fi.baseName()));
#if 0
icoImg.save(baselineFileName);
#else
diff --git a/tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp b/tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp
index 213b388895..6fb3ab9cd5 100644
--- a/tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp
+++ b/tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp
@@ -279,23 +279,23 @@ void tst_QTextDocument::find_data()
QTest::newRow("1") << "Hello World" << "World" << int(QTextDocument::FindCaseSensitively) << 0 << 6 << 11;
- QTest::newRow("2") << QString::fromAscii("Hello") + QString(QChar::ParagraphSeparator) + QString::fromAscii("World")
+ QTest::newRow("2") << QString::fromLatin1("Hello") + QString(QChar::ParagraphSeparator) + QString::fromLatin1("World")
<< "World" << int(QTextDocument::FindCaseSensitively) << 1 << 6 << 11;
- QTest::newRow("3") << QString::fromAscii("Hello") + QString(QChar::ParagraphSeparator) + QString::fromAscii("World")
+ QTest::newRow("3") << QString::fromLatin1("Hello") + QString(QChar::ParagraphSeparator) + QString::fromLatin1("World")
<< "Hello" << int(QTextDocument::FindCaseSensitively | QTextDocument::FindBackward) << 10 << 0 << 5;
- QTest::newRow("4wholewords") << QString::fromAscii("Hello Blah World")
+ QTest::newRow("4wholewords") << QString::fromLatin1("Hello Blah World")
<< "Blah" << int(QTextDocument::FindWholeWords) << 0 << 6 << 10;
- QTest::newRow("5wholewords") << QString::fromAscii("HelloBlahWorld")
+ QTest::newRow("5wholewords") << QString::fromLatin1("HelloBlahWorld")
<< "Blah" << int(QTextDocument::FindWholeWords) << 0 << -1 << -1;
- QTest::newRow("6wholewords") << QString::fromAscii("HelloBlahWorld Blah Hah")
+ QTest::newRow("6wholewords") << QString::fromLatin1("HelloBlahWorld Blah Hah")
<< "Blah" << int(QTextDocument::FindWholeWords) << 0 << 15 << 19;
- QTest::newRow("7wholewords") << QString::fromAscii("HelloBlahWorld Blah Hah")
+ QTest::newRow("7wholewords") << QString::fromLatin1("HelloBlahWorld Blah Hah")
<< "Blah" << int(QTextDocument::FindWholeWords | QTextDocument::FindBackward) << 23 << 15 << 19;
- QTest::newRow("8wholewords") << QString::fromAscii("Hello: World\n")
+ QTest::newRow("8wholewords") << QString::fromLatin1("Hello: World\n")
<< "orld" << int(QTextDocument::FindWholeWords) << 0 << -1 << -1;
- QTest::newRow("across-paragraphs") << QString::fromAscii("First Parag\nSecond Parag with a lot more text")
+ QTest::newRow("across-paragraphs") << QString::fromLatin1("First Parag\nSecond Parag with a lot more text")
<< "Parag" << int(QTextDocument::FindBackward)
<< 15 << 6 << 11;
@@ -350,7 +350,7 @@ void tst_QTextDocument::findWithRegExp_data()
// match ampersands but not &amp;
QTest::newRow("2") << "His &amp; hers & theirs" << "&(?!amp;)"<< int(QTextDocument::FindCaseSensitively) << 0 << 15 << 16;
//backward search
- QTest::newRow("3") << QString::fromAscii("HelloBlahWorld Blah Hah")
+ QTest::newRow("3") << QString::fromLatin1("HelloBlahWorld Blah Hah")
<< "h" << int(QTextDocument::FindBackward) << 18 << 8 << 9;
}
diff --git a/tests/auto/gui/text/qtextdocumentfragment/tst_qtextdocumentfragment.cpp b/tests/auto/gui/text/qtextdocumentfragment/tst_qtextdocumentfragment.cpp
index 7ca4fc981b..d9fc5da3a2 100644
--- a/tests/auto/gui/text/qtextdocumentfragment/tst_qtextdocumentfragment.cpp
+++ b/tests/auto/gui/text/qtextdocumentfragment/tst_qtextdocumentfragment.cpp
@@ -884,7 +884,7 @@ void tst_QTextDocumentFragment::hrefAnchor()
const char html[] = "<a href=\"test\">blah</a>";
setHtml(QString::fromLatin1(html));
QVERIFY(doc->begin().begin().fragment().charFormat().isAnchor());
- QCOMPARE(doc->begin().begin().fragment().charFormat().anchorHref(), QString::fromAscii("test"));
+ QCOMPARE(doc->begin().begin().fragment().charFormat().anchorHref(), QString::fromLatin1("test"));
QVERIFY(doc->begin().begin().fragment().charFormat().fontUnderline() == true);
}
@@ -912,13 +912,13 @@ void tst_QTextDocumentFragment::namedAnchorFragments()
// the 'a'
QVERIFY(it.fragment().isValid());
- QCOMPARE(it.fragment().text(), QString::fromAscii("a"));
+ QCOMPARE(it.fragment().text(), QString::fromLatin1("a"));
QVERIFY(it.fragment().charFormat().isAnchor() == false);
// the 'b' of 'blah' as separate fragment with the anchor attribute
++it;
QVERIFY(it.fragment().isValid());
- QCOMPARE(it.fragment().text(), QString::fromAscii("b"));
+ QCOMPARE(it.fragment().text(), QString::fromLatin1("b"));
QVERIFY(it.fragment().charFormat().isAnchor());
// the 'lah' of 'blah' as remainder
@@ -938,12 +938,12 @@ void tst_QTextDocumentFragment::namedAnchorFragments2()
QTextBlock::Iterator it = doc->begin().begin();
QVERIFY(!it.atEnd());
- QCOMPARE(it.fragment().text(), QString::fromAscii("H"));
+ QCOMPARE(it.fragment().text(), QString::fromLatin1("H"));
QVERIFY(it.fragment().charFormat().isAnchor());
++it;
- QCOMPARE(it.fragment().text(), QString::fromAscii("ello"));
+ QCOMPARE(it.fragment().text(), QString::fromLatin1("ello"));
QVERIFY(!it.fragment().charFormat().isAnchor());
}
@@ -956,7 +956,7 @@ void tst_QTextDocumentFragment::namedAnchorFragments3()
QTextBlock::Iterator it = doc->begin().begin();
QVERIFY(!it.atEnd());
- QCOMPARE(it.fragment().text(), QString::fromAscii("T"));
+ QCOMPARE(it.fragment().text(), QString::fromLatin1("T"));
QVERIFY(it.fragment().charFormat().isAnchor());
QCOMPARE(it.fragment().charFormat().anchorName(), QString("target"));
QStringList targets; targets << "target" << "target2";
@@ -964,7 +964,7 @@ void tst_QTextDocumentFragment::namedAnchorFragments3()
++it;
- QCOMPARE(it.fragment().text(), QString::fromAscii("ext"));
+ QCOMPARE(it.fragment().text(), QString::fromLatin1("ext"));
QVERIFY(!it.fragment().charFormat().isAnchor());
}
@@ -1068,7 +1068,7 @@ void tst_QTextDocumentFragment::mayNotHaveChildren()
// make sure the Hey does not end up as tag text for the img tag
const char html[] = "<img />Hey";
setHtml(QString::fromLatin1(html));
- QCOMPARE(doc->toPlainText().mid(1), QString::fromAscii("Hey"));
+ QCOMPARE(doc->toPlainText().mid(1), QString::fromLatin1("Hey"));
}
void tst_QTextDocumentFragment::inheritAlignment()
diff --git a/tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp b/tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp
index 8920e63957..d83f1e9a36 100644
--- a/tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp
+++ b/tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp
@@ -530,7 +530,7 @@ void tst_QTextLayout::defaultWordSeparators_data()
QString separators(".,:;-<>[](){}=/+%&^*");
separators += QLatin1String("!?");
for (int i = 0; i < separators.count(); ++i) {
- QTest::newRow(QString::number(i).toAscii().data())
+ QTest::newRow(QString::number(i).toLatin1().data())
<< QString::fromLatin1("abcd") + separators.at(i) + QString::fromLatin1("efgh")
<< 0 << 4;
}