D14631: Adds a new RenameDialog to KIO with more options for batch renaming
David Faure
noreply at phabricator.kde.org
Sun Jul 21 10:33:45 BST 2019
dfaure added a comment.
KIO::move (implemented by CopyJob) can move N files to a single destination directory, but they get the same name at that dest.
KIO::moveAs (implemented by CopyJob too) can move/rename a single file to a specific filename at destination.
What you're suggesting is a new job that can move N files to a destination directory (to make this generic it doesn't have to be in-place renames, right?), but you're providing the filename at destination for each file, right?
This sounds good to me. I could imagine this being handled by CopyJob too.
The struct CopyInfo already stores source and destination URLs for every file, it's just that the destination URL is filled in CopyJobPrivate::slotResultStating by appending the filename to the dest dir, except in moveAs (m_asMethod==true) where the destination URL *is* the final filename.
I could imagine a KIO::moveAs that takes two QList<QUrl> and then this information is fetched from there rather than using m_dest.
In fact, if the existing moveAs() method is ported to call the two-QLists one, that will mean less special casing in the code (which wouldn't use m_dest anymore in slotResultStating, when m_asMethod).
REPOSITORY
R241 KIO
REVISION DETAIL
https://phabricator.kde.org/D14631
To: emateli, #frameworks, dfaure, mlaurent
Cc: anthonyfieroni, chinmoyr, mlaurent, asensi, rkflx, dfaure, aacid, ngraham, kde-frameworks-devel, LeGast00n, sbergeron, michaelh, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190721/ad2f541d/attachment.html>
More information about the Kde-frameworks-devel
mailing list