diff options
author | Thiago Macieira <thiago.macieira@nokia.com> | 2010-07-01 17:24:01 (GMT) |
---|---|---|
committer | Thiago Macieira <thiago.macieira@nokia.com> | 2010-07-01 17:24:01 (GMT) |
commit | 745ecfd8925716d962c97a4415881377faf6bdd5 (patch) | |
tree | c4f78b3bd143af52372064cd3ba5c0ae440813c5 /tests/auto/qtextlayout | |
parent | bda164303570629e44185e8baa52908ced6da301 (diff) | |
parent | 8968c79c575755cdb52d5e615ed19e4529047464 (diff) | |
download | Qt-745ecfd8925716d962c97a4415881377faf6bdd5.zip Qt-745ecfd8925716d962c97a4415881377faf6bdd5.tar.gz Qt-745ecfd8925716d962c97a4415881377faf6bdd5.tar.bz2 |
Merge remote branch 'origin/4.7' into qt-master-from-4.7
Conflicts:
bin/syncqt
src/gui/text/qtextlayout.cpp
tools/assistant/tools/assistant/helpviewer_qwv.cpp
tools/assistant/tools/assistant/helpviewer_qwv.h
tools/configure/configureapp.cpp
Diffstat (limited to 'tests/auto/qtextlayout')
-rw-r--r-- | tests/auto/qtextlayout/tst_qtextlayout.cpp | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/tests/auto/qtextlayout/tst_qtextlayout.cpp b/tests/auto/qtextlayout/tst_qtextlayout.cpp index 8758092..079e69f 100644 --- a/tests/auto/qtextlayout/tst_qtextlayout.cpp +++ b/tests/auto/qtextlayout/tst_qtextlayout.cpp @@ -113,6 +113,7 @@ private slots: void columnWrapWithTabs(); void boundingRectForUnsetLineWidth(); void boundingRectForSetLineWidth(); + void glyphLessItems(); // QTextLine stuff void setNumColumnsWrapAtWordBoundaryOrAnywhere(); @@ -1004,9 +1005,7 @@ void tst_QTextLayout::testCenteredTab() // test if centering the tab works. We expect the center of 'Bar.' to be at the tab point. QTextOption option = layout.textOption(); QList<QTextOption::Tab> tabs; - QTextOption::Tab tab; - tab.type = QTextOption::CenterTab; - tab.position = 150; + QTextOption::Tab tab(150, QTextOption::CenterTab); tabs.append(tab); option.setTabs(tabs); layout.setTextOption(option); @@ -1026,10 +1025,7 @@ void tst_QTextLayout::testDelimiterTab() // try the different delimiter characters to see if the alignment works there. QTextOption option = layout.textOption(); QList<QTextOption::Tab> tabs; - QTextOption::Tab tab; - tab.type = QTextOption::DelimiterTab; - tab.delimiter = QChar('.'); - tab.position = 100; + QTextOption::Tab tab(100, QTextOption::DelimiterTab, QChar('.')); tabs.append(tab); option.setTabs(tabs); layout.setTextOption(option); @@ -1368,6 +1364,24 @@ void tst_QTextLayout::lineWidthFromBOM() // Don't spin into an infinite loop } +void tst_QTextLayout::glyphLessItems() +{ + { + QTextLayout layout; + layout.setText("\t\t"); + layout.beginLayout(); + layout.createLine(); + layout.endLayout(); + } + + { + QTextLayout layout; + layout.setText(QString::fromLatin1("AA") + QChar(QChar::LineSeparator)); + layout.beginLayout(); + layout.createLine(); + layout.endLayout(); + } +} QTEST_MAIN(tst_QTextLayout) #include "tst_qtextlayout.moc" |