diff --git a/CMakeLists.txt b/CMakeLists.txt index 829c8db..b672ef2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,7 +12,7 @@ set(META_GUI_OPTIONAL true) set(META_JS_SRC_DIR renamingutility) set(META_VERSION_MAJOR 3) set(META_VERSION_MINOR 1) -set(META_VERSION_PATCH 2) +set(META_VERSION_PATCH 3) # add project files set(HEADER_FILES diff --git a/application/knownfieldmodel.cpp b/application/knownfieldmodel.cpp index 6a298df..55b1129 100644 --- a/application/knownfieldmodel.cpp +++ b/application/knownfieldmodel.cpp @@ -125,7 +125,7 @@ KnownFieldModel::KnownFieldModel(QObject *parent, DefaultSelection defaultSelect items << mkItem(KnownField::Composer, Qt::Unchecked); items << mkItem(KnownField::Rating, Qt::Unchecked); items << mkItem(KnownField::Description, Qt::Unchecked); - setItems(items); + setItems(std::move(items)); } KnownFieldModel::KnownFieldModel(const QList &items, QObject *parent) diff --git a/application/knownfieldmodel.h b/application/knownfieldmodel.h index ec581a5..d911b92 100644 --- a/application/knownfieldmodel.h +++ b/application/knownfieldmodel.h @@ -34,8 +34,8 @@ public: explicit KnownFieldModel(QObject *parent = nullptr, DefaultSelection defaultSelection = DefaultSelection::None); explicit KnownFieldModel(const QList &items, QObject *parent = nullptr); - QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const; - virtual QString labelForId(const QVariant &id) const; + QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override; + QString labelForId(const QVariant &id) const override; #endif }; diff --git a/renamingutility/renamingengine.cpp b/renamingutility/renamingengine.cpp index 17469f7..f172ce2 100644 --- a/renamingutility/renamingengine.cpp +++ b/renamingutility/renamingengine.cpp @@ -306,13 +306,13 @@ void RenamingEngine::executeScriptForItem(const QFileInfo &fileInfo, FileSystemI break; case ActionType::Rename: if (!newRelativeDirectory.isEmpty()) { - FileSystemItem *counterpartParent = item->root()->makeChildAvailable(newRelativeDirectory); + FileSystemItem *const counterpartParent = item->root()->makeChildAvailable(newRelativeDirectory); const QString &counterpartName = newName.isEmpty() ? item->name() : newName; if (counterpartParent->findChild(counterpartName, item)) { item->setNote(tr("name is already used at new location")); item->setErrorOccured(true); } else { - auto *counterpart = new FileSystemItem(ItemStatus::New, item->type(), counterpartName, counterpartParent); + auto *const counterpart = new FileSystemItem(ItemStatus::New, item->type(), counterpartName, counterpartParent); item->setCounterpart(counterpart); counterpart->setCheckable(true); counterpart->setChecked(true); @@ -320,7 +320,7 @@ void RenamingEngine::executeScriptForItem(const QFileInfo &fileInfo, FileSystemI } else if (!newName.isEmpty()) { item->setNewName(newName); } - if (FileSystemItem *newItem = item->counterpart()) { + if (FileSystemItem *const newItem = item->counterpart()) { if ((newItem->name().isEmpty() || newItem->name() == item->name()) && (newItem->parent() == item->parent())) { item->setNote(tr("name doesn't change")); } else if (newItem->parent() && newItem->parent()->findChild(newItem->name(), newItem)) {