diff options
authorC. Boemann <>2012-01-10 20:09:58 +0100
committerQt by Nokia <>2012-01-17 14:44:30 +0100
commitefc355e8ed5bf17c5d31ac92728048b8f6706993 (patch)
parentbf805455d40b4445f61321439d529cd85cb6bc65 (diff)
Fix that right aligned tabs can cause text overlapping
Eventhough there is a unittest that shows it shouldn't overlap it does at drawing. I've not been able to figure out why the unittet doesn't fail, but it has before been the case that layout and drawing don't correspond. Change-Id: I13250d0510cd0d963721b05f67ac82b1d499fbac Reviewed-by: Eskil Abrahamsen Blomfeldt <>
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/text/qtextengine.cpp b/src/gui/text/qtextengine.cpp
index 0dd8d0bef3..b218e2aae5 100644
--- a/src/gui/text/qtextengine.cpp
+++ b/src/gui/text/qtextengine.cpp
@@ -2526,7 +2526,7 @@ QFixed QTextEngine::calculateTabWidth(int item, QFixed x) const
// fall through
case QTextOption::RightTab:
tab = QFixed::fromReal(tabSpec.position) * dpiScale - length;
- if (tab < 0) // default to tab taking no space
+ if (tab < x) // default to tab taking no space
return QFixed();
case QTextOption::LeftTab: