kstyle: Limit what kinds of QPushButtons can use autoDefault
This prevents most buttons outside of QDialogButtonBoxes from getting the default button visuals/behavior. Internally, QPushButton::autoDefault can be explicitly on, explicitly off, or automatic (enabled if in a QDialog). If autoDefault is explicitly on and not in a dialog, or on/automatic in a dialog and has a QDialogButtonBox parent, explicitly enable autoDefault, else explicitly disable autoDefault. If someone explicitly enabled autoDefault outside of a QDialog, they probably had a reason to do that, so we'll avoid interfering with that if we can. Unfortunately, there is no way to detect if autoDefault was explicitly enabled inside of a QDialog, so that might mess with a small minority of applications.
parent
219cd7b1