1. 27 May, 2021 1 commit
  2. 29 Apr, 2021 1 commit
  3. 20 Mar, 2021 1 commit
  4. 04 Feb, 2021 1 commit
    • Harald Sitter's avatar
      Revert "Use subseq matching for service runner" · dc65943e
      Harald Sitter authored
      This reverts commit 9f2abd0a.
      
      Scores are adjusted by launch count, so pulling more matches into a
      context increases the chance of one of them outscoring the other even
      though they have nothing to do with it.
      
      Notable example:
      Flatpaks have extremely long Exec lines meaning they match just about
      any subsequence match once we've reached 3 query characters.
      So then a konversation flatpak matches the query 'tel' same as telegram.
      Now if you are more into IRC than into telegram you may have a higher
      launch count applying to konversation and all of a sudden the
      objectively better match for the query is no longer at the top.
      
      In lieu of a way to prevent this from happening with krunner 5.78 we'll
      need to undo the subsequencing for now.
      
      For future reference: Kai and I believe Exec and Comment shouldn't be
      subsequence matched at all because Exec just makes no sense to begin
      with and Comment can be so very long so it will suffer the same problem
      as outlined. The more text there is the higher the chance of it matching
      the subsequence simply having having all the characters appear anywhere.
      
      Further future reference: subseq needs a test case added to the unit
      test if it makes a return!
      
      BUG: 431609
      BUG: 432339
      CCBUG: 262837
      FIXED-IN: 5.21.0
      dc65943e
  5. 21 Jan, 2021 1 commit
    • Alexander Lohnau's avatar
      Run clang-format · 823d2106
      Alexander Lohnau authored
      If you want git blame to ignore formatting revisions run:
      git config blame.ignoreRevsFile .git-blame-ignore-revs
      823d2106
  6. 03 Dec, 2020 1 commit
    • Michael Eden's avatar
      Use subseq matching for service runner · 9f2abd0a
      Michael Eden authored
      Summary:
      This changes krunner to use sub-sequence matching fixing bug 262837.
      Some usage examples are shown below:
      
      {F6052081}
      
      {F6052084}
      
      BUG: 262837
      
      Depends on D13670
      
      Reviewers: rthomas, #plasma_workspaces, #plasma, broulik, ngraham
      
      Reviewed By: ngraham
      
      Subscribers: meven, justinzobel, cfeck, ngraham, plasma-devel
      
      Tags: #plasma
      
      Differential Revision: https://phabricator.kde.org/D13988
      9f2abd0a
  7. 16 Nov, 2020 1 commit
  8. 25 Oct, 2020 1 commit
  9. 23 Oct, 2020 1 commit
  10. 15 Oct, 2020 1 commit
  11. 02 Oct, 2020 1 commit
  12. 16 Sep, 2020 1 commit
    • Harald Sitter's avatar
      disabe ksycoca rebuilding on runner threads · 5a648c56
      Harald Sitter authored
      this frees the internal per-thread inotify instance used to watch
      database changes meaning runner applications no longer claim N inotify
      instances (N=size of threadweaver pool).
      the database is still reloaded by ksyscoca internally if it finds the
      backing file has changed.
      
      CCBUG: 423818
      5a648c56
  13. 14 Sep, 2020 1 commit
    • Harald Sitter's avatar
      adjust relevance of kcms in service runner · a3f22cde
      Harald Sitter authored
      kcms are handy but not nearly as handy as an actual application. this is
      particular notable with the test case where the user could type 'virt'
      but that wouldn't have pushed virtualization software to the top but kcms
      since kcms are kde things so they always get a .09 bump to
      relevance.
      
      the revised scoring excludes kcms from the bump and further reduces the
      relvance by the tiniest fraction. this results in all applications that
      match at least as well as the KCM to outscore the KCM
      a3f22cde
  14. 08 Jul, 2020 2 commits
  15. 15 Jun, 2020 1 commit
  16. 11 May, 2020 1 commit
    • Marco Martin's avatar
      force systemsettings for kcms · e67e8d6d
      Marco Martin authored
      Summary:
      as we can't kill completely kcmshell just yet, hack intothe services runner to
      replace on the fly the exec line of the service to systemsettings
      
      BUG: 402790
      FIXED-IN: 5.19.0
      
      Test Plan:
      search and launch directly for a module, systemsettings is launched wit hthe
      proper module loaded
      
      Reviewers: #plasma, ngraham
      
      Reviewed By: ngraham
      
      Subscribers: broulik, ngraham, davidre, plasma-devel
      
      Tags: #plasma
      
      Differential Revision: https://phabricator.kde.org/D29157
      e67e8d6d
  17. 17 Apr, 2020 1 commit
  18. 06 Apr, 2020 1 commit
  19. 20 Mar, 2020 1 commit
    • Harald Sitter's avatar
      make servicerunner only build once · d03f98e7
      Harald Sitter authored
      Summary:
      build the runner itself in a static lib we can use for testing and then
      link that into a module lib together with the factory entry point to
      compose the final lib for installation
      
      means servicesrunner.cpp is now only built once, whereas before it was
      built twice through 100% duplicative targets
      
      Test Plan: test still passes, installing and restarting krunner still yields working service searches
      
      Reviewers: broulik, davidedmundson
      
      Reviewed By: davidedmundson
      
      Subscribers: plasma-devel
      
      Tags: #plasma
      
      Differential Revision: https://phabricator.kde.org/D28137
      d03f98e7
  20. 19 Mar, 2020 1 commit
  21. 09 Mar, 2020 1 commit
  22. 06 Jan, 2020 1 commit
  23. 27 Nov, 2019 1 commit
  24. 04 Sep, 2019 1 commit
  25. 18 Mar, 2019 1 commit
    • Harald Sitter's avatar
      [service runner] throw out kde3 "compat" code · 1f3ab6f7
      Harald Sitter authored
      Summary:
      Desktop files such as kde/foo.desktop are identified as kde-foo.desktop
      because of the menu spec
      
      ```
      If the directory contains sub-directories then these sub-directories should be (recursively) scanned as well. The name of the subdirectory should be added as prefix to the desktop-file id together with a dash character ("-")
      ```
      
      the runner therefore broadly assumed that kde-foo.desktop is always
      the desktop file kde/foo.desktop and since kde/ was only used up to KDE3
      this assumption formed the basis for sepcial KDE3 compat handling. that is
      of course wrong because a service might just as well actually have a
      prefix and be actually called kde-foo.desktop rather than
      kde/foo.desktop. Specific example: kde-gtk-config.desktop
      
      seeing as this is ancient compatibility code that is actually wrong,
      the easiest solution seems to be dropping the code entirely (and thus no
      longer assume kde- has some special meaning).
      
      (also I didn't find a way to get the underlying filename of a kservice,
       so making the code not wrong seems non-trivial)
      
      CHANGELOG: the GTK+ settings module now correctly appears in krunner and kickoff
      BUG: 383287
      
      Test Plan: gtk kcm correctly shows up in both kickoff and krunner searches
      
      Reviewers: broulik
      
      Reviewed By: broulik
      
      Subscribers: GB_2, plasma-devel
      
      Tags: #plasma
      
      Differential Revision: https://phabricator.kde.org/D19788
      1f3ab6f7
  26. 04 Mar, 2019 1 commit
  27. 06 Aug, 2018 1 commit
  28. 16 May, 2018 1 commit
  29. 10 Mar, 2018 1 commit
  30. 08 Feb, 2018 1 commit
  31. 29 Jan, 2018 1 commit
  32. 27 Jan, 2018 1 commit
  33. 13 Nov, 2017 1 commit
    • Xuetian Weng's avatar
      Use heuristic weighted length algorithm to calculate the query term length. · 55a8d72e
      Xuetian Weng authored
      Summary:
      Composing CJK character requires a lot more key comparing to latin
      characters. The raw length check does not make much sense for query string
      in CJK characters. Here we use a simple algorithm to query the character
      script property in unicode. If they are belong to CJK, use length 2 instead
      of 1 for the character.
      
      Test Plan:
      Search "系" (normally requires three key press "x + i + 1" under pinyin) under
      zh_CN in krunner and get some result instead of nothing.
      
      Reviewers: hein, broulik
      
      Reviewed By: hein
      
      Subscribers: cfeck, ihipop, plasma-devel
      
      Tags: #plasma
      
      Differential Revision: https://phabricator.kde.org/D8771
      55a8d72e
  34. 28 May, 2017 1 commit
    • Ronnie Thomas's avatar
      Match subsequences in application runner · ea59c63a
      Ronnie Thomas authored
      Match applications in krunner using subsequences instead of substrings.
      This allows matching applications using parts of its name, instead of
      having to type its full name.
      This is also an attempt to implement bug #262837 (Applications runner -
      match subsequence instead of substring)
      
      Differential Revision: https://phabricator.kde.org/D5870
      ea59c63a
  35. 07 Feb, 2017 1 commit
    • Harald Sitter's avatar
      make services disqualification much stricter · 7b1dc9a4
      Harald Sitter authored
      Summary:
      after the recent set of changes to disqualification we ended up with a bit
      too lax disqualification. if we saw the exec OR the storageid we'd
      hence forth disqualify a service with either of them being equal.
      
      in case of system settings this causes a match problem. systemsettings
      has two desktop files one !KDE and one OnlyKDE they are however exactly
      the same except for a different name and storageid. as a result if the !KDE
      one is encountered first it will be disqualified on account of
      noDisplay=true and marked as seen. when the OnlyKDE systemsettings is then
      iterated it will already have the Exec entry in the seen list and be
      disqualified on account of that.
      
      to prevent this type of confusion make it a requirement to match both
      storageid AND exec before disqualifying.
      
      it may actually be suitable to drop the exec altogether. say I copy firefox
      into the user local applications dir and set it NoDisplay=true but change
      the exec. this would still lead to the system-wide firefox being found as
      it is not getting disqualified. long story short: maybe we should
      disqualify services solely on the storageid?
      
      Test Plan:
      - new autotest case
      - fails without changes
      - passes with changes
      
      Reviewers: broulik
      
      Reviewed By: broulik
      
      Subscribers: plasma-devel
      
      Tags: #plasma
      
      Differential Revision: https://phabricator.kde.org/D4415
      7b1dc9a4
  36. 16 Dec, 2016 3 commits
    • Harald Sitter's avatar
      introduce new wrapper to disqualify services · b838d0d1
      Harald Sitter authored
      disqualify() checks whether the service ought to be disqualified (i.e.
      not processed) and then marks it seen. this allows us to boilerplate
      call disqualify(service) whenever iterating services to decide whether
      the service in question should be skipped.
      also means we don't have to call noDisplay once a service is disqualified
      
      reviewed by kbroulik on irc
      b838d0d1
    • Harald Sitter's avatar
      do not explicitly check NotShownIn it's not necessary and incomplete · b9ac8450
      Harald Sitter authored
      Summary:
      KService::noDisplay() includes qualification for
      - NoDisplay entry itself
      - OnlyShowIn and NotShowIn
      - X-KDE-OnlyShowOnQtPlatforms
      - authorization WRT KCMs
      
      as such checking nodisplay is good enough to disqualify services in all
      relevant scenarios
      
      Test Plan: - read the code of noDisplay()
      
      Reviewers: broulik
      
      Reviewed By: broulik
      
      Subscribers: plasma-devel
      
      Tags: #plasma
      
      Differential Revision: https://phabricator.kde.org/D3705
      b9ac8450
    • Harald Sitter's avatar
      take matching logic out of match method and put it into a class · 8c7a95cc
      Harald Sitter authored
      Summary:
      refactor and qcdebug
      
      ::match was a super long spagetthi with multiple sub-matches.
      This was supposedly primarily because it needed to be stateful across all sub-matches. To deal with this there's a new class which is taking care of the stateful service finding, this class is comprised of multiple matching functions that contribute to the full match set.
      Good enough readability for now. Classes for this would be nicer though.
      
      Also add qcdebug for this runner so we can get a better idea of why results are the way they are. Defaults to warning so it's silent by default.
      
      Test Plan:
      Careful refactoring so hopefully no problems.
      
      - still matches binary names as best match
      - still matches comments
      - still matches generic names
      - still matches names
      
      Reviewers: broulik
      
      Reviewed By: broulik
      
      Subscribers: plasma-devel
      
      Tags: #plasma
      
      Differential Revision: https://phabricator.kde.org/D3687
      8c7a95cc
  37. 19 Jul, 2016 1 commit