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.
Details
Tested on master branch
All problems from Parser and Valgrind are highlighted:
Diff Detail
- Repository
- R33 KDevPlatform
- Branch
- problem_highlighter
- Lint
No Linters Available - Unit
No Unit Test Coverage
Rest looks good to me. I do wonder if we ever run into performance problems with this, though...
plugins/problemreporter/problemreporterplugin.h | ||
---|---|---|
70 | 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.
shell/problemstore.cpp | ||
---|---|---|
80 ↗ | (On Diff #7671) | Ok, thanks for useful wrapper :) |
plugins/problemreporter/problemreporterplugin.cpp | ||
---|---|---|
219 | Hm, why do update the problems for all open documents now? This could get slow with lots of documents open at a time, no? |
plugins/problemreporter/problemreporterplugin.cpp | ||
---|---|---|
219 | 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. |
Re-highlight only current document after problems are changed. Other opened documents will be re-highlighted after activation.