From 7be55ffa061c026e35e2d6a0effe1161ddb0d41f Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:53:50 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kresources/groupdav/groupdavglobals.cpp | 62 ++++++++++++++++----------------- 1 file changed, 31 insertions(+), 31 deletions(-) (limited to 'kresources/groupdav/groupdavglobals.cpp') 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 #include -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: "<... - 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="<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="<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(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(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; -- cgit v1.2.1