forked from qt-creator/qt-creator
Fix initialization order...
...to avoid accessing uninitialized members. Change-Id: I5d174d2b6f351dc5189a65c1639b0f284a1fd52d Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
This commit is contained in:
@@ -56,11 +56,11 @@ private:
|
|||||||
m_top(options.rect.top()),
|
m_top(options.rect.top()),
|
||||||
m_bottom(options.rect.bottom())
|
m_bottom(options.rect.bottom())
|
||||||
{
|
{
|
||||||
|
m_typeAreaWidth = QFontMetrics(options.font).width(QLatin1String("XXXXXXXX"));
|
||||||
int flexibleArea = lineAreaLeft() - textAreaLeft() - ITEM_SPACING;
|
int flexibleArea = lineAreaLeft() - textAreaLeft() - ITEM_SPACING;
|
||||||
if (m_maxFileLength > flexibleArea / 2)
|
if (m_maxFileLength > flexibleArea / 2)
|
||||||
m_realFileLength = flexibleArea / 2;
|
m_realFileLength = flexibleArea / 2;
|
||||||
m_fontHeight = QFontMetrics(options.font).height();
|
m_fontHeight = QFontMetrics(options.font).height();
|
||||||
m_typeAreaWidth = QFontMetrics(options.font).width(QLatin1String("XXXXXXXX"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int top() const { return m_top + ITEM_MARGIN; }
|
int top() const { return m_top + ITEM_MARGIN; }
|
||||||
|
Reference in New Issue
Block a user