diff options
Diffstat (limited to 'kresources/groupdav/groupdavglobals.cpp')
-rw-r--r-- | kresources/groupdav/groupdavglobals.cpp | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/kresources/groupdav/groupdavglobals.cpp b/kresources/groupdav/groupdavglobals.cpp index f94180195..17b6f443a 100644 --- a/kresources/groupdav/groupdavglobals.cpp +++ b/kresources/groupdav/groupdavglobals.cpp @@ -37,31 +37,31 @@ #include <kio/davjob.h> #include <kio/job.h> -QString GroupDavGlobals::extractFingerprint( KIO::Job *job, const QString &/*jobData*/ ) +TQString GroupDavGlobals::extractFingerprint( KIO::Job *job, const TQString &/*jobData*/ ) { - const QString& headers = job->queryMetaData( "HTTP-Headers" ); + const TQString& headers = job->queryMetaData( "HTTP-Headers" ); return WebdavHandler::getEtagFromHeaders( headers ); } -KPIM::FolderLister::ContentType GroupDavGlobals::getContentType( const QDomElement &prop ) +KPIM::FolderLister::ContentType GroupDavGlobals::getContentType( const TQDomElement &prop ) { - QDomElement ctype = prop.namedItem("getcontenttype").toElement(); + TQDomElement ctype = prop.namedItem("getcontenttype").toElement(); if ( ctype.isNull() ) return KPIM::FolderLister::Unknown; - const QString &type = ctype.text(); + const TQString &type = ctype.text(); kdDebug()<<"Found content type: "<<type<<endl; /// TODO: Not yet implemented in GroupDav! return KPIM::FolderLister::Unknown; } -KPIM::FolderLister::ContentType GroupDavGlobals::getContentType( const QDomNode &folderNode ) +KPIM::FolderLister::ContentType GroupDavGlobals::getContentType( const TQDomNode &folderNode ) { - QDomNode n4; + TQDomNode n4; kdDebug()<<"GroupDavGlobals::getContentType(...)"<<endl; int type = KPIM::FolderLister::Unknown; for( n4 = folderNode.firstChild(); !n4.isNull(); n4 = n4.nextSibling() ) { - QDomElement e = n4.toElement(); + TQDomElement e = n4.toElement(); if ( e.tagName() == "resourcetype" ) { if ( !e.namedItem( "vevent-collection" ).isNull() ) @@ -80,11 +80,11 @@ kdDebug()<<"GroupDavGlobals::getContentType(...)"<<endl; return (KPIM::FolderLister::ContentType)type; } -bool GroupDavGlobals::getFolderHasSubs( const QDomNode &folderNode ) +bool GroupDavGlobals::getFolderHasSubs( const TQDomNode &folderNode ) { // a folder is identified by the collection item in the resourcetype: // <a:resourcetype xmlns:a="DAV:"><a:collection xmlns:a="DAV:"/>...</a:resourcetype> - QDomElement e = folderNode.namedItem("resourcetype").toElement(); + TQDomElement e = folderNode.namedItem("resourcetype").toElement(); if ( !e.namedItem( "collection" ).isNull() ) return true; else return false; @@ -95,9 +95,9 @@ bool GroupDavGlobals::getFolderHasSubs( const QDomNode &folderNode ) KIO::Job *GroupDavGlobals::createListFoldersJob( const KURL &url ) { - QDomDocument doc; - QDomElement root = WebdavHandler::addDavElement( doc, doc, "d:propfind" ); - QDomElement prop = WebdavHandler::addElement( doc, root, "d:prop" ); + TQDomDocument doc; + TQDomElement root = WebdavHandler::addDavElement( doc, doc, "d:propfind" ); + TQDomElement prop = WebdavHandler::addElement( doc, root, "d:prop" ); WebdavHandler::addElement( doc, prop, "d:displayname" ); WebdavHandler::addElement( doc, prop, "d:resourcetype" ); // WebdavHandler::addElement( doc, prop, "d:hassubs" ); @@ -109,9 +109,9 @@ KIO::Job *GroupDavGlobals::createListFoldersJob( const KURL &url ) KIO::TransferJob *GroupDavGlobals::createListItemsJob( const KURL &url ) { - QDomDocument doc; - QDomElement root = WebdavHandler::addDavElement( doc, doc, "propfind" ); - QDomElement prop = WebdavHandler::addDavElement( doc, root, "prop" ); + TQDomDocument doc; + TQDomElement root = WebdavHandler::addDavElement( doc, doc, "propfind" ); + TQDomElement prop = WebdavHandler::addDavElement( doc, root, "prop" ); WebdavHandler::addDavElement( doc, prop, "getetag" ); // WebdavHandler::addDavElement( doc, prop, "getcontenttype" ); kdDebug(5800) << "props = "<< doc.toString() << endl; @@ -130,7 +130,7 @@ KIO::TransferJob *GroupDavGlobals::createDownloadJob( KPIM::GroupwareDataAdaptor kdDebug()<<"GroupDavGlobals::createDownloadJob, url="<<url.url()<<endl; KIO::TransferJob *job = KIO::get( url, false, false ); if ( adaptor ) { - QString mt = adaptor->mimeType(); + TQString mt = adaptor->mimeType(); job->addMetaData( "accept", mt ); } job->addMetaData( "PropagateHttpHeader", "true" ); @@ -158,7 +158,7 @@ KIO::Job *GroupDavGlobals::createRemoveJob( KPIM::GroupwareDataAdaptor *adaptor, } return delJob; -/* QStringList urls; +/* TQStringList urls; KPIM::GroupwareUploadItem::List::const_iterator it; kdDebug(5800) << " GroupDavGlobals::createRemoveJob, BaseURL="<<uploadurl.url()<<endl; for ( it = deletedItems.constBegin(); it != deletedItems.constEnd(); ++it ) { @@ -190,28 +190,28 @@ bool GroupDavGlobals::interpretListItemsJob( KPIM::GroupwareDataAdaptor *adaptor if ( !davjob ) { return false; } - QDomDocument doc = davjob->response(); + TQDomDocument doc = davjob->response(); kdDebug(7000) << " Doc: " << doc.toString() << endl; kdDebug(7000) << " IdMapper: " << adaptor->idMapper()->asString() << endl; - QDomElement docElem = doc.documentElement(); - QDomNode n = docElem.firstChild(); + TQDomElement docElem = doc.documentElement(); + TQDomNode n = docElem.firstChild(); while( !n.isNull() ) { - QDomElement e = n.toElement(); // try to convert the node to an element. + TQDomElement e = n.toElement(); // try to convert the node to an element. n = n.nextSibling(); if ( e.isNull() ) continue; const KURL &entry( e.namedItem("href").toElement().text() ); - QDomElement propstat = e.namedItem("propstat").toElement(); + TQDomElement propstat = e.namedItem("propstat").toElement(); if ( propstat.isNull() ) continue; - QDomElement prop = propstat.namedItem( "prop" ).toElement(); + TQDomElement prop = propstat.namedItem( "prop" ).toElement(); if ( prop.isNull() ) continue; - QDomElement elem = prop.namedItem("getetag").toElement(); - const QString &newFingerprint = elem.text(); + TQDomElement elem = prop.namedItem("getetag").toElement(); + const TQString &newFingerprint = elem.text(); if ( elem.isNull() || newFingerprint.isEmpty() ) continue; @@ -225,12 +225,12 @@ bool GroupDavGlobals::interpretListItemsJob( KPIM::GroupwareDataAdaptor *adaptor bool GroupDavGlobals::interpretCalendarDownloadItemsJob( KCal::CalendarAdaptor *adaptor, - KIO::Job *job, const QString &jobData ) + KIO::Job *job, const TQString &jobData ) { kdDebug(5800) << "GroupDavGlobals::interpretCalendarDownloadItemsJob, iCalendar=" << endl; kdDebug(5800) << jobData << endl; if ( !adaptor || !job ) return false; - KCal::CalendarLocal calendar( QString::fromLatin1("UTC") ); + KCal::CalendarLocal calendar( TQString::fromLatin1("UTC") ); KCal::ICalFormat ical; calendar.setTimeZoneId( adaptor->resource()->timeZoneId() ); KCal::Incidence::List incidences; @@ -247,7 +247,7 @@ kdDebug(5800) << jobData << endl; KIO::SimpleJob *sjob = dynamic_cast<KIO::SimpleJob *>(job); KURL remoteId; if ( sjob ) remoteId = sjob->url(); - QString fingerprint = extractFingerprint( job, jobData ); + TQString fingerprint = extractFingerprint( job, jobData ); adaptor->calendarItemDownloaded( inc, inc->uid(), remoteId, fingerprint, remoteId.prettyURL() ); return true; @@ -259,7 +259,7 @@ kdDebug(5800) << jobData << endl; bool GroupDavGlobals::interpretAddressBookDownloadItemsJob( - KABC::AddressBookAdaptor *adaptor, KIO::Job *job, const QString &jobData ) + KABC::AddressBookAdaptor *adaptor, KIO::Job *job, const TQString &jobData ) { kdDebug(5800) << "GroupDavGlobals::interpretAddressBookDownloadItemsJob, vCard=" << endl; kdDebug(5800) << jobData << endl; @@ -278,7 +278,7 @@ kdDebug(5800) << jobData << endl; KIO::SimpleJob *sjob = dynamic_cast<KIO::SimpleJob*>(job); KURL remoteId; if ( sjob ) remoteId = sjob->url(); - QString fingerprint = extractFingerprint( job, jobData ); + TQString fingerprint = extractFingerprint( job, jobData ); adaptor->addressbookItemDownloaded( a, a.uid(), remoteId, fingerprint, remoteId.prettyURL() ); return true; |