D7167: Ignore default mark in icon border for single selectable mark
This revision was automatically updated to reflect the committed changes. Closed by commit R39:7fcdfd95dc69: Ignore default mark in icon border for single selectable mark (authored by croick). REPOSITORY R39 KTextEditor CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D7167?vs=19807=20419 REVISION DETAIL https://phabricator.kde.org/D7167 AFFECTED FILES src/view/kateviewhelpers.cpp To: croick, #ktexteditor, dhaumann Cc: dhaumann, kwrite-devel, #frameworks
D7167: Ignore default mark in icon border for single selectable mark
dhaumann accepted this revision. dhaumann added a comment. This revision is now accepted and ready to land. Yes, sorry, I thought I already accepted. Please commit. REPOSITORY R39 KTextEditor BRANCH defaultmarker REVISION DETAIL https://phabricator.kde.org/D7167 To: croick, #ktexteditor, dhaumann Cc: dhaumann, kwrite-devel, #frameworks
D7167: Ignore default mark in icon border for single selectable mark
croick added a comment. Should I commit? REPOSITORY R39 KTextEditor REVISION DETAIL https://phabricator.kde.org/D7167 To: croick, #ktexteditor, dhaumann Cc: dhaumann, kwrite-devel, #frameworks
D7167: Ignore default mark in icon border for single selectable mark
croick marked an inline comment as done. croick added a comment. In https://phabricator.kde.org/D7167#146752, @dhaumann wrote: > I think the patch makes sense, but I would prefer using a Qt function qPopulationCount to count the bits instead of doing own bitmask magic. Could you provide an updated patch? It's insignificantly slower now, but certainly easier to read. Thanks. REPOSITORY R39 KTextEditor REVISION DETAIL https://phabricator.kde.org/D7167 To: croick, #ktexteditor, dhaumann Cc: dhaumann, kwrite-devel, #frameworks
D7167: Ignore default mark in icon border for single selectable mark
croick updated this revision to Diff 19807. croick added a comment. - use qPopulationCount to count editable marks REPOSITORY R39 KTextEditor CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D7167?vs=17786=19807 BRANCH defaultmarker REVISION DETAIL https://phabricator.kde.org/D7167 AFFECTED FILES src/view/kateviewhelpers.cpp To: croick, #ktexteditor, dhaumann Cc: dhaumann, kwrite-devel, #frameworks
D7167: Ignore default mark in icon border for single selectable mark
dhaumann requested changes to this revision. dhaumann added a comment. This revision now requires changes to proceed. I think the patch makes sense, but I would prefer using a Qt function qPopulationCount to count the bits instead of doing own bitmask magic. Could you provide an updated patch? INLINE COMMENTS > kateviewhelpers.cpp:2145 > +const uint singleMark = // is the default or the only > editable mark > +(editBits & (editBits - 1)) ? // true if number of > editable marks > 1 > +editBits & config->defaultMarkType() : I would prefer using qPopulationCounte (see http://doc.qt.io/qt-5/qtalgorithms.html#qPopulationCount): // is the default or the only editable mark const uint singleMark = (qPopulationCount(editBits) > 1) ? editBits & config->defaultMarkType() : editBits; REPOSITORY R39 KTextEditor REVISION DETAIL https://phabricator.kde.org/D7167 To: croick, #ktexteditor, dhaumann Cc: dhaumann, kwrite-devel, #frameworks
D7167: Ignore default mark in icon border for single selectable mark
croick created this revision. Restricted Application added subscribers: Frameworks, kwrite-devel. Restricted Application added a project: Frameworks. REVISION SUMMARY - do not pop up menu if the only selectable mark (i.e. bookmark) is not the default mark for left click on icon border TEST PLAN - select "Breakpoint" as default mark in https://phabricator.kde.org/tag/kdevelop/ - left click on icon border in https://phabricator.kde.org/tag/kate/ and insert bookmark directly REPOSITORY R39 KTextEditor BRANCH defaultmarker REVISION DETAIL https://phabricator.kde.org/D7167 AFFECTED FILES src/view/kateviewhelpers.cpp To: croick, #ktexteditor Cc: kwrite-devel, #frameworks