D14043: [KFilePlacesModel] Support pretty baloosearch URLs
Dominik Haumann
noreply at phabricator.kde.org
Sun Jul 22 23:45:48 BST 2018
dhaumann added inline comments.
INLINE COMMENTS
> kfileplacesmodel.cpp:137
>
> - if (path.endsWith(QLatin1String("/documents"))) {
> - searchUrl = searchUrlForType(QStringLiteral("Document"));
> - } else if (path.endsWith(QLatin1String("/images"))) {
> - searchUrl = searchUrlForType(QStringLiteral("Image"));
> - } else if (path.endsWith(QLatin1String("/audio"))) {
> - searchUrl = searchUrlForType(QStringLiteral("Audio"));
> - } else if (path.endsWith(QLatin1String("/videos"))) {
> - searchUrl = searchUrlForType(QStringLiteral("Video"));
> - } else {
> - qWarning() << "Invalid search url:" << url;
> - searchUrl = url;
> + const QStringList validSearchPaths = {
> + QStringLiteral("/documents"),
const auto validSearchPaths = { ... }; Would use an initializer list. This would be likely faster, since it would avoid the QStringList.
REPOSITORY
R241 KIO
REVISION DETAIL
https://phabricator.kde.org/D14043
To: broulik, #frameworks, bruns, dfaure, renatoo, franckarrecot, ngraham, hein
Cc: dhaumann, kde-frameworks-devel, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20180722/3bfb5d8f/attachment.html>
More information about the Kde-frameworks-devel
mailing list