D24422: [dolphin] Improve parsing of Baloo query searchString

Christian Ehrlicher noreply at phabricator.kde.org
Mon Oct 21 21:18:44 BST 2019


chehrlic added inline comments.

INLINE COMMENTS

> dolphinsearchbox.cpp:539
> +
>      const QStringList subTerms = query.searchString().split(' ', QString::SkipEmptyParts);
>      foreach (const QString& subTerm, subTerms) {

Wouldn't it be better to use

  const QString searchString = query.searchString();
  const auto subTerms = searchString.splitRef(QLatin1Char(' '), QString::SkipEmptyParts);
  for (const QStringRef &subTerm : subTerms) {
   ...

to avoid the creation of the substrings?

> dolphinsearchbox.cpp:567
> +
> +    setText(searchTextItems.join(" "));
> +

QLatin1Char(' ') instead " "

REPOSITORY
  R318 Dolphin

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

To: iasensio, #dolphin, elvisangelaccio, meven, bruns, ngraham
Cc: chehrlic, ngraham, bruns, kfm-devel, #baloo, iasensio, fprice, MrPepe, fbampaloukas, alexde, Codezela, feverfew, meven, spoorun, navarromorales, firef, andrebarros, emmanuelp, mikesomov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20191021/a08567d7/attachment.htm>


More information about the kfm-devel mailing list