Formatting
This commit is contained in:
@@ -192,8 +192,10 @@ QString About::ContributorsHtml() const {
|
||||
|
||||
QString About::PersonToHtml(const Person &person) {
|
||||
|
||||
if (person.email.isNull())
|
||||
if (person.email.isEmpty()) {
|
||||
return person.name;
|
||||
else
|
||||
}
|
||||
else {
|
||||
return QString("%1 <<a href=\"mailto:%2\">%3</a>>").arg(person.name, person.email, person.email);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -878,8 +878,9 @@ void EditTagDialog::FieldValueEdited() {
|
||||
if (ignore_edits_) return;
|
||||
|
||||
const QModelIndexList sel = ui_->song_list->selectionModel()->selectedIndexes();
|
||||
if (sel.isEmpty())
|
||||
if (sel.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
QWidget *w = qobject_cast<QWidget*>(sender());
|
||||
|
||||
@@ -896,8 +897,9 @@ void EditTagDialog::FieldValueEdited() {
|
||||
void EditTagDialog::ResetField() {
|
||||
|
||||
const QModelIndexList sel = ui_->song_list->selectionModel()->selectedIndexes();
|
||||
if (sel.isEmpty())
|
||||
if (sel.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
QWidget *w = qobject_cast<QWidget*>(sender());
|
||||
|
||||
|
||||
@@ -77,8 +77,9 @@ void ErrorDialog::UpdateContent() {
|
||||
|
||||
QString html;
|
||||
for (const QString &message : current_messages_) {
|
||||
if (!html.isEmpty())
|
||||
if (!html.isEmpty()) {
|
||||
html += "<hr/>";
|
||||
}
|
||||
html += message.toHtmlEscaped();
|
||||
}
|
||||
ui_->messages->setHtml(html);
|
||||
|
||||
@@ -266,8 +266,9 @@ void TrackSelectionDialog::SaveData(const QList<Data> &data) {
|
||||
|
||||
for (int i = 0; i < data.count(); ++i) {
|
||||
const Data &ref = data[i];
|
||||
if (ref.pending_ || ref.results_.isEmpty() || ref.selected_result_ == -1)
|
||||
if (ref.pending_ || ref.results_.isEmpty() || ref.selected_result_ == -1) {
|
||||
continue;
|
||||
}
|
||||
|
||||
const Song &new_metadata = ref.results_[ref.selected_result_];
|
||||
|
||||
@@ -302,8 +303,9 @@ void TrackSelectionDialog::accept() {
|
||||
QDialog::accept();
|
||||
|
||||
for (const Data &tag_data : data_) {
|
||||
if (tag_data.pending_ || tag_data.results_.isEmpty() || tag_data.selected_result_ == -1)
|
||||
if (tag_data.pending_ || tag_data.results_.isEmpty() || tag_data.selected_result_ == -1) {
|
||||
continue;
|
||||
}
|
||||
|
||||
const Song &new_metadata = tag_data.results_[tag_data.selected_result_];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user