Skip to content

Commit bc849a3

Browse files
committed
EO-11401 - Disable the back button
1 parent 6ab8f8c commit bc849a3

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/libs/installer/packagemanagergui.cpp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1855,6 +1855,9 @@ CustomIntroductionPage::CustomIntroductionPage(PackageManagerCore *core)
18551855
m_taskButton = nullptr;
18561856
}
18571857
#endif
1858+
1859+
// By setting this as a commit page, we make sure that the back button on the following page will be disabled
1860+
setCommitPage(true);
18581861
}
18591862

18601863
/*!
@@ -2305,7 +2308,7 @@ void CustomIntroductionPage::entering()
23052308
// Ready for installation text
23062309
if (core->isUninstaller()) {
23072310
// m_taskDetailsBrowser->setVisible(false);
2308-
setButtonText(QWizard::NextButton, tr("U&ninstall"));
2311+
setButtonText(QWizard::CommitButton, tr("U&ninstall"));
23092312
setColoredTitle(tr("Ready to Uninstall %1").arg(productName()));
23102313
m_spaceLabel->setText(tr("Setup is now ready to begin removing %1 from your computer.<br>"
23112314
"<font color=\"red\">The program directory %2 will be deleted completely</font>, "
@@ -2316,14 +2319,14 @@ void CustomIntroductionPage::entering()
23162319
// setComplete(true);
23172320
// return;
23182321
} else if (core->isMaintainer()) {
2319-
setButtonText(QWizard::NextButton, tr("U&pdate"));
2322+
setButtonText(QWizard::CommitButton, tr("U&pdate"));
23202323
// setColoredTitle(tr("Ready to Update Packages"));
23212324
m_spaceLabel->setText(tr("Setup is now ready to begin updating your installation."));
23222325
} else {
23232326
Q_ASSERT(core->isInstaller());
23242327
core->calculateComponentsToInstall();
23252328
showInstallerInformation();
2326-
setButtonText(QWizard::NextButton, tr("&Install"));
2329+
setButtonText(QWizard::CommitButton, tr("&Install"));
23272330
// setColoredTitle(tr("Ready to Install"));
23282331
m_spaceLabel->setText(tr("Setup is now ready to begin installing %1 on your computer.")
23292332
.arg(productName()));
@@ -2365,7 +2368,7 @@ void CustomIntroductionPage::leaving()
23652368
}
23662369

23672370
// Resetting button text (after changing it to Install/Uninstall/Update)
2368-
setButtonText(QWizard::NextButton, gui()->defaultButtonText(QWizard::NextButton));
2371+
setButtonText(QWizard::CommitButton, gui()->defaultButtonText(QWizard::CommitButton));
23692372

23702373
// Store the install location
23712374
packageManagerCore()->setValue(scTargetDir, targetDir());

0 commit comments

Comments
 (0)