summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/WhatsNew.txt3
-rw-r--r--libkcal/vcalformat.cpp50
2 files changed, 10 insertions, 43 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt
index 55b120f..81efb6c 100644
--- a/bin/kdepim/WhatsNew.txt
+++ b/bin/kdepim/WhatsNew.txt
@@ -8,2 +8,5 @@ Daylabel in agenda view ( for display of one day ) was too short. Fixed.
Conflict display dialog for syncing was not on top of other windows. Fixed.
+Fixed some minor problems.
+
+Fixed an endless loop when importing vcs file with RESOURCES entry.
diff --git a/libkcal/vcalformat.cpp b/libkcal/vcalformat.cpp
index 223aa5a..62a31ae 100644
--- a/libkcal/vcalformat.cpp
+++ b/libkcal/vcalformat.cpp
@@ -233,3 +233,3 @@ VObject *VCalFormat::eventToVTodo(const Todo *anEvent)
QString tmpStr;
- QStringList tmpStrList;
+
@@ -334,3 +334,3 @@ VObject *VCalFormat::eventToVTodo(const Todo *anEvent)
// categories
- tmpStrList = anEvent->categories();
+ QStringList tmpStrList = anEvent->categories();
tmpStr = "";
@@ -398,4 +398,3 @@ VObject* VCalFormat::eventToVEvent(const Event *anEvent)
QString tmpStr;
- QStringList tmpStrList;
-
+
vevent = newVObject(VCEventProp);
@@ -605,3 +604,3 @@ VObject* VCalFormat::eventToVEvent(const Event *anEvent)
// categories
- tmpStrList = anEvent->categories();
+ QStringList tmpStrList = anEvent->categories();
tmpStr = "";
@@ -871,5 +870,2 @@ Todo *VCalFormat::VTodoToEvent(VObject *vtodo)
// categories
- QStringList tmpStrList;
- int index1 = 0;
- int index2 = 0;
if ((vo = isAPropertyOf(vtodo, VCCategoriesProp)) != 0) {
@@ -878,13 +874,3 @@ Todo *VCalFormat::VTodoToEvent(VObject *vtodo)
deleteStr(s);
- //const char* category;
- QString category;
- while ((index2 = categories.find(',', index1)) != -1) {
- //category = (const char *) categories.mid(index1, (index2 - index1));
- category = categories.mid(index1, (index2 - index1));
- tmpStrList.append(category);
- index1 = index2+1;
- }
- // get last category
- category = categories.mid(index1, (categories.length()-index1));
- tmpStrList.append(category);
+ QStringList tmpStrList = QStringList::split( ';', categories );
anEvent->setCategories(tmpStrList);
@@ -1330,4 +1316,2 @@ Event* VCalFormat::VEventToEvent(VObject *vevent)
QStringList tmpStrList;
- int index1 = 0;
- int index2 = 0;
if ((vo = isAPropertyOf(vevent, VCCategoriesProp)) != 0) {
@@ -1336,13 +1320,3 @@ Event* VCalFormat::VEventToEvent(VObject *vevent)
deleteStr(s);
- //const char* category;
- QString category;
- while ((index2 = categories.find(',', index1)) != -1) {
- //category = (const char *) categories.mid(index1, (index2 - index1));
- category = categories.mid(index1, (index2 - index1));
- tmpStrList.append(category);
- index1 = index2+1;
- }
- // get last category
- category = categories.mid(index1, (categories.length()-index1));
- tmpStrList.append(category);
+ tmpStrList = QStringList::split( ';', categories );
anEvent->setCategories(tmpStrList);
@@ -1351,3 +1325,2 @@ Event* VCalFormat::VEventToEvent(VObject *vevent)
// attachments
- tmpStrList.clear();
initPropIterator(&voi, vevent);
@@ -1366,14 +1339,5 @@ Event* VCalFormat::VEventToEvent(VObject *vevent)
deleteStr(s);
- tmpStrList.clear();
- index1 = 0;
- index2 = 0;
- QString resource;
- while ((index2 = resources.find(';', index1)) != -1) {
- resource = resources.mid(index1, (index2 - index1));
- tmpStrList.append(resource);
- index1 = index2;
- }
+ tmpStrList = QStringList::split( ';', resources );
anEvent->setResources(tmpStrList);
}
-
/* alarm stuff */