Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
This commit is contained in:
TheKodeToad 2023-07-01 17:20:43 +01:00
parent 4cdf669154
commit 284e374ae8
2 changed files with 0 additions and 11 deletions

View File

@ -108,10 +108,6 @@ InstallLoaderDialog::InstallLoaderDialog(std::shared_ptr<PackProfile> profile, c
setWindowTitle(dialogTitle());
resize(650, 400);
connect(m_container, &PageContainer::selectedPageChanged, this,
[this](BasePage* previous, BasePage* selected) { updateAcceptButton(selected); });
updateAcceptButton(m_container->selectedPage());
pageCast(m_container->selectedPage())->selectSearch();
for (BasePage* page : m_container->getPages())
if (page->id() == uid)
@ -136,12 +132,6 @@ QString InstallLoaderDialog::dialogTitle()
return tr("Install Loader");
}
void InstallLoaderDialog::updateAcceptButton(const BasePage* page)
{
auto installed = !m_profile->getComponentVersion(page->id()).isNull();
m_buttons->button(QDialogButtonBox::Ok)->setText(installed ? tr("&Update") : tr("&Install"));
}
void InstallLoaderDialog::done(int result)
{
if (result == Accepted) {

View File

@ -35,7 +35,6 @@ class InstallLoaderDialog final : public QDialog, public BasePageProvider {
QList<BasePage*> getPages() override;
QString dialogTitle() override;
void updateAcceptButton(const BasePage* page);
void done(int result) override;
private: