Fix Problem Highlighter - use problems from all Problem Models
ClosedPublic

Authored by antonanikin on Oct 26 2016, 10:03 AM.

Details

Summary

This patch fixes problems highlighting. At now only problems from Parser are highlighted in the editor, which is wrong behavior. New version uses information about problems from all available models.

Test Plan

Tested on master branch

All problems from Parser and Valgrind are highlighted:


Diff Detail

Repository
R33 KDevPlatform
Lint
Lint Skipped
Unit
Unit Tests Skipped
antonanikin retitled this revision from to Fix Problem Highlighter - use problems from all Problem Models.
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 26 2016, 10:03 AM
antonanikin planned changes to this revision.Oct 26 2016, 10:32 AM
kfunk added a subscriber: kfunk.Oct 26 2016, 10:39 AM

Rest looks good to me. I do wonder if we ever run into performance problems with this, though...

plugins/problemreporter/problemreporterplugin.h
70 ↗(On Diff #7668)

Rename to updateCurrentDocumentHighlight maybe?

Optimized version - now re-highlighting is run only when stored problems are changed. Old version do this too often - at every document switch for example. This leads to bad performance for big Problem Models.

antonanikin marked an inline comment as done.Oct 26 2016, 12:49 PM
kfunk added inline comments.Oct 26 2016, 2:00 PM
shell/problemstore.cpp
48

Maybe indeed call it m_allProblems, or even m_accumulatedProblems

80

Use QSignalBlocker

129

Move this line into the if-block?

shell/problemstore.h
129

Typo, better: "when any store setting ..."?

antonanikin marked 4 inline comments as done.Oct 26 2016, 3:04 PM
antonanikin added inline comments.
shell/problemstore.cpp
80

Ok, thanks for useful wrapper :)

antonanikin updated this revision to Diff 7678.Oct 26 2016, 3:16 PM
antonanikin marked an inline comment as done.

fix inline comments

kfunk requested changes to this revision.Oct 27 2016, 7:27 AM
kfunk added a reviewer: kfunk.
kfunk added inline comments.
plugins/problemreporter/problemreporterplugin.cpp
219 ↗(On Diff #7668)

Hm, why do update the problems for all open documents now? This could get slow with lots of documents open at a time, no?

This revision now requires changes to proceed.Oct 27 2016, 7:27 AM
antonanikin added inline comments.Oct 27 2016, 10:34 AM
plugins/problemreporter/problemreporterplugin.cpp
219 ↗(On Diff #7668)

This is necessary due re-highlighting is not performed automatically for opened documents. If we switch to other opened document it will have "old highlights" which is wrong. Currently re-highlighting runs only for new opened documents. My previous version do it (with using other signals connected) for such case but it's wrong to run re-highlighting every time for non-changed problems.

We can add some mechanism to save re-highlighting "queries" to some structure (like vector) and run needed on document switch. I can do it in next revision if necessary.

antonanikin edited edge metadata.

Re-highlight only current document after problems are changed. Other opened documents will be re-highlighted after activation.

kfunk accepted this revision.Oct 27 2016, 2:14 PM
kfunk edited edge metadata.

LGTM, thanks. Gotta check how it looks in practice.

This revision is now accepted and ready to land.Oct 27 2016, 2:14 PM
This revision was automatically updated to reflect the committed changes.