From 67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 13 Apr 2011 00:46:47 +0000 Subject: Initial conversion of kdepim to TQt This will probably require some tweaking before it will build under Qt4, however Qt3 builds are OK. Any alterations this commit makes to kdepim behaviour under Qt3 are unintentional and should be fixed. git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1227832 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- libkcal/qtopiaformat.cpp | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'libkcal/qtopiaformat.cpp') diff --git a/libkcal/qtopiaformat.cpp b/libkcal/qtopiaformat.cpp index 372c5230..964e48c5 100644 --- a/libkcal/qtopiaformat.cpp +++ b/libkcal/qtopiaformat.cpp @@ -38,17 +38,17 @@ using namespace KCal; -class QtopiaParser : public QXmlDefaultHandler +class TQtopiaParser : public TQXmlDefaultHandler { public: - QtopiaParser( Calendar *calendar ) : mCalendar( calendar ) {} + TQtopiaParser( Calendar *calendar ) : mCalendar( calendar ) {} bool startElement( const TQString &, const TQString &, const TQString & qName, const TQXmlAttributes &attributes ) { if ( qName == "event" ) { Event *event = new Event; - TQString uid = "Qtopia" + attributes.value( "uid" ); + TQString uid = "TQtopia" + attributes.value( "uid" ); event->setUid( uid ); event->setSummary( attributes.value( "description" ) ); @@ -136,11 +136,11 @@ class QtopiaParser : public QXmlDefaultHandler } else if ( qName == "Task" ) { Todo *todo = new Todo; - TQString uid = "Qtopia" + attributes.value( "Uid" ); + TQString uid = "TQtopia" + attributes.value( "Uid" ); todo->setUid( uid ); TQString description = attributes.value( "Description" ); - int pos = description.find( '\n' ); + int pos = description.tqfind( '\n' ); if ( pos > 0 ) { TQString summary = description.left( pos ); todo->setSummary( summary ); @@ -205,7 +205,7 @@ class QtopiaParser : public QXmlDefaultHandler TQString errorString () { - return "QtopiaParser: Error!"; + return "TQtopiaParser: Error!"; } protected: @@ -242,7 +242,7 @@ class QtopiaParser : public QXmlDefaultHandler static TQString category( const TQString &id ) { - TQMap::ConstIterator it = mCategoriesMap.find( id ); + TQMap::ConstIterator it = mCategoriesMap.tqfind( id ); if ( it == mCategoriesMap.end() ) return id; else return *it; } @@ -255,23 +255,23 @@ class QtopiaParser : public QXmlDefaultHandler static TQMap mCategoriesMap; }; -TQMap QtopiaParser::mCategoriesMap; +TQMap TQtopiaParser::mCategoriesMap; -QtopiaFormat::QtopiaFormat() +TQtopiaFormat::TQtopiaFormat() { } -QtopiaFormat::~QtopiaFormat() +TQtopiaFormat::~TQtopiaFormat() { } -bool QtopiaFormat::load( Calendar *calendar, const TQString &fileName) +bool TQtopiaFormat::load( Calendar *calendar, const TQString &fileName) { - kdDebug(5800) << "QtopiaFormat::load() " << fileName << endl; + kdDebug(5800) << "TQtopiaFormat::load() " << fileName << endl; clearException(); - QtopiaParser handler( calendar ); + TQtopiaParser handler( calendar ); TQFile xmlFile( fileName ); TQXmlInputSource source( xmlFile ); TQXmlSimpleReader reader; @@ -279,9 +279,9 @@ bool QtopiaFormat::load( Calendar *calendar, const TQString &fileName) return reader.parse( source ); } -bool QtopiaFormat::save( Calendar *calendar, const TQString &fileName ) +bool TQtopiaFormat::save( Calendar *calendar, const TQString &fileName ) { - kdDebug(5800) << "QtopiaFormat::save(): " << fileName << endl; + kdDebug(5800) << "TQtopiaFormat::save(): " << fileName << endl; clearException(); @@ -304,13 +304,13 @@ bool QtopiaFormat::save( Calendar *calendar, const TQString &fileName ) return true; } -bool QtopiaFormat::fromString( Calendar *, const TQString & ) +bool TQtopiaFormat::fromString( Calendar *, const TQString & ) { - kdDebug(5800) << "QtopiaFormat::fromString() not yet implemented." << endl; + kdDebug(5800) << "TQtopiaFormat::fromString() not yet implemented." << endl; return false; } -TQString QtopiaFormat::toString( Calendar * ) +TQString TQtopiaFormat::toString( Calendar * ) { - return TQString::null; + return TQString(); } -- cgit v1.2.3