frontend,shared: Replace and disable contextless connect calls

# Conflicts:
#	frontend/OBSApp.cpp
This commit is contained in:
gxalpha
2025-12-17 16:35:45 -05:00
committed by Ryan Foster
parent 876806bbf5
commit 5129612b6c
34 changed files with 93 additions and 89 deletions
+3 -3
View File
@@ -359,18 +359,18 @@ OBSBasicSourceSelect::OBSBasicSourceSelect(OBSBasic *parent, const char *id_, un
installEventFilter(CreateShortcutFilter());
connect(ui->createNew, &QRadioButton::pressed, [&]() {
connect(ui->createNew, &QRadioButton::pressed, this, [&]() {
QPushButton *button = ui->buttonBox->button(QDialogButtonBox::Ok);
if (!button->isEnabled())
button->setEnabled(true);
});
connect(ui->selectExisting, &QRadioButton::pressed, [&]() {
connect(ui->selectExisting, &QRadioButton::pressed, this, [&]() {
QPushButton *button = ui->buttonBox->button(QDialogButtonBox::Ok);
bool enabled = ui->sourceList->selectedItems().size() != 0;
if (button->isEnabled() != enabled)
button->setEnabled(enabled);
});
connect(ui->sourceList, &QListWidget::itemSelectionChanged, [&]() {
connect(ui->sourceList, &QListWidget::itemSelectionChanged, this, [&]() {
QPushButton *button = ui->buttonBox->button(QDialogButtonBox::Ok);
if (!button->isEnabled())
button->setEnabled(true);