projects
/
profile
/
ivi
/
qtbase.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
24e84dd
)
QTextLayout::lineAt() to return invalid line if index is out of bounds
author
Pekka Vuorela
<pekka.ta.vuorela@nokia.com>
Tue, 3 Jan 2012 13:07:13 +0000
(15:07 +0200)
committer
Qt by Nokia
<qt-info@nokia.com>
Thu, 5 Jan 2012 01:17:04 +0000
(
02:17
+0100)
Change-Id: I1f93789c96f3b2335b02897ff5fc8385964d1641
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
src/gui/text/qtextlayout.cpp
patch
|
blob
|
history
diff --git
a/src/gui/text/qtextlayout.cpp
b/src/gui/text/qtextlayout.cpp
index
6cf24d1
..
d470c6d
100644
(file)
--- a/
src/gui/text/qtextlayout.cpp
+++ b/
src/gui/text/qtextlayout.cpp
@@
-836,7
+836,7
@@
int QTextLayout::lineCount() const
*/
QTextLine QTextLayout::lineAt(int i) const
{
- return
QTextLine(i, d
);
+ return
i < lineCount() ? QTextLine(i, d) : QTextLine(
);
}
/*!