D20383: [KRunner] Avoid writing history if addToHistory is idempotent

Aleix Pol Gonzalez noreply at phabricator.kde.org
Tue Apr 9 02:00:36 BST 2019


apol added a comment.


  I'm not sure what we win but I'm not against the optimization.

INLINE COMMENTS

> view.cpp:370
> +    // Avoid removing the same item from the front and prepending it again
> +    if (!m_history.isEmpty() && m_history.first() == item) {
> +        return;

`m_history.constFirst() == item`

REPOSITORY
  R120 Plasma Workspace

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

To: bruns, #plasma, broulik, apol
Cc: plasma-devel, jraleigh, GB_2, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20190409/a8c1d47e/attachment.html>


More information about the Plasma-devel mailing list