refactor: simplify sources processing

Also fix desktop source
This commit is contained in:
2024-03-28 11:14:45 +02:00
parent 0bcceefd47
commit a35b57e5d2
69 changed files with 552 additions and 1087 deletions

View File

@ -91,7 +91,7 @@ void AWAbstractPairConfig::updateUi()
// remove current selector if it is empty and does not last
if (sender() == m_selectors.last())
return;
auto *selector = m_selectors.takeAt(index);
auto selector = m_selectors.takeAt(index);
ui->verticalLayout->removeWidget(selector);
selector->deleteLater();
} else {
@ -109,7 +109,7 @@ void AWAbstractPairConfig::addSelector(const QStringList &_keys, const QStringLi
{
qCDebug(LOG_AW) << "Add selector with keys" << _keys << "values" << _values << "and current ones" << _current;
auto *selector = new AWAbstractSelector(ui->scrollAreaWidgetContents, m_editable);
auto selector = new AWAbstractSelector(ui->scrollAreaWidgetContents, m_editable);
selector->init(_keys, _values, _current);
ui->verticalLayout->insertWidget(ui->verticalLayout->count() - 1, selector);
connect(selector, &AWAbstractSelector::selectionChanged, this, &AWAbstractPairConfig::updateUi);