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

2019-04-09 Thread Stefan Brüns
This revision was automatically updated to reflect the committed changes. Closed by commit R120:9686c05c7226: [KRunner] Avoid writing history if addToHistory is idempotent (authored by bruns). REPOSITORY R120 Plasma Workspace CHANGES SINCE LAST UPDATE

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

2019-04-08 Thread Stefan Brüns
bruns updated this revision to Diff 55793. bruns added a comment. use const REPOSITORY R120 Plasma Workspace CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D20383?vs=55748=55793 BRANCH arcpatch-D20383 REVISION DETAIL https://phabricator.kde.org/D20383 AFFECTED FILES

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

2019-04-08 Thread Aleix Pol Gonzalez
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;

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

2019-04-08 Thread Stefan Brüns
bruns created this revision. bruns added reviewers: Plasma, broulik, apol. Herald added a project: Plasma. Herald added a subscriber: plasma-devel. bruns requested review of this revision. REVISION SUMMARY It is not uncommon to run the same command repeatedly. In this case, the history is