summaryrefslogtreecommitdiffstats
path: root/kresources/lib/webdavhandler.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 /kresources/lib/webdavhandler.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 'kresources/lib/webdavhandler.cpp')
-rw-r--r--kresources/lib/webdavhandler.cpp64
1 files changed, 32 insertions, 32 deletions
diff --git a/kresources/lib/webdavhandler.cpp b/kresources/lib/webdavhandler.cpp
index e6c0a4937..fcf99a145 100644
--- a/kresources/lib/webdavhandler.cpp
+++ b/kresources/lib/webdavhandler.cpp
@@ -23,7 +23,7 @@
#include <kdebug.h>
-#include <qdatetime.h>
+#include <tqdatetime.h>
extern "C" {
#include <ical.h>
@@ -56,39 +56,39 @@ KURL WebdavHandler::toDAV( const KURL& url )
-QDomElement WebdavHandler::addElement( QDomDocument &doc, QDomNode &node,
- const QString &tag, const QString &value )
+TQDomElement WebdavHandler::addElement( TQDomDocument &doc, TQDomNode &node,
+ const TQString &tag, const TQString &value )
{
- QDomElement el = doc.createElement( tag );
+ TQDomElement el = doc.createElement( tag );
node.appendChild( el );
if ( !value.isNull() ) {
- QDomText txt = doc.createTextNode( value );
+ TQDomText txt = doc.createTextNode( value );
el.appendChild( txt );
}
return el;
}
-QDomElement WebdavHandler::addElementNS( QDomDocument &doc, QDomNode &node,
- const QString &ns, const QString &tag, const QString &value )
+TQDomElement WebdavHandler::addElementNS( TQDomDocument &doc, TQDomNode &node,
+ const TQString &ns, const TQString &tag, const TQString &value )
{
- QDomElement el = doc.createElementNS( ns, tag );
+ TQDomElement el = doc.createElementNS( ns, tag );
node.appendChild( el );
if ( !value.isNull() ) {
- QDomText txt = doc.createTextNode( value );
+ TQDomText txt = doc.createTextNode( value );
el.appendChild( txt );
}
return el;
}
-QDomElement WebdavHandler::addDavElement( QDomDocument &doc, QDomNode &node,
- const QString &tag, const QString &value )
+TQDomElement WebdavHandler::addDavElement( TQDomDocument &doc, TQDomNode &node,
+ const TQString &tag, const TQString &value )
{
return addElementNS( doc, node, "DAV:", tag, value );
}
-bool WebdavHandler::extractBool( const QDomElement &node, const QString &entry, bool &value )
+bool WebdavHandler::extractBool( const TQDomElement &node, const TQString &entry, bool &value )
{
- QDomElement element = node.namedItem( entry ).toElement();
+ TQDomElement element = node.namedItem( entry ).toElement();
if ( !element.isNull() ) {
value = (element.text() != "0");
return true;
@@ -96,9 +96,9 @@ bool WebdavHandler::extractBool( const QDomElement &node, const QString &entry,
return false;
}
-bool WebdavHandler::extractLong( const QDomElement &node, const QString &entry, long &value )
+bool WebdavHandler::extractLong( const TQDomElement &node, const TQString &entry, long &value )
{
- QDomElement element = node.namedItem( entry ).toElement();
+ TQDomElement element = node.namedItem( entry ).toElement();
if ( !element.isNull() ) {
value = element.text().toLong();
return true;
@@ -106,9 +106,9 @@ bool WebdavHandler::extractLong( const QDomElement &node, const QString &entry,
return false;
}
-bool WebdavHandler::extractFloat( const QDomElement &node, const QString &entry, float &value )
+bool WebdavHandler::extractFloat( const TQDomElement &node, const TQString &entry, float &value )
{
- QDomElement element = node.namedItem( entry ).toElement();
+ TQDomElement element = node.namedItem( entry ).toElement();
if ( !element.isNull() ) {
value = element.text().toFloat();
return true;
@@ -116,19 +116,19 @@ bool WebdavHandler::extractFloat( const QDomElement &node, const QString &entry,
return false;
}
-bool WebdavHandler::extractDateTime( const QDomElement &node, const QString &entry, QDateTime &value )
+bool WebdavHandler::extractDateTime( const TQDomElement &node, const TQString &entry, TQDateTime &value )
{
- QDomElement element = node.namedItem( entry ).toElement();
+ TQDomElement element = node.namedItem( entry ).toElement();
if ( !element.isNull() && !element.text().isEmpty() ) {
- value = QDateTime::fromString( element.text(), Qt::ISODate );
+ value = TQDateTime::fromString( element.text(), Qt::ISODate );
return true;
}
return false;
}
-bool WebdavHandler::extractString( const QDomElement &node, const QString &entry, QString &value )
+bool WebdavHandler::extractString( const TQDomElement &node, const TQString &entry, TQString &value )
{
- QDomElement element = node.namedItem( entry ).toElement();
+ TQDomElement element = node.namedItem( entry ).toElement();
if ( !element.isNull() ) {
value = element.text();
return true;
@@ -136,14 +136,14 @@ bool WebdavHandler::extractString( const QDomElement &node, const QString &entry
return false;
}
-bool WebdavHandler::extractStringList( const QDomElement &node, const QString &entry, QStringList &value )
+bool WebdavHandler::extractStringList( const TQDomElement &node, const TQString &entry, TQStringList &value )
{
- QDomElement element = node.namedItem( entry ).toElement();
+ TQDomElement element = node.namedItem( entry ).toElement();
if ( !element.isNull() ) {
value.clear();
- QDomNodeList list = element.elementsByTagNameNS( "xml:", "v" );
+ TQDomNodeList list = element.elementsByTagNameNS( "xml:", "v" );
for( uint i=0; i < list.count(); i++ ) {
- QDomElement item = list.item(i).toElement();
+ TQDomElement item = list.item(i).toElement();
value.append( item.text() );
}
return true;
@@ -152,20 +152,20 @@ bool WebdavHandler::extractStringList( const QDomElement &node, const QString &e
}
-const QString WebdavHandler::getEtagFromHeaders( const QString& headers )
+const TQString WebdavHandler::getEtagFromHeaders( const TQString& headers )
{
int start = headers.find( "etag:", 0, false );
- if ( start < 0 ) return QString();
+ if ( start < 0 ) return TQString();
start += 6;
return headers.mid( start, headers.find( "\n", start ) - start );
}
//TODO: should not call libical functions directly -- better to make
// a new libkcal abstraction method.
-QDateTime WebdavHandler::utcAsZone( const QDateTime& utc, const QString& timeZoneId )
+TQDateTime WebdavHandler::utcAsZone( const TQDateTime& utc, const TQString& timeZoneId )
{
int daylight;
- QDateTime epoch;
+ TQDateTime epoch;
epoch.setTime_t( 0 );
time_t v = epoch.secsTo( utc );
struct icaltimetype tt =
@@ -180,10 +180,10 @@ kdDebug() << "Calculated offset of: " << offset << " of timezone: " << timeZoneI
//TODO: should not call libical functions directly -- better to make
// a new libkcal abstraction method.
-QDateTime WebdavHandler::zoneAsUtc( const QDateTime& zone, const QString& timeZoneId )
+TQDateTime WebdavHandler::zoneAsUtc( const TQDateTime& zone, const TQString& timeZoneId )
{
int daylight;
- QDateTime epoch;
+ TQDateTime epoch;
epoch.setTime_t( 0 );
time_t v = epoch.secsTo( zone );
struct icaltimetype tt = icaltime_from_timet( v, 0 ); // 0: is_date=false