Improve coding style

This commit is contained in:
Martchus 2018-05-26 22:43:35 +02:00
parent 2250b9aa47
commit 70ee0be17b
3 changed files with 4 additions and 4 deletions

View File

@ -260,7 +260,7 @@ void MainWindow::pathEntered()
m_ui->filesTreeView->selectionModel()->setCurrentIndex(index, QItemSelectionModel::Rows | QItemSelectionModel::ClearAndSelect);
m_ui->pathLineEdit->setProperty("classNames", QStringList());
} else {
m_ui->pathLineEdit->setProperty("classNames", QStringList() << QStringLiteral("input-invalid"));
m_ui->pathLineEdit->setProperty("classNames", QStringList({ QStringLiteral("input-invalid") }));
}
updateStyle(m_ui->pathLineEdit);
}
@ -489,7 +489,7 @@ void MainWindow::selectNextFile(QItemSelectionModel *selectionModel, const QMode
void MainWindow::showNextFileNotFound()
{
static const QString errormsg(tr("Unable to show the next file because it can't be found anymore."));
QMessageBox::warning(this, QApplication::applicationName(), errormsg);
QMessageBox::warning(this, QCoreApplication::applicationName(), errormsg);
m_ui->statusBar->showMessage(errormsg);
}

View File

@ -89,7 +89,7 @@ void PicturePreviewSelection::setValue(const TagValue &value, PreviousValueHandl
assert(m_currentTypeIndex < m_values.size());
TagValue &currentValue = m_values[m_currentTypeIndex];
if ((previousValueHandling == PreviousValueHandling::Clear || !value.isEmpty())
&& (previousValueHandling != PreviousValueHandling::Keep || currentValue.isEmpty())) {
&& (previousValueHandling != PreviousValueHandling::Keep || currentValue.isEmpty())) {
currentValue = value; // TODO: move(value);
emit pictureChanged();
}

View File

@ -1500,7 +1500,7 @@ void TagEditorWidget::removeTag(Tag *tag)
}
// remove TagEdit widgets
for (TagEdit *edit : toRemove) {
for (TagEdit *const edit : toRemove) {
m_ui->tagSelectionComboBox->removeItem(m_ui->stackedWidget->indexOf(edit));
m_ui->stackedWidget->removeWidget(edit);
delete edit;