Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Wolfgang Reissenberger
KStars
Commits
c4ba3374
Commit
c4ba3374
authored
May 12, 2022
by
Jasem Mutlaq
Browse files
Use const qualifier for jobs. Fixes #183
parent
98ef723d
Pipeline
#175784
passed with stage
in 6 minutes and 1 second
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
kstars/ekos/scheduler/greedyscheduler.cpp
View file @
c4ba3374
...
...
@@ -34,7 +34,7 @@ void GreedyScheduler::setParams(bool restartImmediately, bool restartQueue,
setErrorDelaySeconds
(
errorHandlingDelay
);
}
QList
<
SchedulerJob
*>
GreedyScheduler
::
scheduleJobs
(
QList
<
SchedulerJob
*>
&
jobs
,
QList
<
SchedulerJob
*>
GreedyScheduler
::
scheduleJobs
(
const
QList
<
SchedulerJob
*>
&
jobs
,
const
QDateTime
&
now
,
const
QMap
<
QString
,
uint16_t
>
&
capturedFramesCount
,
Scheduler
*
scheduler
)
...
...
@@ -88,7 +88,7 @@ QList<SchedulerJob *> GreedyScheduler::scheduleJobs(QList<SchedulerJob *> &jobs,
return
sortedJobs
;
}
bool
GreedyScheduler
::
checkJob
(
QList
<
SchedulerJob
*>
&
jobs
,
bool
GreedyScheduler
::
checkJob
(
const
QList
<
SchedulerJob
*>
&
jobs
,
const
QDateTime
&
now
,
SchedulerJob
*
currentJob
)
{
...
...
@@ -109,7 +109,7 @@ bool GreedyScheduler::checkJob(QList<SchedulerJob *> &jobs,
}
QList
<
SchedulerJob
*>
GreedyScheduler
::
prepareJobsForEvaluation
(
QList
<
SchedulerJob
*>
&
jobs
,
const
QDateTime
&
now
,
const
QList
<
SchedulerJob
*>
&
jobs
,
const
QDateTime
&
now
,
const
QMap
<
QString
,
uint16_t
>
&
capturedFramesCount
,
Scheduler
*
scheduler
,
bool
reestimateJobTimes
)
{
QList
<
SchedulerJob
*>
sortedJobs
=
jobs
;
...
...
kstars/ekos/scheduler/greedyscheduler.h
View file @
c4ba3374
...
...
@@ -57,7 +57,7 @@ class GreedyScheduler : public QObject
* @param scheduler A pointer to the scheduler object, useful for notifying the user. Can be nullptr.
* @return returns a possibly sorted list of the same jobs input, but with state and start/end time changes.
*/
QList
<
SchedulerJob
*>
scheduleJobs
(
QList
<
SchedulerJob
*>
&
jobs
,
QList
<
SchedulerJob
*>
scheduleJobs
(
const
QList
<
SchedulerJob
*>
&
jobs
,
const
QDateTime
&
now
,
const
QMap
<
QString
,
uint16_t
>
&
capturedFramesCount
,
Scheduler
*
scheduler
);
...
...
@@ -68,7 +68,7 @@ class GreedyScheduler : public QObject
* @param currentJob The currently running job, which may be continued or aborted.
* @return returns true if the job should continue to run.
*/
bool
checkJob
(
QList
<
SchedulerJob
*>
&
jobs
,
bool
checkJob
(
const
QList
<
SchedulerJob
*>
&
jobs
,
const
QDateTime
&
now
,
SchedulerJob
*
currentJob
);
/**
...
...
@@ -133,7 +133,7 @@ class GreedyScheduler : public QObject
// Changes the states of the jons on the list, deciding which ones
// can be scheduled by scheduleJobs().
QList
<
SchedulerJob
*>
prepareJobsForEvaluation
(
QList
<
SchedulerJob
*>
&
jobs
,
const
QDateTime
&
now
,
const
QList
<
SchedulerJob
*>
&
jobs
,
const
QDateTime
&
now
,
const
QMap
<
QString
,
uint16_t
>
&
capturedFramesCount
,
Scheduler
*
scheduler
,
bool
reestimateJobTime
=
true
);
// Removes the EVALUATION state, after eval is done.
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment