diff options
author | David Faure <faure@kde.org> | 2010-06-04 22:06:15 (GMT) |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2010-06-04 22:06:44 (GMT) |
commit | 51fa7df978d71a366c95c732d6a8c2576690d63a (patch) | |
tree | e112d17e004c95d77c02375f0fa4d575afcda297 /tests/auto/qtextlayout/tst_qtextlayout.cpp | |
parent | 09c6a81109d3978c1583c556202c01c1e774f11f (diff) | |
download | Qt-51fa7df978d71a366c95c732d6a8c2576690d63a.zip Qt-51fa7df978d71a366c95c732d6a8c2576690d63a.tar.gz Qt-51fa7df978d71a366c95c732d6a8c2576690d63a.tar.bz2 |
Add convenience constructor to QTextOption::Tab
Merge-request: 1734
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
Diffstat (limited to 'tests/auto/qtextlayout/tst_qtextlayout.cpp')
-rw-r--r-- | tests/auto/qtextlayout/tst_qtextlayout.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/tests/auto/qtextlayout/tst_qtextlayout.cpp b/tests/auto/qtextlayout/tst_qtextlayout.cpp index 1a5f493..a631f3d 100644 --- a/tests/auto/qtextlayout/tst_qtextlayout.cpp +++ b/tests/auto/qtextlayout/tst_qtextlayout.cpp @@ -980,9 +980,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); @@ -1002,10 +1000,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); |