projects
/
quassel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
d36a37a
)
Don't loop indefinitely while trying to teach manners to Qt
author
Manuel Nickschas
<sputnick@quassel-irc.org>
Fri, 9 Oct 2009 16:10:31 +0000
(18:10 +0200)
committer
Manuel Nickschas
<sputnick@quassel-irc.org>
Fri, 9 Oct 2009 16:10:31 +0000
(18:10 +0200)
Fugly hack wasn't fugly enough.
src/qtui/chatitem.cpp
patch
|
blob
|
history
diff --git
a/src/qtui/chatitem.cpp
b/src/qtui/chatitem.cpp
index
e3ab1ab
..
b1a071b
100644
(file)
--- a/
src/qtui/chatitem.cpp
+++ b/
src/qtui/chatitem.cpp
@@
-460,7
+460,7
@@
void ContentsChatItem::doLayout(QTextLayout *layout) const {
// Sometimes, setNumColumns will create a line that's too long (cf. Qt bug 238249)
// We verify this and try setting the width again, making it shorter each time until the lengths match.
// Dead fugly, but seems to work…
- for(int i = line.textLength()-1; line.textLength() > num; i--) {
+ for(int i = line.textLength()-1;
i >= 0 &&
line.textLength() > num; i--) {
line.setNumColumns(i);
}
if(num != line.textLength()) {