diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2014-07-29 23:32:13 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2014-07-30 23:41:01 +0200 |
commit | c7386938b43f3564b3e3a6fe5f98009e39d52e4c (patch) | |
tree | d288735af2b0f898e225675aeba901541dade3f9 /src/widgets | |
parent | ab79a8a76c6fae9d92b9b0718eee60d60c73ecc8 (diff) |
QProgressDialog: make the cancel button retranslate on LanguageChange
It is documented to be, and the LanguageChange event is caught and processed.
However, retranslateStrings() uses QProgressDialog::setCancelButtonText(),
which unconditionally sets useDefaultCancelText=true, blocking any further
changes to the button text by subsequent LanguageChange events.
The fix is to use extracted QProgressDialogPrivate::setCancelButtonText()
which - quite intentionally - doesn't set useDefaultCancelText.
Task-number: QTBUG-40504
Change-Id: I6e701deda10c454cb088c0b0778ac2d6adff574a
Reviewed-by: David Faure <david.faure@kdab.com>
Diffstat (limited to 'src/widgets')
-rw-r--r-- | src/widgets/dialogs/qprogressdialog.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/widgets/dialogs/qprogressdialog.cpp b/src/widgets/dialogs/qprogressdialog.cpp index d160ab0ae1..35a75adea2 100644 --- a/src/widgets/dialogs/qprogressdialog.cpp +++ b/src/widgets/dialogs/qprogressdialog.cpp @@ -179,9 +179,8 @@ void QProgressDialogPrivate::layout() void QProgressDialogPrivate::retranslateStrings() { - Q_Q(QProgressDialog); if (useDefaultCancelText) - q->setCancelButtonText(QProgressDialog::tr("Cancel")); + setCancelButtonText(QProgressDialog::tr("Cancel")); } void QProgressDialogPrivate::_q_disconnectOnClose() |