Fix ProblemsView tabs order
ClosedPublic

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

Details

Summary

The patch fixes (random) order of tabs in ProblemsView with follows settings:

  1. First tab always used by "Parser" model due it's the most important problem listing, it should be at the front (K.Funk idea at KDevelop IRC channel).
  1. Other tabs are alphabetically ordered.
Test Plan

Tested on master branch. Manually plugin loading/unloading don't break the order.

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 7585.Oct 21 2016, 6:19 AM
antonanikin retitled this revision from to Fix ProblemsView tabs order.
antonanikin updated this object.
antonanikin edited the test plan for this revision. (Show Details)
antonanikin added reviewers: kfunk, KDevelop.
antonanikin set the repository for this revision to R33 KDevPlatform.
Restricted Application added a subscriber: kdevelop-devel. · View Herald TranscriptOct 21 2016, 6:19 AM
kfunk accepted this revision.Oct 21 2016, 9:17 AM
kfunk edited edge metadata.

Rest LGTM.

Please target 5.0 with this patch.

plugins/problemreporter/problemsview.cpp
438

Hmm, I've just noticed an issue with the implementation of the whole problem model thingie.

KDevelop::ProblemModelSet* pms = core()->languageController()->problemModelSet();
pms->addModel(QStringLiteral("Parser"), m_model);

^ Here, "Parser" should be translated.

In ProblemModelSet::addModel(const QString &name, ProblemModel *model) name acts both as an identifier + a human-readable string. This is wrong. We'd need to split this up and pass it both an id + the translated string.

Fine for now, though, we can't change that in 5.0.

448

Please add a comment why we're skipping the "Parser" tab.

451
This revision is now accepted and ready to land.Oct 21 2016, 9:17 AM
antonanikin marked 2 inline comments as done.
antonanikin edited edge metadata.
kfunk added a comment.EditedOct 21 2016, 10:55 AM

LGTM, please push to 5.0 branch though. Needs a rebase apparently since it doesn't apply there.

This revision was automatically updated to reflect the committed changes.