diff options
author | CyberLeo <cyberleo@cyberleo.net> | 2021-07-22 21:02:46 -0500 |
---|---|---|
committer | CyberLeo <cyberleo@cyberleo.net> | 2021-07-22 21:02:46 -0500 |
commit | 59068642667b2748b2f24d18c58b1d2fdfed7619 (patch) | |
tree | deca4d721637676253ed1270f252f8d389286151 /user/calligra/plan.patch | |
parent | 4a177049e3d486da3f54d346d63ea80699c08b5b (diff) | |
parent | 50e523c03bbcb6be1298e3dedb0441b7e47ab2eb (diff) | |
download | packages-59068642667b2748b2f24d18c58b1d2fdfed7619.tar.gz packages-59068642667b2748b2f24d18c58b1d2fdfed7619.tar.bz2 packages-59068642667b2748b2f24d18c58b1d2fdfed7619.tar.xz packages-59068642667b2748b2f24d18c58b1d2fdfed7619.zip |
Merge branch 'master' into kpartx
Diffstat (limited to 'user/calligra/plan.patch')
-rw-r--r-- | user/calligra/plan.patch | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/user/calligra/plan.patch b/user/calligra/plan.patch deleted file mode 100644 index c8f8c91fb..000000000 --- a/user/calligra/plan.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 36ec68024620211edbcdb31a5ef6021545fe9451 Mon Sep 17 00:00:00 2001 -From: Dag Andersen <danders@get2net.dk> -Date: Fri, 9 Feb 2018 08:40:34 +0100 -Subject: Plan: Fix crash in tj scheduler if a resource does not have a - calendar - -This can happen when there is no default calendar and no calendar has been set for a resource. ---- - plan/src/plugins/schedulers/tj/PlanTJScheduler.cpp | 9 +++++++++ - 1 file changed, 9 insertions(+) - -diff --git a/plan/src/plugins/schedulers/tj/PlanTJScheduler.cpp b/plan/src/plugins/schedulers/tj/PlanTJScheduler.cpp -index 4f4e825..548969e 100644 ---- a/plan/src/plugins/schedulers/tj/PlanTJScheduler.cpp -+++ b/plan/src/plugins/schedulers/tj/PlanTJScheduler.cpp -@@ -259,6 +259,9 @@ bool PlanTJScheduler::kplatoToTJ() - addRequests(); - addStartEndJob(); - -+ if (result != -1) { -+ return false; -+ } - return check(); - } - -@@ -596,6 +599,7 @@ TJ::Resource *PlanTJScheduler::addResource( KPlato::Resource *r) - res->setEfficiency( (double)(r->units()) / 100. ); - } - Calendar *cal = r->calendar(); -+ Q_ASSERT(cal); - DateTime start = qMax( r->availableFrom(), m_project->constraintStartTime() ); - DateTime end = m_project->constraintEndTime(); - if ( r->availableUntil().isValid() && end > r->availableUntil() ) { -@@ -887,6 +891,11 @@ void PlanTJScheduler::addRequest( TJ::Task *job, Task *task ) - return; - } - foreach ( ResourceRequest *rr, task->requests().resourceRequests( true /*resolveTeam*/ ) ) { -+ if (!rr->resource()->calendar()) { -+ result = 1; // stops scheduling -+ logError(task, 0, i18n("No working hours defined for resource: %1",rr->resource()->name())); -+ continue; // may happen if no calendar is set, and no default calendar -+ } - TJ::Resource *tjr = addResource( rr->resource() ); - TJ::Allocation *a = new TJ::Allocation(); - a->setSelectionMode( TJ::Allocation::order ); --- -cgit v1.1 - |