summaryrefslogtreecommitdiffstats
path: root/kabc/plugins/evolution
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:46:43 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:46:43 +0000
commitffe8a83e053396df448e9413828527613ca3bd46 (patch)
treea73d4169e02df4a50f9a12cb165fcd0ab5bac7c6 /kabc/plugins/evolution
parent682bf3bfdcbcbb1fca85e8a36ed03e062e0555d5 (diff)
downloadtdelibs-ffe8a83e053396df448e9413828527613ca3bd46.tar.gz
tdelibs-ffe8a83e053396df448e9413828527613ca3bd46.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1157647 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kabc/plugins/evolution')
-rw-r--r--kabc/plugins/evolution/dbwrapper.cpp44
-rw-r--r--kabc/plugins/evolution/dbwrapper.h22
-rw-r--r--kabc/plugins/evolution/resourceevo.cpp12
3 files changed, 39 insertions, 39 deletions
diff --git a/kabc/plugins/evolution/dbwrapper.cpp b/kabc/plugins/evolution/dbwrapper.cpp
index cc566344c..bcc641191 100644
--- a/kabc/plugins/evolution/dbwrapper.cpp
+++ b/kabc/plugins/evolution/dbwrapper.cpp
@@ -1,6 +1,6 @@
#include <db.h>
-#include <qfile.h>
+#include <tqfile.h>
#include "dbwrapper.h"
@@ -9,8 +9,8 @@ using namespace Evolution;
struct DBIterator::Data {
DBWrapper *wrapper;
- QString key;
- QString data;
+ TQString key;
+ TQString data;
DBC* cursor;
bool atEnd;
};
@@ -55,13 +55,13 @@ DBIterator& DBIterator::operator=( const DBIterator& rhs ) {
return *this;
}
-QString DBIterator::key()const{
+TQString DBIterator::key()const{
return data->key;
}
-QString DBIterator::value()const {
+TQString DBIterator::value()const {
return data->data;
}
-QString DBIterator::operator*() {
+TQString DBIterator::operator*() {
return data->data;
}
DBIterator& DBIterator::operator++() {
@@ -71,8 +71,8 @@ DBIterator& DBIterator::operator++() {
if ( data->cursor )
if ( data->cursor->c_get(data->cursor, &key, &val,DB_NEXT ) != 0 )
data->atEnd = true;
- data->key = QString::fromUtf8( (char*)key.data, key.size );
- data->data = QString::fromUtf8( (char*)val.data, val.size );
+ data->key = TQString::fromUtf8( (char*)key.data, key.size );
+ data->data = TQString::fromUtf8( (char*)val.data, val.size );
return *this;
}
DBIterator& DBIterator::operator--() {
@@ -82,8 +82,8 @@ DBIterator& DBIterator::operator--() {
if ( data->cursor )
if ( data->cursor->c_get(data->cursor, &key, &val,DB_PREV ) != 0 )
data->atEnd = true;
- data->key = QString::fromUtf8( (char*)key.data, key.size );
- data->data = QString::fromUtf8( (char*)val.data, val.size );
+ data->key = TQString::fromUtf8( (char*)key.data, key.size );
+ data->data = TQString::fromUtf8( (char*)val.data, val.size );
return *this;
}
bool DBIterator::operator==( const DBIterator& rhs ) {
@@ -107,9 +107,9 @@ DBWrapper::~DBWrapper() {
data->db->close(data->db, 0 );
delete data;
}
-bool DBWrapper::open( const QString& file, bool on) {
+bool DBWrapper::open( const TQString& file, bool on) {
data->only = on;
- return !data->db->open(data->db, QFile::encodeName( file ), NULL, DB_HASH, 0, 0666 );
+ return !data->db->open(data->db, TQFile::encodeName( file ), NULL, DB_HASH, 0, 0666 );
}
bool DBWrapper::save() {
return true;
@@ -134,8 +134,8 @@ DBIterator DBWrapper::begin() {
}
it.data->cursor = cursor;
- it.data->key = QString::fromUtf8((char*)key.data, key.size );
- it.data->data = QString::fromUtf8((char*)val.data, val.size );
+ it.data->key = TQString::fromUtf8((char*)key.data, key.size );
+ it.data->data = TQString::fromUtf8((char*)val.data, val.size );
return it;
}
@@ -145,26 +145,26 @@ DBIterator DBWrapper::end() {
return it;
}
-bool DBWrapper::find( const QString& _key, QString& _val ) {
+bool DBWrapper::find( const TQString& _key, TQString& _val ) {
DBT key, val;
::memset(&key, 0, sizeof(key) );
::memset(&val, 0, sizeof(val) );
- QCString db_key = _key.local8Bit();
+ TQCString db_key = _key.local8Bit();
key.data = db_key.data();
key.size = db_key.size();
int ret = data->db->get(data->db, NULL, &key, &val, 0 );
if (!ret) {
- _val = QString::fromUtf8( (char*)val.data, val.size );
+ _val = TQString::fromUtf8( (char*)val.data, val.size );
qWarning("key: %s val: %sXXX", (char*)key.data, (char*)val.data );
return true;
}
return false;
}
-bool DBWrapper::add( const QString& _key, const QString& _val ) {
- QCString db_key = _key.local8Bit();
- QCString db_val = _val.local8Bit();
+bool DBWrapper::add( const TQString& _key, const TQString& _val ) {
+ TQCString db_key = _key.local8Bit();
+ TQCString db_val = _val.local8Bit();
DBT key, val;
::memset(&key, 0, sizeof(key) );
::memset(&val, 0, sizeof(val) );
@@ -176,8 +176,8 @@ bool DBWrapper::add( const QString& _key, const QString& _val ) {
return !data->db->put(data->db, NULL, &key, &val, 0 );
}
-bool DBWrapper::remove( const QString& _key ) {
- QCString db_key = _key.local8Bit();
+bool DBWrapper::remove( const TQString& _key ) {
+ TQCString db_key = _key.local8Bit();
DBT key;
memset(&key, 0, sizeof(key) );
key.data = db_key.data();
diff --git a/kabc/plugins/evolution/dbwrapper.h b/kabc/plugins/evolution/dbwrapper.h
index 484605acf..e5e0a2c33 100644
--- a/kabc/plugins/evolution/dbwrapper.h
+++ b/kabc/plugins/evolution/dbwrapper.h
@@ -3,8 +3,8 @@
#include <db.h>
-#include <qstring.h>
-#include <qpair.h>
+#include <tqstring.h>
+#include <tqpair.h>
namespace Evolution {
@@ -18,10 +18,10 @@ namespace Evolution {
DBIterator( const DBIterator& );
DBIterator &operator=( const DBIterator& );
- QString key()const;
- QString value()const;
+ TQString key()const;
+ TQString value()const;
- QString operator*();
+ TQString operator*();
DBIterator &operator++();
DBIterator &operator--();
@@ -37,18 +37,18 @@ namespace Evolution {
DBWrapper();
~DBWrapper();
- QString lastError()const;
+ TQString lastError()const;
- bool open( const QString& file, bool readOnly = false);
+ bool open( const TQString& file, bool readOnly = false);
bool save();
DBIterator begin();
DBIterator end();
- bool find( const QString& key, QString& value );
- bool add( const QString& key, const QString& val );
- bool remove( const QString& key );
+ bool find( const TQString& key, TQString& value );
+ bool add( const TQString& key, const TQString& val );
+ bool remove( const TQString& key );
private:
- // DBT element( const QString& );
+ // DBT element( const TQString& );
struct Data;
Data* data;
diff --git a/kabc/plugins/evolution/resourceevo.cpp b/kabc/plugins/evolution/resourceevo.cpp
index a1858bf83..a93d7d2a1 100644
--- a/kabc/plugins/evolution/resourceevo.cpp
+++ b/kabc/plugins/evolution/resourceevo.cpp
@@ -1,4 +1,4 @@
-#include <qdir.h>
+#include <tqdir.h>
#include <kglobal.h>
#include <klocale.h>
@@ -22,7 +22,7 @@ class EvolutionFactory : public KRES::PluginFactoryBase
return new ResourceEvolution( config );
}
- KRES::ConfigWidget *configWidget( QWidget * )
+ KRES::ConfigWidget *configWidget( TQWidget * )
{
return 0;
}
@@ -46,11 +46,11 @@ ResourceEvolution::~ResourceEvolution() {
}
bool ResourceEvolution::doOpen() {
mWrap = new DBWrapper;
- if (!mWrap->open( QDir::homeDirPath() + "/evolution/local/Contacts/addressbook.db" ) ) {
+ if (!mWrap->open( TQDir::homeDirPath() + "/evolution/local/Contacts/addressbook.db" ) ) {
return false;
}
- QString val;
+ TQString val;
if (!mWrap->find( "PAS-DB-VERSION", val ) )
return false;
@@ -88,7 +88,7 @@ bool ResourceEvolution::load() {
qWarning( "val:%s", it.value().latin1() );
VCardTool tool;
- QString str = it.value().stripWhiteSpace();
+ TQString str = it.value().stripWhiteSpace();
Addressee::List list = tool.parseVCards( str );
if (!list.first().isEmpty() ) {
Addressee adr = list.first();
@@ -104,7 +104,7 @@ bool ResourceEvolution::save( Ticket* ticket ) {
// just delete the summary so evolution will regenerate it
// on next start up
- (void)QFile::remove( QDir::homeDirPath() + "/evolution/local/Contacts/addressbook.db.summary" );
+ (void)TQFile::remove( TQDir::homeDirPath() + "/evolution/local/Contacts/addressbook.db.summary" );
AddressBook::Iterator it;