Fix use uninitialized, detected by GCC 4.8
If the widget \a field is not present on this form, getWidgetPosition might not fill in the role variable. GCC is correct. qformlayout.cpp:1690:19: error: ‘role’ may be used uninitialized in this function [-Werror=maybe-uninitialized] Change-Id: Ia67991a71e8f1ceacb9d6370c7028c454ef630c6 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>bb10
parent
7e872de76e
commit
380de7f8e7
|
|
@ -1683,7 +1683,7 @@ QWidget *QFormLayout::labelForField(QWidget *field) const
|
|||
Q_D(const QFormLayout);
|
||||
|
||||
int row;
|
||||
ItemRole role;
|
||||
ItemRole role = LabelRole;
|
||||
|
||||
getWidgetPosition(field, &row, &role);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue