Formatting

This commit is contained in:
Jonas Kvinge
2021-07-11 09:49:38 +02:00
parent a6742d401c
commit e48b7d83a3
161 changed files with 370 additions and 369 deletions

View File

@@ -57,7 +57,7 @@ class SmartPlaylistQueryWizardPlugin::SearchPage : public QWizardPage { // claz
return true;
}
if (std::any_of(terms_.begin(), terms_.end(), [](SmartPlaylistSearchTermWidget *widget){ return !widget->Term().is_valid(); })) {
if (std::any_of(terms_.begin(), terms_.end(), [](SmartPlaylistSearchTermWidget *widget) { return !widget->Term().is_valid(); })) {
return false;
}

View File

@@ -155,9 +155,7 @@ void SmartPlaylistSearchTermWidget::FieldChanged(int index) {
// Show the correct value editor
QWidget *page = nullptr;
SmartPlaylistSearchTerm::Operator op = static_cast<SmartPlaylistSearchTerm::Operator>(
ui_->op->itemData(ui_->op->currentIndex()).toInt()
);
SmartPlaylistSearchTerm::Operator op = static_cast<SmartPlaylistSearchTerm::Operator>(ui_->op->itemData(ui_->op->currentIndex()).toInt());
switch (type) {
case SmartPlaylistSearchTerm::Type_Time:
page = ui_->page_time;
@@ -210,8 +208,7 @@ void SmartPlaylistSearchTermWidget::OpChanged(int idx) {
// Determine the currently selected operator
SmartPlaylistSearchTerm::Operator op = static_cast<SmartPlaylistSearchTerm::Operator>(
// This uses the operatorss index in the combobox to get its enum value
ui_->op->itemData(ui_->op->currentIndex()).toInt()
);
ui_->op->itemData(ui_->op->currentIndex()).toInt());
// We need to change the page only in the following case
if ((ui_->value_stack->currentWidget() == ui_->page_text) || (ui_->value_stack->currentWidget() == ui_->page_empty)) {
@@ -327,7 +324,8 @@ void SmartPlaylistSearchTermWidget::SetTerm(const SmartPlaylistSearchTerm &term)
case SmartPlaylistSearchTerm::Type_Text:
if (ui_->value_stack->currentWidget() == ui_->page_empty) {
ui_->value_text->setText("");
} else {
}
else {
ui_->value_text->setText(term.value_.toString());
}
break;

View File

@@ -139,7 +139,7 @@ void SmartPlaylistWizard::AddPlugin(SmartPlaylistWizardPlugin *plugin) {
type_page_->layout()->addWidget(radio_button);
type_page_->layout()->addWidget(description);
QObject::connect(radio_button, &QRadioButton::clicked, [this, index]() { TypeChanged(index); } );
QObject::connect(radio_button, &QRadioButton::clicked, [this, index]() { TypeChanged(index); });
if (index == 0) {
radio_button->setChecked(true);