summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Stenger <christian.stenger@theqtcompany.com>2015-04-09 15:11:35 +0200
committerChristian Stenger <christian.stenger@theqtcompany.com>2015-04-10 08:07:23 +0300
commit178318d077c1646d6c75788977731d7949093f2d (patch)
tree9b597c6d8f766d5fd187019288cdbbac2534c061
parentd43a36c8167a37903f70b49b67ec39efa0ba086e (diff)
downloadqt-creator-178318d077c1646d6c75788977731d7949093f2d.tar.gz
Fix initialization order...
...to avoid accessing uninitialized members. Change-Id: I5d174d2b6f351dc5189a65c1639b0f284a1fd52d Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
-rw-r--r--plugins/autotest/testresultdelegate.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/autotest/testresultdelegate.h b/plugins/autotest/testresultdelegate.h
index 0627ed5ee5..8bc5d58ad8 100644
--- a/plugins/autotest/testresultdelegate.h
+++ b/plugins/autotest/testresultdelegate.h
@@ -56,11 +56,11 @@ private:
m_top(options.rect.top()),
m_bottom(options.rect.bottom())
{
+ m_typeAreaWidth = QFontMetrics(options.font).width(QLatin1String("XXXXXXXX"));
int flexibleArea = lineAreaLeft() - textAreaLeft() - ITEM_SPACING;
if (m_maxFileLength > flexibleArea / 2)
m_realFileLength = flexibleArea / 2;
m_fontHeight = QFontMetrics(options.font).height();
- m_typeAreaWidth = QFontMetrics(options.font).width(QLatin1String("XXXXXXXX"));
}
int top() const { return m_top + ITEM_MARGIN; }