D24433: Move URL parsing methods from kioslave to query object

Stefan BrĂ¼ns noreply at phabricator.kde.org
Fri Dec 13 01:12:36 GMT 2019


bruns added inline comments.

INLINE COMMENTS

> query.cpp:342
> +        QString jsonString = urlQuery.queryItemValue(QStringLiteral("json"), QUrl::FullyDecoded);
> +        q = Query::fromJSON(jsonString.toUtf8());
> +    } else if (urlQuery.hasQueryItem(QStringLiteral("query"))) {

just `return Query::fromJSON(jsonString.toUtf8());`

> query.cpp:343
> +        q = Query::fromJSON(jsonString.toUtf8());
> +    } else if (urlQuery.hasQueryItem(QStringLiteral("query"))) {
> +        QString queryString = urlQuery.queryItemValue(QStringLiteral("query"), QUrl::FullyDecoded);

remove the `else`

> query.cpp:345
> +        QString queryString = urlQuery.queryItemValue(QStringLiteral("query"), QUrl::FullyDecoded);
> +        q.setSearchString(queryString);
> +    } else {

just `return q;`

> query.cpp:346
> +        q.setSearchString(queryString);
> +    } else {
> +        const QString jsonString = jsonQueryFromUrl(url);

remove `else`

> query.cpp:349
> +        if (!jsonString.isEmpty()) {
> +            q = Query::fromJSON(jsonString.toUtf8());
> +        }

just `return Query::fromJSON(jsonString.toUtf8());`

REPOSITORY
  R293 Baloo

BRANCH
  extend_query_url

REVISION DETAIL
  https://phabricator.kde.org/D24433

To: iasensio, #baloo, meven, ngraham, astippich
Cc: broulik, bruns, kde-frameworks-devel, #dolphin, hurikhan77, lots0logs, LeGast00n, fbampaloukas, GB_2, domson, ashaposhnikov, michaelh, astippich, spoorun, ngraham, abrahams
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20191213/c426e0a2/attachment.htm>


More information about the kfm-devel mailing list