Fix silly taking of address when not intended
authorThiago Macieira <thiago.macieira@intel.com>
Sun, 23 Nov 2014 15:44:17 +0000 (07:44 -0800)
committerThiago Macieira <thiago.macieira@intel.com>
Mon, 24 Nov 2014 16:42:08 +0000 (17:42 +0100)
We meant to pass the boolean itself, noting whether the property
had changed, not the address of the boolean, cast to a bool.

Found by Clang 3.6:
qlayout_widget.cpp:421:147: warning: address of 'this->m_fieldGrowthPolicyChanged' will always evaluate to 'true' [-Wpointer-bool-conversion]

Change-Id: I8a7db0d0cf02b88043f905333e119a8fb799ea53
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
src/designer/src/lib/shared/qlayout_widget.cpp

index 49bf1bb..7e77e5d 100644 (file)
@@ -418,7 +418,7 @@ int LayoutProperties::toPropertySheet(const QDesignerFormEditorInterface *core,
                 rc |= spacingFlags[i];
     // sizeConstraint
     variantPropertyToSheet(mask, SizeConstraintProperty, applyChanged, sheet, QLatin1String(sizeConstraintC), m_sizeConstraint, m_sizeConstraintChanged, &rc);
-    variantPropertyToSheet(mask, FieldGrowthPolicyProperty, applyChanged, sheet, QLatin1String(fieldGrowthPolicyPropertyC), m_fieldGrowthPolicy, &m_fieldGrowthPolicyChanged, &rc);
+    variantPropertyToSheet(mask, FieldGrowthPolicyProperty, applyChanged, sheet, QLatin1String(fieldGrowthPolicyPropertyC), m_fieldGrowthPolicy, m_fieldGrowthPolicyChanged, &rc);
     variantPropertyToSheet(mask, RowWrapPolicyProperty, applyChanged, sheet, QLatin1String(rowWrapPolicyPropertyC), m_rowWrapPolicy, m_rowWrapPolicyChanged, &rc);
     variantPropertyToSheet(mask, LabelAlignmentProperty, applyChanged, sheet, QLatin1String(labelAlignmentPropertyC), m_labelAlignment, m_labelAlignmentChanged, &rc);
     variantPropertyToSheet(mask, FormAlignmentProperty, applyChanged, sheet, QLatin1String(formAlignmentPropertyC), m_formAlignment, m_formAlignmentChanged, &rc);