summaryrefslogtreecommitdiff
path: root/src/gui/widgets/qpushbutton_p.h
diff options
context:
space:
mode:
authorjasplin <qt-info@nokia.com>2009-06-29 08:12:48 +0200
committerjasplin <qt-info@nokia.com>2009-06-29 08:41:22 +0200
commita8cd5dc1294f2bbaa12c88d7f59b61a1011f5d18 (patch)
tree84e8b45b2b2549a1fb4d6e1502c364a192da7e07 /src/gui/widgets/qpushbutton_p.h
parent37229d77646347db089553a82c44ef0d52eb36c7 (diff)
downloadqt4-tools-a8cd5dc1294f2bbaa12c88d7f59b61a1011f5d18.tar.gz
Fixed QPushButton sizeHint recalculation bug.
This patch causes the size hint of QPushButton to be recalculated in cases where the value of the autoDefault property may have changed due to changes in the ancestor chain. If not explicitly set, the value of the autoDefault property depends on the presence of a QDialog ancestor. Note: The new autotest covers two different use cases related to this behavior. Reviewed-by: janarve Task-number: 255581
Diffstat (limited to 'src/gui/widgets/qpushbutton_p.h')
-rw-r--r--src/gui/widgets/qpushbutton_p.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/widgets/qpushbutton_p.h b/src/gui/widgets/qpushbutton_p.h
index 0c5ac7935e..9d682d8e3c 100644
--- a/src/gui/widgets/qpushbutton_p.h
+++ b/src/gui/widgets/qpushbutton_p.h
@@ -65,7 +65,7 @@ public:
QPushButtonPrivate()
: QAbstractButtonPrivate(QSizePolicy::PushButton), autoDefault(Auto),
- defaultButton(false), flat(false), menuOpen(false) {}
+ defaultButton(false), flat(false), menuOpen(false), lastAutoDefault(false) {}
inline void init() { resetLayoutItemMargins(); }
void resetLayoutItemMargins();
@@ -77,6 +77,7 @@ public:
uint defaultButton : 1;
uint flat : 1;
uint menuOpen : 1;
+ mutable uint lastAutoDefault : 1;
};
QT_END_NAMESPACE