From 9827cd78256c24e8311400198864aaadfff4e7ab Mon Sep 17 00:00:00 2001 From: Thomas Zander Date: Wed, 7 Apr 2010 14:36:46 +0200 Subject: Simplify docs a bit --- doc/src/snippets/code/src_gui_text_qtextlayout.cpp | 2 -- src/gui/text/qtextlayout.cpp | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/doc/src/snippets/code/src_gui_text_qtextlayout.cpp b/doc/src/snippets/code/src_gui_text_qtextlayout.cpp index ad5725e..13040ea 100644 --- a/doc/src/snippets/code/src_gui_text_qtextlayout.cpp +++ b/doc/src/snippets/code/src_gui_text_qtextlayout.cpp @@ -42,7 +42,6 @@ //! [0] int leading = fontMetrics.leading(); qreal height = 0; -qreal widthUsed = 0; textLayout.beginLayout(); while (1) { QTextLine line = textLayout.createLine(); @@ -53,7 +52,6 @@ while (1) { height += leading; line.setPosition(QPointF(0, height)); height += line.height(); - widthUsed = qMax(widthUsed, line.naturalTextWidth()); } textLayout.endLayout(); //! [0] diff --git a/src/gui/text/qtextlayout.cpp b/src/gui/text/qtextlayout.cpp index 312d135..ce7915d 100644 --- a/src/gui/text/qtextlayout.cpp +++ b/src/gui/text/qtextlayout.cpp @@ -305,7 +305,7 @@ Qt::LayoutDirection QTextInlineObject::textDirection() const Once the layout is done, these lines can be drawn on a paint device. - Here's some pseudo code that presents the layout phase: + Here's some code snippet that presents the layout phase: \snippet doc/src/snippets/code/src_gui_text_qtextlayout.cpp 0 The text can be drawn by calling the layout's draw() function: -- cgit v0.12