D29447: Fix showing updates when the option is selected

2020-05-06 Thread Dan Leinir Turthra Jensen
This revision was automatically updated to reflect the committed changes. Closed by commit R304:25d391c6f36b: Fix showing updates when the option is selected (authored by leinir). REPOSITORY R304 KNewStuff CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D29447?vs=82021=82064 REVISION

D29447: Fix showing updates when the option is selected

2020-05-05 Thread Alexander Lohnau
alex added a comment. No problem, always happy to help  REPOSITORY R304 KNewStuff BRANCH fix-show-only-updates (branched from master) REVISION DETAIL https://phabricator.kde.org/D29447 To: leinir, #knewstuff, #plasma, bugseforuns, ngraham, #frameworks Cc: alex, kde-frameworks-devel,

D29447: Fix showing updates when the option is selected

2020-05-05 Thread Dan Leinir Turthra Jensen
leinir marked 2 inline comments as done. leinir added a comment. Thanks for making me realise that it doesn't have to be quite so elaborate, @alex ;) REPOSITORY R304 KNewStuff BRANCH fix-show-only-updates (branched from master) REVISION DETAIL https://phabricator.kde.org/D29447 To:

D29447: Fix showing updates when the option is selected

2020-05-05 Thread Dan Leinir Turthra Jensen
leinir updated this revision to Diff 82021. leinir added a comment. As @alex suggests, just use qlist::contains, it is supposed to be reasonably cheap, so... yup, trust the framework! ;) - Just use qlist::contains REPOSITORY R304 KNewStuff CHANGES SINCE LAST UPDATE

D29447: Fix showing updates when the option is selected

2020-05-05 Thread Dan Leinir Turthra Jensen
leinir added inline comments. INLINE COMMENTS > alex wrote in itemsmodel.cpp:71 > On second thought why not just use: > `bool duplicate = m_entries.contains(entry);` Hmm... i do wonder slight of the cost of that, but also... much simpler code, so... basically can just go if

D29447: Fix showing updates when the option is selected

2020-05-05 Thread Alexander Lohnau
alex added inline comments. INLINE COMMENTS > itemsmodel.cpp:71 > +bool duplicate{false}; > +for (const EntryInternal : qAsConst(m_entries)) { > +if (existingEntry == entry) { On second thought why not just use: `bool duplicate = m_entries.contains(entry);` REPOSITORY R304

D29447: Fix showing updates when the option is selected

2020-05-05 Thread Nathaniel Graham
ngraham accepted this revision. This revision is now accepted and ready to land. REPOSITORY R304 KNewStuff BRANCH fix-show-only-updates (branched from master) REVISION DETAIL https://phabricator.kde.org/D29447 To: leinir, #knewstuff, #plasma, bugseforuns, ngraham, #frameworks Cc: alex,

D29447: Fix showing updates when the option is selected

2020-05-05 Thread Dan Leinir Turthra Jensen
leinir updated this revision to Diff 82003. leinir added a comment. Address comment by @alex - Fix style (and consty things) REPOSITORY R304 KNewStuff CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D29447?vs=81993=82003 BRANCH fix-show-only-updates (branched from master)

D29447: Fix showing updates when the option is selected

2020-05-05 Thread Alexander Lohnau
alex added inline comments. INLINE COMMENTS > itemsmodel.cpp:71 > +bool duplicate{false}; > +for (const EntryInternal& existingEntry : m_entries) { > +if (existingEntry == entry) { Use qAsConst(m_entries) and space before & not after :-) REPOSITORY R304 KNewStuff REVISION

D29447: Fix showing updates when the option is selected

2020-05-05 Thread Dan Leinir Turthra Jensen
leinir added reviewers: KNewStuff, Plasma, bugseforuns, ngraham, Frameworks. leinir added projects: Plasma, KNewStuff. REPOSITORY R304 KNewStuff REVISION DETAIL https://phabricator.kde.org/D29447 To: leinir, #knewstuff, #plasma, bugseforuns, ngraham, #frameworks Cc: kde-frameworks-devel,

D29447: Fix showing updates when the option is selected

2020-05-05 Thread Dan Leinir Turthra Jensen
leinir created this revision. Herald added a project: Frameworks. Herald added a subscriber: kde-frameworks-devel. leinir requested review of this revision. REVISION SUMMARY This patch primarily fixes the issue that when picking the "Updateable Only" option on NewStuff.Page, we would be shown