diff options
author | Frerich Raabe <raabe@froglogic.com> | 2016-02-03 13:33:19 +0100 |
---|---|---|
committer | Katja Marttila <katja.marttila@theqtcompany.com> | 2016-02-15 05:46:38 +0000 |
commit | 264183e9be4f6a4a23771156a5d4257a23b1aa28 (patch) | |
tree | 3a1c642a8e4c20a50683d47dc182dbbddc493556 /src/libs/installer/packagemanagergui.cpp | |
parent | 966f195fbc4cb341f29d9d9f4a6eb0a5748262c9 (diff) |
Fixed final 'Finish' message on OS X
On OS X, the final page of the installer would say something like
Click Done to exit the %1 wizard.
However, the final "commit" button is only actually labelled "Done" when
using the natie OS X style.
When specifying a different style in the config.xml file, e.g. 'Modern',
the commit button is labelled the same as on other operating systems:
"Finish". Hence, in such cases the final message would be wrong.
Fix this by not hardcoding any particular label in the message but
rather querying the default button text - this works with all styles.
This also required setting the text a little later (when entering the
page) because only then we can safely access the pointer returned by the
gui() method.
Change-Id: I285c6e376c8450457fcce20941240f9e29350de7
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
Reviewed-by: Katja Marttila <katja.marttila@theqtcompany.com>
Diffstat (limited to 'src/libs/installer/packagemanagergui.cpp')
-rw-r--r-- | src/libs/installer/packagemanagergui.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/libs/installer/packagemanagergui.cpp b/src/libs/installer/packagemanagergui.cpp index 8eaa522c4..4aef1ae83 100644 --- a/src/libs/installer/packagemanagergui.cpp +++ b/src/libs/installer/packagemanagergui.cpp @@ -2988,12 +2988,6 @@ FinishedPage::FinishedPage(PackageManagerCore *core) m_msgLabel->setWordWrap(true); m_msgLabel->setObjectName(QLatin1String("MessageLabel")); -#ifdef Q_OS_OSX - m_msgLabel->setText(tr("Click Done to exit the %1 Wizard.").arg(productName())); -#else - m_msgLabel->setText(tr("Click Finish to exit the %1 Wizard.").arg(productName())); -#endif - m_runItCheckBox = new QCheckBox(this); m_runItCheckBox->setObjectName(QLatin1String("RunItCheckBox")); m_runItCheckBox->setChecked(true); @@ -3012,6 +3006,10 @@ FinishedPage::FinishedPage(PackageManagerCore *core) */ void FinishedPage::entering() { + m_msgLabel->setText(tr("Click %1 to exit the %2 Wizard.") + .arg(gui()->defaultButtonText(QWizard::FinishButton).remove(QLatin1Char('&'))) + .arg(productName())); + if (m_commitButton) { disconnect(m_commitButton, &QAbstractButton::clicked, this, &FinishedPage::handleFinishClicked); m_commitButton = 0; |