Commit 7fe57f69 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Use modal dialog here (not necessary to create 10 dialogs...)

parent 34e62506
Pipeline #82125 failed with stage
in 54 seconds
......@@ -39,7 +39,7 @@ AggregationConfigButton::AggregationConfigButton(QWidget *parent, const Aggregat
});
// Keep aggregation combo up-to-date with any changes made in the configure dialog.
if (d->mAggregationComboBox != nullptr) {
if (d->mAggregationComboBox) {
connect(this, &AggregationConfigButton::configureDialogCompleted, d->mAggregationComboBox, &AggregationComboBox::slotLoadAggregations);
}
setEnabled(Manager::instance());
......@@ -59,10 +59,9 @@ void AggregationConfigButtonPrivate::slotConfigureAggregations()
auto dialog = new ConfigureAggregationsDialog(q->window());
dialog->selectAggregation(currentAggregationID);
QObject::connect(dialog, &ConfigureAggregationsDialog::okClicked, q, &AggregationConfigButton::configureDialogCompleted);
dialog->show();
if (dialog->exec()) {
Q_EMIT q->configureDialogCompleted();
}
}
#include "moc_aggregationconfigbutton.cpp"
......@@ -39,10 +39,9 @@ void ThemeConfigButtonPrivate::slotConfigureThemes()
auto dialog = new ConfigureThemesDialog(q->window());
dialog->selectTheme(currentThemeID);
QObject::connect(dialog, &ConfigureThemesDialog::okClicked, q, &ThemeConfigButton::configureDialogCompleted);
dialog->show();
if (dialog->exec()) {
Q_EMIT q->configureDialogCompleted();
}
}
ThemeConfigButton::ThemeConfigButton(QWidget *parent, const ThemeComboBox *themeComboBox)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment