Add filtering for ProblemsView
ClosedPublic

Authored by antonanikin on Oct 19 2016, 6:31 AM.

Details

Summary

The patch adds filtering UI for ProblemsView which is useful when we have a lot of problems - for example select Parser problem model and activate "Current Project" scope for big project (like kdevplatform).

BUG: 339839

Test Plan

Tested on master branch.

UI before filtering:

UI after filtering:

UI before filtering (smaller edit size):

UI after filtering (smaller edit size):

Diff Detail

Repository
R33 KDevPlatform
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
antonanikin updated this revision to Diff 7531.Oct 19 2016, 6:31 AM
antonanikin retitled this revision from to Add filtering for ProblemsView.
antonanikin updated this object.
antonanikin edited the test plan for this revision. (Show Details)
antonanikin added a reviewer: KDevelop.
antonanikin set the repository for this revision to R33 KDevPlatform.
Restricted Application added a subscriber: kdevelop-devel. · View Herald TranscriptOct 19 2016, 6:31 AM
kfunk added a subscriber: kfunk.Oct 19 2016, 7:22 AM

Hmm, I feel like this is cluttering this part of the UI even more without bringing a lot of gain. Personally I've never felt the urge to search in the problems view.

Maybe at least don't let the search box expand and give it a reasonable max size?

Other opinions?

kfunk added a comment.Oct 19 2016, 7:23 AM

Thanks for the screenshots, btw, that always helps a lot!

Hmm, I feel like this is cluttering this part of the UI even more without bringing a lot of gain. Personally I've never felt the urge to search in the problems view.

I think it can be useful sometimes. For example we can search for some warning like "unused variable" in big projects through Parser problems model instead of rebuilding whole code.

Maybe at least don't let the search box expand and give it a reasonable max size?

Ok, I will fix it to smaller size.

antonanikin updated this revision to Diff 7533.Oct 19 2016, 8:05 AM
antonanikin edited the test plan for this revision. (Show Details)

Smaller size for Filter Edit

I'd like to +1 for this change. We have a Feature request for it for some time now: https://bugs.kde.org/show_bug.cgi?id=339839

kfunk requested changes to this revision.Oct 20 2016, 3:15 PM
kfunk added a reviewer: kfunk.

Bug: Filter isn't cleared when changing tabs inside the problems tool view. Please fix.

plugins/problemreporter/problemtreeview.cpp
158

Prefer QRegularExpression

This revision now requires changes to proceed.Oct 20 2016, 3:15 PM
antonanikin updated this revision to Diff 7576.Oct 20 2016, 4:30 PM
antonanikin edited edge metadata.
antonanikin marked an inline comment as done.Oct 20 2016, 4:34 PM

Bug: Filter isn't cleared when changing tabs inside the problems tool view. Please fix.

@kfunk, fixed - now we drop the filter if tab is changed. It's trivial also to store personal search string for each tab if it seems to be interesting (reasonable).

plugins/problemreporter/problemtreeview.cpp
158

Simplified

kfunk added a comment.Oct 20 2016, 4:45 PM

Another issue:

Prereq:

  • Notice parser tab has 7 entries, shows "Parser (7)"
  • Enter a filter
  • Notice that parser tab has 2 entries, shows "Parser (2)"
  • Switch to a different tab

Actual:

  • Parser tab text stays at "Parser (2)"

Expected:

  • Parser tab text resets to "Parser (7)"
kfunk requested changes to this revision.Oct 20 2016, 4:45 PM
kfunk edited edge metadata.
This revision now requires changes to proceed.Oct 20 2016, 4:45 PM
antonanikin marked an inline comment as done.Oct 20 2016, 4:58 PM

Actual:

  • Parser tab text stays at "Parser (2)" Expected:
  • Parser tab text resets to "Parser (7)"

Yes, it's true. The reason - we drop filter for new (opened) tab, but not for previous. If we switch back - it will show (7). Ok, in next revision I'll fix it.

antonanikin updated this revision to Diff 7577.Oct 20 2016, 5:42 PM
antonanikin edited edge metadata.
kfunk accepted this revision.Oct 20 2016, 7:13 PM
kfunk edited edge metadata.

Rest LGTM, thanks!

To master branch.

plugins/problemreporter/problemsview.cpp
211

Use the 4-arg version of connect, use this as receiver.

Makes sure the connection gets destroyed if the receiver is destructed.

223

Dito

This revision is now accepted and ready to land.Oct 20 2016, 7:13 PM
antonanikin edited edge metadata.
antonanikin marked 2 inline comments as done.
antonanikin added inline comments.
plugins/problemreporter/problemsview.cpp
211

Thanks, I don't know about using lambdas together with this receiver.

This revision was automatically updated to reflect the committed changes.
antonanikin marked an inline comment as done.