diff options
Diffstat (limited to 'kresources/caldav/resource.cpp')
-rw-r--r-- | kresources/caldav/resource.cpp | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/kresources/caldav/resource.cpp b/kresources/caldav/resource.cpp index d828037bf..db4546d82 100644 --- a/kresources/caldav/resource.cpp +++ b/kresources/caldav/resource.cpp @@ -403,8 +403,8 @@ void ResourceCalDav::loadFinished() { // TODO: I don't know why, but some schedules on http://caldav-test.ioda.net/ (I used it for testing) // have some lines separated by single \r rather than \n or \r\n. // ICalFormat fails to parse that. - data.tqreplace("\r\n", "\n"); // to avoid \r\n becomes \n\n after the next line - data.tqreplace('\r', '\n'); + data.replace("\r\n", "\n"); // to avoid \r\n becomes \n\n after the next line + data.replace('\r', '\n'); log("trying to parse..."); if (parseData(data)) { @@ -451,8 +451,8 @@ void ResourceCalDav::loadFinished() { // TODO: I don't know why, but some schedules on http://caldav-test.ioda.net/ (I used it for testing) // have some lines separated by single \r rather than \n or \r\n. // ICalFormat fails to parse that. - tasksData.tqreplace("\r\n", "\n"); // to avoid \r\n becomes \n\n after the next line - tasksData.tqreplace('\r', '\n'); + tasksData.replace("\r\n", "\n"); // to avoid \r\n becomes \n\n after the next line + tasksData.replace('\r', '\n'); log("trying to parse..."); if (parseTasksData(tasksData)) { @@ -499,8 +499,8 @@ void ResourceCalDav::loadFinished() { // TODO: I don't know why, but some schedules on http://caldav-test.ioda.net/ (I used it for testing) // have some lines separated by single \r rather than \n or \r\n. // ICalFormat fails to parse that. - journalsData.tqreplace("\r\n", "\n"); // to avoid \r\n becomes \n\n after the next line - journalsData.tqreplace('\r', '\n'); + journalsData.replace("\r\n", "\n"); // to avoid \r\n becomes \n\n after the next line + journalsData.replace('\r', '\n'); log("trying to parse..."); if (parseJournalsData(journalsData)) { @@ -726,7 +726,7 @@ TQString ResourceCalDav::getICalString(const Incidence::List& inc) { // Get the iCal header and footer header = ical.toString(&loc); - int location = header.tqfind("END:VCALENDAR", 0, true); + int location = header.find("END:VCALENDAR", 0, true); footer = header.mid(location, 0xffffffff); header.remove("END:VCALENDAR"); @@ -740,13 +740,13 @@ TQString ResourceCalDav::getICalString(const Incidence::List& inc) { data = data + footer; // Remove any line feeds/carriage returns/white spaces from the UID field as they WILL break libcaldav - int uidPos = data.tqfind("UID:", 0) + 4; - int nextPos = data.tqfindRev("\n", data.tqfind(":", uidPos)); + int uidPos = data.find("UID:", 0) + 4; + int nextPos = data.findRev("\n", data.find(":", uidPos)); TQString uidField = data.mid(uidPos, nextPos-uidPos); data.remove(uidPos, nextPos-uidPos); - uidField.tqreplace("\n", ""); - uidField.tqreplace("\r", ""); - uidField.tqreplace(" ", ""); + uidField.replace("\n", ""); + uidField.replace("\r", ""); + uidField.replace(" ", ""); data.insert(uidPos, uidField); return data; } @@ -888,11 +888,11 @@ bool ResourceCalDav::startWriting(const TQString& url, const TQString& tasksUrl, t->journalsAdded = ""; t->journalsChanged = ""; t->journalsDeleted = ""; - if (getICalString(currentIncidence).tqcontains("BEGIN:VEVENT") > 0) + if (getICalString(currentIncidence).contains("BEGIN:VEVENT") > 0) t->added = getICalString(currentIncidence); - else if (getICalString(currentIncidence).tqcontains("BEGIN:VTODO") > 0) + else if (getICalString(currentIncidence).contains("BEGIN:VTODO") > 0) t->tasksAdded = getICalString(currentIncidence); - else if (getICalString(currentIncidence).tqcontains("BEGIN:VJOURNAL") > 0) + else if (getICalString(currentIncidence).contains("BEGIN:VJOURNAL") > 0) t->journalsAdded = getICalString(currentIncidence); writingQueuePush(t); @@ -916,11 +916,11 @@ bool ResourceCalDav::startWriting(const TQString& url, const TQString& tasksUrl, t->journalsChanged = ""; t->journalsDeleted = ""; - if (getICalString(currentIncidence).tqcontains("BEGIN:VEVENT") > 0) + if (getICalString(currentIncidence).contains("BEGIN:VEVENT") > 0) t->changed = getICalString(currentIncidence); - else if (getICalString(currentIncidence).tqcontains("BEGIN:VTODO") > 0) + else if (getICalString(currentIncidence).contains("BEGIN:VTODO") > 0) t->tasksChanged = getICalString(currentIncidence); - else if (getICalString(currentIncidence).tqcontains("BEGIN:VJOURNAL") > 0) + else if (getICalString(currentIncidence).contains("BEGIN:VJOURNAL") > 0) t->journalsChanged = getICalString(currentIncidence); writingQueuePush(t); @@ -944,11 +944,11 @@ bool ResourceCalDav::startWriting(const TQString& url, const TQString& tasksUrl, t->journalsChanged = ""; t->journalsDeleted = ""; - if (getICalString(currentIncidence).tqcontains("BEGIN:VEVENT") > 0) + if (getICalString(currentIncidence).contains("BEGIN:VEVENT") > 0) t->deleted = getICalString(currentIncidence); - else if (getICalString(currentIncidence).tqcontains("BEGIN:VTODO") > 0) + else if (getICalString(currentIncidence).contains("BEGIN:VTODO") > 0) t->tasksDeleted = getICalString(currentIncidence); - else if (getICalString(currentIncidence).tqcontains("BEGIN:VJOURNALS") > 0) + else if (getICalString(currentIncidence).contains("BEGIN:VJOURNALS") > 0) t->journalsDeleted = getICalString(currentIncidence); writingQueuePush(t); |