summaryrefslogtreecommitdiffstats
path: root/kalarm/calendarcompat.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
commit7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch)
tree8474f9b444b2756228600050f07a7ff25de532b2 /kalarm/calendarcompat.cpp
parentf587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff)
downloadtdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.tar.gz
tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kalarm/calendarcompat.cpp')
-rw-r--r--kalarm/calendarcompat.cpp42
1 files changed, 21 insertions, 21 deletions
diff --git a/kalarm/calendarcompat.cpp b/kalarm/calendarcompat.cpp
index ada75e768..50d76c508 100644
--- a/kalarm/calendarcompat.cpp
+++ b/kalarm/calendarcompat.cpp
@@ -20,9 +20,9 @@
#include "kalarm.h"
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qstringlist.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqstringlist.h>
#include <kapplication.h>
#include <kaboutdata.h>
@@ -43,10 +43,10 @@ using namespace KCal;
* necessary conversions to the current format. The calendar is not saved - any
* conversions will only be saved if changes are made later.
*/
-void CalendarCompat::fix(KCal::Calendar& calendar, const QString& localFile)
+void CalendarCompat::fix(KCal::Calendar& calendar, const TQString& localFile)
{
bool version057_UTC = false;
- QString subVersion;
+ TQString subVersion;
int version = readKAlarmVersion(calendar, subVersion);
if (!version)
{
@@ -74,26 +74,26 @@ void CalendarCompat::fix(KCal::Calendar& calendar, const QString& localFile)
* Reply = 0 if the calendar was created by the current version of KAlarm,
* KAlarm pre-0.3.5, or another program.
*/
-int CalendarCompat::readKAlarmVersion(KCal::Calendar& calendar, QString& subVersion)
+int CalendarCompat::readKAlarmVersion(KCal::Calendar& calendar, TQString& subVersion)
{
- subVersion = QString::null;
- const QString& prodid = calendar.productId();
+ subVersion = TQString::null;
+ const TQString& prodid = calendar.productId();
// Find the KAlarm identifier
- QString progname = QString::fromLatin1(" KAlarm ");
+ TQString progname = TQString::fromLatin1(" KAlarm ");
int i = prodid.find(progname, 0, false);
if (i < 0)
{
// Older versions used KAlarm's translated name in the product ID, which
// could have created problems using a calendar in different locales.
- progname = QString(" ") + kapp->aboutData()->programName() + ' ';
+ progname = TQString(" ") + kapp->aboutData()->programName() + ' ';
i = prodid.find(progname, 0, false);
if (i < 0)
return 0; // calendar wasn't created by KAlarm
}
// Extract the KAlarm version string
- QString ver = prodid.mid(i + progname.length()).stripWhiteSpace();
+ TQString ver = prodid.mid(i + progname.length()).stripWhiteSpace();
i = ver.find('/');
int j = ver.find(' ');
if (j >= 0 && j < i)
@@ -112,23 +112,23 @@ int CalendarCompat::readKAlarmVersion(KCal::Calendar& calendar, QString& subVers
* Reply = true if times are stored in UTC
* = false if the calendar is a vCalendar, times are not UTC, or any error occurred.
*/
-bool CalendarCompat::isUTC(const QString& localFile)
+bool CalendarCompat::isUTC(const TQString& localFile)
{
// Read the calendar file into a QString
- QFile file(localFile);
+ TQFile file(localFile);
if (!file.open(IO_ReadOnly))
return false;
- QTextStream ts(&file);
- ts.setEncoding(QTextStream::Latin1);
- QString text = ts.read();
+ TQTextStream ts(&file);
+ ts.setEncoding(TQTextStream::Latin1);
+ TQString text = ts.read();
file.close();
// Extract the CREATED property for the first VEVENT from the calendar
- QString VCALENDAR = QString::fromLatin1("BEGIN:VCALENDAR");
- QString VEVENT = QString::fromLatin1("BEGIN:VEVENT");
- QString CREATED = QString::fromLatin1("CREATED:");
- QStringList lines = QStringList::split(QChar('\n'), text);
- for (QStringList::ConstIterator it = lines.begin(); it != lines.end(); ++it)
+ TQString VCALENDAR = TQString::fromLatin1("BEGIN:VCALENDAR");
+ TQString VEVENT = TQString::fromLatin1("BEGIN:VEVENT");
+ TQString CREATED = TQString::fromLatin1("CREATED:");
+ TQStringList lines = TQStringList::split(TQChar('\n'), text);
+ for (TQStringList::ConstIterator it = lines.begin(); it != lines.end(); ++it)
{
if ((*it).startsWith(VCALENDAR))
{