Replace accidental usages of QAbstractButton::pressed

This signal is not usually what you want, and creates an inconsistent experience.

Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
This commit is contained in:
TheKodeToad 2023-06-25 10:36:54 +01:00
parent 5eb71fc6a9
commit 603ed22015
3 changed files with 5 additions and 5 deletions

View File

@ -205,7 +205,7 @@ ModrinthManagedPackPage::ModrinthManagedPackPage(BaseInstance* inst, InstanceWin
{ {
Q_ASSERT(inst->isManagedPack()); Q_ASSERT(inst->isManagedPack());
connect(ui->versionsComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(suggestVersion())); connect(ui->versionsComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(suggestVersion()));
connect(ui->updateButton, &QPushButton::pressed, this, &ModrinthManagedPackPage::update); connect(ui->updateButton, &QPushButton::clicked, this, &ModrinthManagedPackPage::update);
} }
// MODRINTH // MODRINTH
@ -332,7 +332,7 @@ FlameManagedPackPage::FlameManagedPackPage(BaseInstance* inst, InstanceWindow* i
{ {
Q_ASSERT(inst->isManagedPack()); Q_ASSERT(inst->isManagedPack());
connect(ui->versionsComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(suggestVersion())); connect(ui->versionsComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(suggestVersion()));
connect(ui->updateButton, &QPushButton::pressed, this, &FlameManagedPackPage::update); connect(ui->updateButton, &QPushButton::clicked, this, &FlameManagedPackPage::update);
} }
void FlameManagedPackPage::parseManagedPack() void FlameManagedPackPage::parseManagedPack()

View File

@ -116,8 +116,8 @@ Page::Page(NewInstanceDialog* dialog, QWidget *parent)
connect(ui->thirdPartyPackList->selectionModel(), &QItemSelectionModel::currentChanged, this, &Page::onThirdPartyPackSelectionChanged); connect(ui->thirdPartyPackList->selectionModel(), &QItemSelectionModel::currentChanged, this, &Page::onThirdPartyPackSelectionChanged);
connect(ui->privatePackList->selectionModel(), &QItemSelectionModel::currentChanged, this, &Page::onPrivatePackSelectionChanged); connect(ui->privatePackList->selectionModel(), &QItemSelectionModel::currentChanged, this, &Page::onPrivatePackSelectionChanged);
connect(ui->addPackBtn, &QPushButton::pressed, this, &Page::onAddPackClicked); connect(ui->addPackBtn, &QPushButton::clicked, this, &Page::onAddPackClicked);
connect(ui->removePackBtn, &QPushButton::pressed, this, &Page::onRemovePackClicked); connect(ui->removePackBtn, &QPushButton::clicked, this, &Page::onRemovePackClicked);
connect(ui->tabWidget, &QTabWidget::currentChanged, this, &Page::onTabChanged); connect(ui->tabWidget, &QTabWidget::currentChanged, this, &Page::onTabChanged);

View File

@ -59,7 +59,7 @@ void SetupWizard::pageChanged(int id)
{ {
setButtonLayout({QWizard::CustomButton1, QWizard::Stretch, QWizard::BackButton, QWizard::NextButton, QWizard::FinishButton}); setButtonLayout({QWizard::CustomButton1, QWizard::Stretch, QWizard::BackButton, QWizard::NextButton, QWizard::FinishButton});
auto customButton = button(QWizard::CustomButton1); auto customButton = button(QWizard::CustomButton1);
connect(customButton, &QAbstractButton::pressed, [&](){ connect(customButton, &QAbstractButton::clicked, [&](){
auto basePagePtr = getCurrentBasePage(); auto basePagePtr = getCurrentBasePage();
if(basePagePtr) if(basePagePtr)
{ {