QT-style Score/Altitude/Priority comparisons
ClosedPublic

Authored by TallFurryMan on Apr 17 2018, 7:24 PM.

Details

Summary

This change moves the score/altitude/priority comparisons to SchedulerJob,
keeping the lessThan QT-style sort predicate implementation, but clarifying the
intended order.

Accompanying documentation in SchedulerJob.h is perhaps a bit larger for these
functions than for the rest of SchedulerJob, but more documentation should come
anyway.

FIXME to remind to refactor scheduler job sorting in one separate function.
FIXME to indicate there is probably a wrong sort on score.
FIXME to use std::sort because qSort is deprecated, but that's minor.

Test Plan

There is no change in functionality involved by this change.

Diff Detail

Repository
R321 KStars
Lint
No Linters Available
Unit
No Unit Test Coverage
TallFurryMan created this revision.Apr 17 2018, 7:24 PM
Restricted Application added a project: KDE Edu. · View Herald TranscriptApr 17 2018, 7:24 PM
Restricted Application added a subscriber: KDE Edu. · View Herald Transcript
TallFurryMan requested review of this revision.Apr 17 2018, 7:24 PM

Fixed altitude/priority predicate in job evaluation, and removed incorrect FIXME. VCS mistake.

Removed leftover FIXME.

Wouldn't it be a trivial change to use std::sort ?

The porting documentation is here: http://doc.qt.io/qt-5/qtalgorithms.html#porting-guidelines
I'll keep this for a later commit.

mutlaqja accepted this revision.Apr 18 2018, 10:11 AM
This revision is now accepted and ready to land.Apr 18 2018, 10:11 AM
This revision was automatically updated to reflect the committed changes.