From 178318d077c1646d6c75788977731d7949093f2d Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Thu, 9 Apr 2015 15:11:35 +0200 Subject: Fix initialization order... ...to avoid accessing uninitialized members. Change-Id: I5d174d2b6f351dc5189a65c1639b0f284a1fd52d Reviewed-by: David Schulz --- plugins/autotest/testresultdelegate.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- cgit v1.2.1