summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorKonstantin Ritt <ritt.ks@gmail.com>2012-06-29 09:07:34 +0300
committerQt by Nokia <qt-info@nokia.com>2012-07-03 14:39:02 +0200
commitee4f50b2e78e1d8b4200866fa88dbf7dc5cffe26 (patch)
tree6ae195bd1911a0e363317c7980f257268c3a5c5b /tests
parentf4c9797d5ba7dd64e98d3c6fa90c791e422932dd (diff)
Add QChar::SoftHyphen enum value
Just like for the QChar::ByteOrderMark, `ch == QChar::SoftHyphen` is much more readable than `ch == 0x00ad // (soft-hyphen)`, etc. Change-Id: I9c85f14cfd979037d35103c3259a435fd729b869 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/corelib/tools/qtextboundaryfinder/tst_qtextboundaryfinder.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/corelib/tools/qtextboundaryfinder/tst_qtextboundaryfinder.cpp b/tests/auto/corelib/tools/qtextboundaryfinder/tst_qtextboundaryfinder.cpp
index ad48ebf047..045da9f24c 100644
--- a/tests/auto/corelib/tools/qtextboundaryfinder/tst_qtextboundaryfinder.cpp
+++ b/tests/auto/corelib/tools/qtextboundaryfinder/tst_qtextboundaryfinder.cpp
@@ -550,7 +550,7 @@ void tst_QTextBoundaryFinder::isAtSoftHyphen_data()
QTest::addColumn<QList<int> >("expectedBreakPositions");
QString testString = QString::fromUtf8("I a-m break-able");
- testString.replace(QLatin1Char('-'), QChar(0x00AD));
+ testString.replace(QLatin1Char('-'), QChar(QChar::SoftHyphen));
QList<int> expectedBreakPositions;
expectedBreakPositions << 0 << 2 << 4 << 6 << 12 << 16;
QTest::newRow("Soft Hyphen") << testString << expectedBreakPositions;
@@ -564,7 +564,7 @@ void tst_QTextBoundaryFinder::isAtSoftHyphen()
doTestData(testString, expectedBreakPositions, QTextBoundaryFinder::Line);
QTextBoundaryFinder boundaryFinder(QTextBoundaryFinder::Line, testString);
- for (int i = 0; (i = testString.indexOf(QChar(0x00AD), i)) != -1; ++i) {
+ for (int i = 0; (i = testString.indexOf(QChar(QChar::SoftHyphen), i)) != -1; ++i) {
QVERIFY(expectedBreakPositions.contains(i + 1));
boundaryFinder.setPosition(i + 1);
QVERIFY(boundaryFinder.isAtBoundary());