From: Steve Brokenshire Date: Sun, 31 Jan 2016 12:04:21 +0000 (+0000) Subject: Added code to process PRIORITY in CalendarTaskObject. X-Git-Tag: release-0.02~558 X-Git-Url: http://Server1/repobrowser/?a=commitdiff_plain;h=510a67b3aa52c0f9a7e4c176e840f3a673d6d79a;p=xestiacalendar%2F.git Added code to process PRIORITY in CalendarTaskObject. --- diff --git a/source/objects/calendartask/CalendarTask.cpp b/source/objects/calendartask/CalendarTask.cpp index beb1780..4a0fa1d 100644 --- a/source/objects/calendartask/CalendarTask.cpp +++ b/source/objects/calendartask/CalendarTask.cpp @@ -503,4 +503,28 @@ void CalendarTaskObject::ProcessData(){ } + // Process the data from PRIORITY. + + DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, false, "PRIORITY"); + + if (DataReceived.begin() != DataReceived.end()){ + + try { + PriorityTokens = DataReceived.begin()->first.substr(9); + } + + catch(const out_of_range &oor){ + // Do nothing as there is no data. + } + + try { + PriorityData = stoi(DataReceived.begin()->second); + } + + catch(const invalid_argument &oor){ + PriorityTokens.clear(); + } + + } + } \ No newline at end of file