Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Added URL property for saving data from a CalendarTaskObject.
authorSteve Brokenshire <sbrokenshire@xestia.co.uk>
Mon, 6 Jun 2016 21:48:15 +0000 (22:48 +0100)
committerSteve Brokenshire <sbrokenshire@xestia.co.uk>
Mon, 6 Jun 2016 21:48:15 +0000 (22:48 +0100)
Added the code and unit tests for the URL property.

source/objects/calendartask/CalendarTask-Save.cpp
source/tests/xestiacalendar_icaltasksave.h

index 935ead5..5563801 100644 (file)
@@ -585,6 +585,32 @@ void CalendarTaskObject::SaveObjectData(string *SaveData){
                
        }
        
+       // Process the URL value.
+       
+       if (URLData.size() > 0){
+               
+               DataLine += "URL";
+
+               if (URLDataTokens.size() > 0){
+               
+                       DataLine += ";";
+                       DataLine += URLDataTokens;
+                       
+               }
+               
+               DataLine += ":";
+               DataLine += URLData;
+               DataLine += "\n";
+               
+               DataLineProcessed = OutputText(&DataLine);
+               
+               *SaveData += DataLineProcessed;
+
+               DataLine.clear();
+               DataLineProcessed.clear();
+               
+       }
+       
        *SaveData += "END:VTODO\n";
        
 }
\ No newline at end of file
index f73e027..d267c46 100644 (file)
@@ -79,6 +79,7 @@ TEST(iCalendarSaveTask, SaveTaskTests){
        "STATUS;LANGUAGE=kw;FAVOURITE=BEANS;NOTLIKE=UNKNOWN:2.0;Success\n"
        "SUMMARY;ALTREP=\"null:nodata\";LANGUAGE=kw;FAVOURITE=TOFU;NOTLIKE=NONE:A summar\n"
        " y of the todo.\n"
+       "URL;EXTERNAL=YES:http://www.example.com/\n"
        "END:VTODO\n"
        "END:VCALENDAR";
        
Xestia Software Development
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software

Xestia Address Book
Xestia Calendar
Development

Xestia Gelforn
Everything else

About
News
Privacy Policy