summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorJan Arve Saether <jan-arve.saether@digia.com>2013-12-20 14:11:09 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-12-27 10:53:21 +0100
commitf0cf47092e0a9ab814427728fa3a37a8464fc5af (patch)
tree53956cd7edb7c1a4947202f80ab5549a96fc84a6 /src/plugins
parent2af6bf1a5943c2a75dae56d78992eb8ca1826af0 (diff)
Don't translate a null rect.
This was probably because of some forgotten braces, since the indentation seems to indicate that. The current behavior might cause a null rect to become not null, which might cause for QRect::isNull() to give a false positive. Worst case it might case a program to crash (i.e. div by 0) Change-Id: Iba49699880250e605b427ff4c1228c68a3471a2f Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/accessible/widgets/itemviews.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/accessible/widgets/itemviews.cpp b/src/plugins/accessible/widgets/itemviews.cpp
index b477a6acb7..7cd47f3fec 100644
--- a/src/plugins/accessible/widgets/itemviews.cpp
+++ b/src/plugins/accessible/widgets/itemviews.cpp
@@ -1057,9 +1057,10 @@ QRect QAccessibleTableCell::rect() const
QRect r;
r = view->visualRect(m_index);
- if (!r.isNull())
+ if (!r.isNull()) {
r.translate(view->viewport()->mapTo(view, QPoint(0,0)));
r.translate(view->mapToGlobal(QPoint(0, 0)));
+ }
return r;
}