From 3f22254f20bf168d14bd431af1f6d8a18416357d Mon Sep 17 00:00:00 2001 From: Steve Brokenshire Date: Sun, 24 Jan 2016 10:36:12 +0000 Subject: [PATCH] Added code to process PRIORITY in CalendarEventObject. --- .../objects/calendarevent/CalendarEvent.cpp | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/source/objects/calendarevent/CalendarEvent.cpp b/source/objects/calendarevent/CalendarEvent.cpp index c6d7a0d..6e96575 100644 --- a/source/objects/calendarevent/CalendarEvent.cpp +++ b/source/objects/calendarevent/CalendarEvent.cpp @@ -502,5 +502,29 @@ void CalendarEventObject::ProcessData(){ OrganiserData = DataReceived.begin()->second; } + + // 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(); + } + + } } -- 2.39.5