summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Zander <t.zander@nokia.com>2010-04-07 12:36:46 (GMT)
committerThomas Zander <t.zander@nokia.com>2010-04-16 12:04:36 (GMT)
commit9827cd78256c24e8311400198864aaadfff4e7ab (patch)
treea0f047a7db5636eeed915a74c3be81fe8a8a5cfd
parent1e0cb74f433083d2cafa21da3e34e87a35838b90 (diff)
downloadQt-9827cd78256c24e8311400198864aaadfff4e7ab.zip
Qt-9827cd78256c24e8311400198864aaadfff4e7ab.tar.gz
Qt-9827cd78256c24e8311400198864aaadfff4e7ab.tar.bz2
Simplify docs a bit
-rw-r--r--doc/src/snippets/code/src_gui_text_qtextlayout.cpp2
-rw-r--r--src/gui/text/qtextlayout.cpp2
2 files changed, 1 insertions, 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: