summaryrefslogtreecommitdiffstats
path: root/kresources/slox/sloxfoldermanager.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/slox/sloxfoldermanager.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/slox/sloxfoldermanager.cpp')
-rw-r--r--kresources/slox/sloxfoldermanager.cpp48
1 files changed, 24 insertions, 24 deletions
diff --git a/kresources/slox/sloxfoldermanager.cpp b/kresources/slox/sloxfoldermanager.cpp
index b693767ca..41864caf8 100644
--- a/kresources/slox/sloxfoldermanager.cpp
+++ b/kresources/slox/sloxfoldermanager.cpp
@@ -17,9 +17,9 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qfile.h>
-#include <qdom.h>
-#include <qstring.h>
+#include <tqfile.h>
+#include <tqdom.h>
+#include <tqstring.h>
#include <kdebug.h>
#include <kio/job.h>
@@ -46,7 +46,7 @@ SloxFolderManager::~SloxFolderManager()
{
if ( mDownloadJob )
mDownloadJob->kill();
- QMap<QString, SloxFolder*>::Iterator it;
+ TQMap<TQString, SloxFolder*>::Iterator it;
for ( it = mFolders.begin(); it != mFolders.end(); ++it )
delete *it;
mFolders.clear();
@@ -64,9 +64,9 @@ void SloxFolderManager::requestFolders()
KURL url = mBaseUrl;
url.setPath( "/servlet/webdav.folders/file.xml" );
- 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::addSloxElement( mRes, doc, prop, "objectmode", "NEW_AND_MODIFIED" );
WebdavHandler::addSloxElement( mRes, doc, prop, "lastsync", "0" );
WebdavHandler::addSloxElement( mRes, doc, prop, "foldertype", "PRIVATE" );
@@ -79,8 +79,8 @@ void SloxFolderManager::requestFolders()
mDownloadJob = KIO::davPropFind( url, doc, "0", false );
- connect( mDownloadJob, SIGNAL( result( KIO::Job * ) ),
- SLOT( slotResult( KIO::Job * ) ) );
+ connect( mDownloadJob, TQT_SIGNAL( result( KIO::Job * ) ),
+ TQT_SLOT( slotResult( KIO::Job * ) ) );
}
void SloxFolderManager::slotResult( KIO::Job *job )
@@ -91,12 +91,12 @@ void SloxFolderManager::slotResult( KIO::Job *job )
job->showErrorDialog( 0 );
} else {
kdDebug() << k_funcinfo << " success, writing to " << cacheFile() << endl;
- QFile f( cacheFile() );
+ TQFile f( cacheFile() );
if ( !f.open( IO_WriteOnly ) ) {
kdDebug() << "Unable to open '" << cacheFile() << "'" << endl;
return;
}
- QTextStream stream ( &f );
+ TQTextStream stream ( &f );
stream << mDownloadJob->response();
f.close();
readFolders();
@@ -106,11 +106,11 @@ void SloxFolderManager::slotResult( KIO::Job *job )
emit foldersUpdated();
}
-QString SloxFolderManager::cacheFile() const
+TQString SloxFolderManager::cacheFile() const
{
- QString host = mBaseUrl.host();
+ TQString host = mBaseUrl.host();
- QString file = locateLocal( "cache", "slox/folders_" + host );
+ TQString file = locateLocal( "cache", "slox/folders_" + host );
kdDebug() << k_funcinfo << file << endl;
@@ -121,29 +121,29 @@ void SloxFolderManager::readFolders()
{
kdDebug() << k_funcinfo << endl;
- QFile f( cacheFile() );
+ TQFile f( cacheFile() );
if ( !f.open( IO_ReadOnly ) ) {
kdDebug() << "Unable to open '" << cacheFile() << "'" << endl;
requestFolders();
return;
}
- QDomDocument doc;
+ TQDomDocument doc;
doc.setContent( &f );
mFolders.clear();
- QDomNodeList nodes = doc.elementsByTagName( "D:prop" );
+ TQDomNodeList nodes = doc.elementsByTagName( "D:prop" );
for( uint i = 0; i < nodes.count(); ++i ) {
- QDomElement element = nodes.item(i).toElement();
- QString id = "-1", parentId = "-1"; // OX default folder
+ TQDomElement element = nodes.item(i).toElement();
+ TQString id = "-1", parentId = "-1"; // OX default folder
bool def = false;
- QString name, type;
- QDomNode n;
+ TQString name, type;
+ TQDomNode n;
for( n = element.firstChild(); !n.isNull(); n = n.nextSibling() ) {
- QDomElement e = n.toElement();
- QString tag = e.tagName();
- QString value = e.text();
+ TQDomElement e = n.toElement();
+ TQString tag = e.tagName();
+ TQString value = e.text();
if ( tag == "ox:object_id" ) id = value;
else if ( tag == "ox:folder_id" ) parentId = value;
else if ( tag == "ox:title" ) name = value;