OSDN Git Service

Removing redundant error checking related to booking declaration.
authorGrégoire Barbier <g@g76r.eu>
Wed, 29 Jul 2009 21:05:00 +0000 (23:05 +0200)
committerChris Schlaeger <cs@kde.org>
Thu, 20 Aug 2009 19:22:33 +0000 (21:22 +0200)
Both checks are redundant with those made in Task::preScheduleOk().
Moreover the check concerning milestones is less precise than the
one in Task::preScheduleOk() because the later detects implicit
milestones (tasks with no effort, no duration and no length)
whereas the removed check only handles tasks declared as milestones
by the "milestone" property (because it is done earlier in the
pre-scheduling process).

taskjuggler/ProjectFile.cpp

index 9af4623..9882427 100644 (file)
@@ -2513,21 +2513,6 @@ ProjectFile::readBooking(int sc, Resource* resource)
         }
     }
 
-
-    if (task->hasSubs())
-    {
-        errorMessage(i18n("'%1' is a container task. It must not have "
-                          "bookings assigned to it.").arg(task->getId()));
-        return 0;
-    }
-    if (task->isMilestone())
-    {
-        errorMessage(i18n("'%1' is a milestone task. It must not have "
-                          "bookings assigned to it.").arg(task->getId()));
-        return 0;
-    }
-
-
     int sloppy = 0;
     int overtime = 0;
     if ((tt = nextToken(token)) == LBRACE)