diff options
author | Anne Jan Brouwer <brouwer@annejan.com> | 2018-10-12 16:03:22 +0200 |
---|---|---|
committer | Anne Jan Brouwer <brouwer@annejan.com> | 2018-10-12 16:03:22 +0200 |
commit | 69512ff6f286371d2846b84a809bbfbc9a7e7289 (patch) | |
tree | 91f6c2db783c1731ba8232eeb3a27c3a7f885d3a /src/storemodel.cpp | |
parent | 6315d1e9371864f0ed6b3854a4b50561b062befe (diff) |
Some cleanup with help of Clang-Tidy and Clazy (part 2 of x)
Diffstat (limited to 'src/storemodel.cpp')
-rw-r--r-- | src/storemodel.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/storemodel.cpp b/src/storemodel.cpp index 2b7d3ac7..0f6dca0a 100644 --- a/src/storemodel.cpp +++ b/src/storemodel.cpp @@ -125,9 +125,9 @@ Qt::ItemFlags StoreModel::flags(const QModelIndex &index) const { if (index.isValid()) { return Qt::ItemIsDragEnabled | Qt::ItemIsDropEnabled | defaultFlags; - } else { + } return Qt::ItemIsDropEnabled | defaultFlags; - } + } QStringList StoreModel::mimeTypes() const { @@ -152,7 +152,7 @@ QMimeData *StoreModel::mimeData(const QModelIndexList &indexes) const { stream << info; } - QMimeData *mimeData = new QMimeData(); + auto *mimeData = new QMimeData(); mimeData->setData("application/vnd+qtpass.dragAndDropInfoPasswordStore", encodedData); return mimeData; @@ -218,14 +218,14 @@ bool StoreModel::dropMimeData(const QMimeData *data, Qt::DropAction action, QFileInfo destFileinfo = fs->fileInfo(mapToSource(destIndex)); QFileInfo srcFileInfo = QFileInfo(info.path); QDir qdir; - QString cleanedSrc = qdir.cleanPath(srcFileInfo.absoluteFilePath()); - QString cleanedDest = qdir.cleanPath(destFileinfo.absoluteFilePath()); + QString cleanedSrc = QDir::cleanPath(srcFileInfo.absoluteFilePath()); + QString cleanedDest = QDir::cleanPath(destFileinfo.absoluteFilePath()); if (info.isDir) { QDir srcDir = QDir(info.path); // dropped dir onto dir if (destFileinfo.isDir()) { QDir destDir = QDir(cleanedDest).filePath(srcFileInfo.fileName()); - QString cleanedDestDir = qdir.cleanPath(destDir.absolutePath()); + QString cleanedDestDir = QDir::cleanPath(destDir.absolutePath()); if (action == Qt::MoveAction) { QtPassSettings::getPass()->Move(cleanedSrc, cleanedDestDir); } else if (action == Qt::CopyAction) { |