┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/views/renamedialog.h
diff options
context:
space:
mode:
authorChinmoy Ranjan Pradhan <[email protected]>2018-01-27 17:19:39 +0530
committerChinmoy Ranjan Pradhan <[email protected]>2018-01-27 17:21:30 +0530
commitc5eb4e31161ccf422a2f2492fe998c5c9817bea4 (patch)
treea0f7ea4e44c1577d7caece22c55f92521c667b3c /src/views/renamedialog.h
parentadd821885d0e21509b15feed5826aadadb8364dd (diff)
Use BatchRenameJob to rename multiple files in Dolphin
Summary: Use KIO::BatchRenameJob in Dolphin::RenameDialog to rename multiple files. With this viewing progress of rename operation and undo is possible. See D9103 and D9107. Reviewers: #dolphin, elvisangelaccio Subscribers: elvisangelaccio, ngraham, broulik Differential Revision: https://phabricator.kde.org/D9836
Diffstat (limited to 'src/views/renamedialog.h')
-rw-r--r--src/views/renamedialog.h17
1 files changed, 3 insertions, 14 deletions
diff --git a/src/views/renamedialog.h b/src/views/renamedialog.h
index 8a92ea1b9..8da770895 100644
--- a/src/views/renamedialog.h
+++ b/src/views/renamedialog.h
@@ -29,7 +29,7 @@
class QLineEdit;
class QSpinBox;
class QPushButton;
-
+class KJob;
/**
* @brief Dialog for renaming a variable number of files.
*/
@@ -47,24 +47,13 @@ signals:
private slots:
void slotAccepted();
void slotTextChanged(const QString& newName);
+ void slotFileRenamed(const QUrl& oldUrl, const QUrl& newUrl);
+ void slotResult(KJob* job);
protected:
void showEvent(QShowEvent* event) override;
private:
- void renameItems();
- void renameItem(const KFileItem &item, const QString& newName);
-
- /**
- * @return Returns the string \p name, where the characters represented by
- * \p indexPlaceHolder get replaced by the index \p index.
- * E. g. Calling indexedName("Test #.jpg", 12, '#') returns "Test 12.jpg".
- * A connected sequence of placeholders results in leading zeros:
- * indexedName("Test ####.jpg", 12, '#') returns "Test 0012.jpg".
- */
- static QString indexedName(const QString& name, int index, const QChar& indexPlaceHolder);
-
-private:
bool m_renameOneItem;
QList<QUrl> m_renamedItems;
QString m_newName;