From 51fa7df978d71a366c95c732d6a8c2576690d63a Mon Sep 17 00:00:00 2001 From: David Faure Date: Sat, 5 Jun 2010 00:06:15 +0200 Subject: Add convenience constructor to QTextOption::Tab Merge-request: 1734 Reviewed-by: Simon Hausmann --- tests/auto/qtextlayout/tst_qtextlayout.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'tests/auto/qtextlayout') diff --git a/tests/auto/qtextlayout/tst_qtextlayout.cpp b/tests/auto/qtextlayout/tst_qtextlayout.cpp index 1a5f493a01..a631f3d282 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 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 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); -- cgit v1.2.1