D20838: Allow to drop one file or one folder on KDirOperator
Elvis Angelaccio
noreply at phabricator.kde.org
Sat May 11 10:39:50 BST 2019
elvisangelaccio added inline comments.
INLINE COMMENTS
> kfilewidgettest.cpp:38
> +#include <QMimeData>
> +#include <QDebug>
> +
Unused?
> kfilewidgettest.cpp:407-413
> + QDir f(tempDir.filePath(dir));
> +
> + KFileWidget fw(QUrl::fromLocalFile(tempDir.path()));
> + fw.setOperationMode(KFileWidget::Opening);
> + fw.setMode(KFile::File);
> + fw.show();
> + fw.activateWindow();
Please use descriptive variable names instead of `f` and `fw`
> kfilewidgettest.cpp:415
> +
> + QList<QUrl> list_urls = {fileUrl};
> + QMimeData *mimeData = new QMimeData();
Missing camelCase
> kdiroperator.cpp:1404-1405
> +
> + QMimeDatabase md;
> + QMimeType mt = md.mimeTypeForUrl(url);
> +
Please use descriptive variable names also here.
> kdiroperator.cpp:1407
> +
> + QRegExp r;
> + r.setPatternSyntax(QRegExp::Wildcard); // the "mimetype" can be "image/*"
QRegExp should be avoid in new code, can you try to use QRegularExpression instead?
REPOSITORY
R241 KIO
BRANCH
arcpatch-D20838_1
REVISION DETAIL
https://phabricator.kde.org/D20838
To: meven, ngraham, #frameworks
Cc: elvisangelaccio, apol, kde-frameworks-devel, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190511/f86e4308/attachment-0001.html>
More information about the Kde-frameworks-devel
mailing list