summaryrefslogtreecommitdiffstats
path: root/kabc/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'kabc/plugins')
-rw-r--r--kabc/plugins/dir/resourcedir.cpp42
-rw-r--r--kabc/plugins/dir/resourcedir.h16
-rw-r--r--kabc/plugins/dir/resourcedirconfig.cpp16
-rw-r--r--kabc/plugins/dir/resourcedirconfig.h4
-rw-r--r--kabc/plugins/evolution/dbwrapper.cpp44
-rw-r--r--kabc/plugins/evolution/dbwrapper.h22
-rw-r--r--kabc/plugins/evolution/resourceevo.cpp12
-rw-r--r--kabc/plugins/file/resourcefile.cpp78
-rw-r--r--kabc/plugins/file/resourcefile.h20
-rw-r--r--kabc/plugins/file/resourcefileconfig.cpp26
-rw-r--r--kabc/plugins/file/resourcefileconfig.h6
-rw-r--r--kabc/plugins/ldapkio/resourceldapkio.cpp218
-rw-r--r--kabc/plugins/ldapkio/resourceldapkio.h66
-rw-r--r--kabc/plugins/ldapkio/resourceldapkioconfig.cpp140
-rw-r--r--kabc/plugins/ldapkio/resourceldapkioconfig.h40
-rw-r--r--kabc/plugins/net/resourcenet.cpp36
-rw-r--r--kabc/plugins/net/resourcenet.h14
-rw-r--r--kabc/plugins/net/resourcenetconfig.cpp16
-rw-r--r--kabc/plugins/net/resourcenetconfig.h4
-rw-r--r--kabc/plugins/sql/resourcesql.cpp74
-rw-r--r--kabc/plugins/sql/resourcesql.h20
-rw-r--r--kabc/plugins/sql/resourcesqlconfig.cpp30
-rw-r--r--kabc/plugins/sql/resourcesqlconfig.h4
23 files changed, 474 insertions, 474 deletions
diff --git a/kabc/plugins/dir/resourcedir.cpp b/kabc/plugins/dir/resourcedir.cpp
index 1947e98f3..0897c9cee 100644
--- a/kabc/plugins/dir/resourcedir.cpp
+++ b/kabc/plugins/dir/resourcedir.cpp
@@ -24,9 +24,9 @@
#include <sys/stat.h>
#include <unistd.h>
-#include <qregexp.h>
-#include <qtimer.h>
-#include <qwidget.h>
+#include <tqregexp.h>
+#include <tqtimer.h>
+#include <tqwidget.h>
#include <kapplication.h>
#include <kconfig.h>
@@ -67,13 +67,13 @@ ResourceDir::ResourceDir( const KConfig *config )
}
}
-ResourceDir::ResourceDir( const QString &path, const QString &format )
+ResourceDir::ResourceDir( const TQString &path, const TQString &format )
: Resource( 0 ), mAsynchronous( false )
{
init( path, format );
}
-void ResourceDir::init( const QString &path, const QString &format )
+void ResourceDir::init( const TQString &path, const TQString &format )
{
mFormatName = format;
@@ -87,9 +87,9 @@ void ResourceDir::init( const QString &path, const QString &format )
mLock = 0;
- connect( &mDirWatch, SIGNAL( dirty(const QString&) ), SLOT( pathChanged() ) );
- connect( &mDirWatch, SIGNAL( created(const QString&) ), SLOT( pathChanged() ) );
- connect( &mDirWatch, SIGNAL( deleted(const QString&) ), SLOT( pathChanged() ) );
+ connect( &mDirWatch, TQT_SIGNAL( dirty(const TQString&) ), TQT_SLOT( pathChanged() ) );
+ connect( &mDirWatch, TQT_SIGNAL( created(const TQString&) ), TQT_SLOT( pathChanged() ) );
+ connect( &mDirWatch, TQT_SIGNAL( deleted(const TQString&) ), TQT_SLOT( pathChanged() ) );
setPath( path );
}
@@ -143,15 +143,15 @@ void ResourceDir::releaseSaveTicket( Ticket *ticket )
bool ResourceDir::doOpen()
{
- QDir dir( mPath );
+ TQDir dir( mPath );
if ( !dir.exists() ) { // no directory available
return dir.mkdir( dir.path() );
} else {
- QString testName = dir.entryList( QDir::Files )[0];
+ TQString testName = dir.entryList( TQDir::Files )[0];
if ( testName.isNull() || testName.isEmpty() ) // no file in directory
return true;
- QFile file( mPath + "/" + testName );
+ TQFile file( mPath + "/" + testName );
if ( file.open( IO_ReadOnly ) )
return true;
@@ -174,13 +174,13 @@ bool ResourceDir::load()
mAsynchronous = false;
- QDir dir( mPath );
- QStringList files = dir.entryList( QDir::Files );
+ TQDir dir( mPath );
+ TQStringList files = dir.entryList( TQDir::Files );
- QStringList::Iterator it;
+ TQStringList::Iterator it;
bool ok = true;
for ( it = files.begin(); it != files.end(); ++it ) {
- QFile file( mPath + "/" + (*it) );
+ TQFile file( mPath + "/" + (*it) );
if ( !file.open( IO_ReadOnly ) ) {
addressBook()->error( i18n( "Unable to open file '%1' for reading" ).arg( file.name() ) );
@@ -224,7 +224,7 @@ bool ResourceDir::save( Ticket * )
if ( !it.data().changed() )
continue;
- QFile file( mPath + "/" + (*it).uid() );
+ TQFile file( mPath + "/" + (*it).uid() );
if ( !file.open( IO_WriteOnly ) ) {
addressBook()->error( i18n( "Unable to open file '%1' for writing" ).arg( file.name() ) );
continue;
@@ -255,7 +255,7 @@ bool ResourceDir::asyncSave( Ticket *ticket )
return ok;
}
-void ResourceDir::setPath( const QString &path )
+void ResourceDir::setPath( const TQString &path )
{
mDirWatch.stopScan();
if ( mDirWatch.contains( mPath ) )
@@ -266,12 +266,12 @@ void ResourceDir::setPath( const QString &path )
mDirWatch.startScan();
}
-QString ResourceDir::path() const
+TQString ResourceDir::path() const
{
return mPath;
}
-void ResourceDir::setFormat( const QString &format )
+void ResourceDir::setFormat( const TQString &format )
{
mFormatName = format;
@@ -282,7 +282,7 @@ void ResourceDir::setFormat( const QString &format )
mFormat = factory->format( mFormatName );
}
-QString ResourceDir::format() const
+TQString ResourceDir::format() const
{
return mFormatName;
}
@@ -303,7 +303,7 @@ void ResourceDir::pathChanged()
void ResourceDir::removeAddressee( const Addressee& addr )
{
- QFile::remove( mPath + "/" + addr.uid() );
+ TQFile::remove( mPath + "/" + addr.uid() );
mAddrMap.erase( addr.uid() );
}
diff --git a/kabc/plugins/dir/resourcedir.h b/kabc/plugins/dir/resourcedir.h
index b54f0ddda..125882a84 100644
--- a/kabc/plugins/dir/resourcedir.h
+++ b/kabc/plugins/dir/resourcedir.h
@@ -44,7 +44,7 @@ class KABC_EXPORT ResourceDir : public Resource
public:
ResourceDir( const KConfig* );
- ResourceDir( const QString &path, const QString &type = "vcard" );
+ ResourceDir( const TQString &path, const TQString &type = "vcard" );
~ResourceDir();
virtual void writeConfig( KConfig* );
@@ -63,22 +63,22 @@ class KABC_EXPORT ResourceDir : public Resource
/**
Set path to be used for saving.
*/
- void setPath( const QString & );
+ void setPath( const TQString & );
/**
Return path used for loading and saving the address book.
*/
- QString path() const;
+ TQString path() const;
/**
Set the format by name.
*/
- void setFormat( const QString &format );
+ void setFormat( const TQString &format );
/**
Returns the format name.
*/
- QString format() const;
+ TQString format() const;
/**
Remove a addressee from its source.
@@ -90,15 +90,15 @@ class KABC_EXPORT ResourceDir : public Resource
void pathChanged();
protected:
- void init( const QString &path, const QString &format );
+ void init( const TQString &path, const TQString &format );
private:
FormatPlugin *mFormat;
KDirWatch mDirWatch;
- QString mPath;
- QString mFormatName;
+ TQString mPath;
+ TQString mFormatName;
Lock *mLock;
diff --git a/kabc/plugins/dir/resourcedirconfig.cpp b/kabc/plugins/dir/resourcedirconfig.cpp
index ada7c1f9d..819d75d96 100644
--- a/kabc/plugins/dir/resourcedirconfig.cpp
+++ b/kabc/plugins/dir/resourcedirconfig.cpp
@@ -18,8 +18,8 @@
Boston, MA 02110-1301, USA.
*/
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <kdebug.h>
#include <klocale.h>
@@ -34,19 +34,19 @@
using namespace KABC;
-ResourceDirConfig::ResourceDirConfig( QWidget* parent, const char* name )
+ResourceDirConfig::ResourceDirConfig( TQWidget* parent, const char* name )
: KRES::ConfigWidget( parent, name )
{
- QGridLayout *mainLayout = new QGridLayout( this, 2, 2, 0,
+ TQGridLayout *mainLayout = new TQGridLayout( this, 2, 2, 0,
KDialog::spacingHint() );
- QLabel *label = new QLabel( i18n( "Format:" ), this );
+ TQLabel *label = new TQLabel( i18n( "Format:" ), this );
mFormatBox = new KComboBox( this );
mainLayout->addWidget( label, 0, 0 );
mainLayout->addWidget( mFormatBox, 0, 1 );
- label = new QLabel( i18n( "Location:" ), this );
+ label = new TQLabel( i18n( "Location:" ), this );
mFileNameEdit = new KURLRequester( this );
mFileNameEdit->setMode( KFile::Directory );
@@ -54,8 +54,8 @@ ResourceDirConfig::ResourceDirConfig( QWidget* parent, const char* name )
mainLayout->addWidget( mFileNameEdit, 1, 1 );
FormatFactory *factory = FormatFactory::self();
- QStringList formats = factory->formats();
- QStringList::Iterator it;
+ TQStringList formats = factory->formats();
+ TQStringList::Iterator it;
for ( it = formats.begin(); it != formats.end(); ++it ) {
FormatInfo *info = factory->info( *it );
if ( info ) {
diff --git a/kabc/plugins/dir/resourcedirconfig.h b/kabc/plugins/dir/resourcedirconfig.h
index 46d446b36..4333fdae1 100644
--- a/kabc/plugins/dir/resourcedirconfig.h
+++ b/kabc/plugins/dir/resourcedirconfig.h
@@ -33,7 +33,7 @@ class KABC_EXPORT ResourceDirConfig : public KRES::ConfigWidget
Q_OBJECT
public:
- ResourceDirConfig( QWidget* parent = 0, const char* name = 0 );
+ ResourceDirConfig( TQWidget* parent = 0, const char* name = 0 );
void setEditMode( bool value );
@@ -45,7 +45,7 @@ private:
KComboBox* mFormatBox;
KURLRequester* mFileNameEdit;
- QStringList mFormatTypes;
+ TQStringList mFormatTypes;
bool mInEditMode;
};
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;
diff --git a/kabc/plugins/file/resourcefile.cpp b/kabc/plugins/file/resourcefile.cpp
index 9c0f85fb8..b391dffa5 100644
--- a/kabc/plugins/file/resourcefile.cpp
+++ b/kabc/plugins/file/resourcefile.cpp
@@ -25,9 +25,9 @@
#include <sys/stat.h>
#include <unistd.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qtimer.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqtimer.h>
#include <kapplication.h>
#include <kconfig.h>
@@ -50,7 +50,7 @@ ResourceFile::ResourceFile( const KConfig *config )
: Resource( config ), mFormat( 0 ),
mAsynchronous( false )
{
- QString fileName, formatName;
+ TQString fileName, formatName;
if ( config ) {
fileName = config->readPathEntry( "FileName", StdAddressBook::fileName() );
@@ -63,15 +63,15 @@ ResourceFile::ResourceFile( const KConfig *config )
init( fileName, formatName );
}
-ResourceFile::ResourceFile( const QString &fileName,
- const QString &formatName )
+ResourceFile::ResourceFile( const TQString &fileName,
+ const TQString &formatName )
: Resource( 0 ), mFormat( 0 ),
mAsynchronous( false )
{
init( fileName, formatName );
}
-void ResourceFile::init( const QString &fileName, const QString &formatName )
+void ResourceFile::init( const TQString &fileName, const TQString &formatName )
{
mFormatName = formatName;
@@ -83,9 +83,9 @@ void ResourceFile::init( const QString &fileName, const QString &formatName )
mFormat = factory->format( mFormatName );
}
- connect( &mDirWatch, SIGNAL( dirty(const QString&) ), SLOT( fileChanged() ) );
- connect( &mDirWatch, SIGNAL( created(const QString&) ), SLOT( fileChanged() ) );
- connect( &mDirWatch, SIGNAL( deleted(const QString&) ), SLOT( fileChanged() ) );
+ connect( &mDirWatch, TQT_SIGNAL( dirty(const TQString&) ), TQT_SLOT( fileChanged() ) );
+ connect( &mDirWatch, TQT_SIGNAL( created(const TQString&) ), TQT_SLOT( fileChanged() ) );
+ connect( &mDirWatch, TQT_SIGNAL( deleted(const TQString&) ), TQT_SLOT( fileChanged() ) );
setFileName( fileName );
@@ -143,7 +143,7 @@ void ResourceFile::releaseSaveTicket( Ticket *ticket )
bool ResourceFile::doOpen()
{
- QFile file( mFileName );
+ TQFile file( mFileName );
if ( !file.exists() ) {
// try to create the file
@@ -153,7 +153,7 @@ bool ResourceFile::doOpen()
return ok;
} else {
- QFileInfo fileInfo( mFileName );
+ TQFileInfo fileInfo( mFileName );
if ( readOnly() || !fileInfo.isWritable() ) {
if ( !file.open( IO_ReadOnly ) )
return false;
@@ -167,22 +167,22 @@ bool ResourceFile::doOpen()
kdDebug() << "File size is zero. Evaluating backups" << endl;
for (int i=0; i!=20; i++)
{
- QFile backup( mFileName + "__" + QString::number(i) );
+ TQFile backup( mFileName + "__" + TQString::number(i) );
kdDebug() << "Evaluating" << backup.name() << " size: " << backup.size() << endl;
if ( backup.size() != 0 )
{
kdDebug() << "Restoring backup " << i << endl;
- const QString src = mFileName + "__" + QString::number(i);
- const QString dest = mFileName;
+ const TQString src = mFileName + "__" + TQString::number(i);
+ const TQString dest = mFileName;
// remove dest
- QFile::remove( dest );
+ TQFile::remove( dest );
// copy src to dest
if ( backup.open( IO_ReadOnly ) ) {
- const QByteArray data = backup.readAll();
+ const TQByteArray data = backup.readAll();
- QFile out( dest );
+ TQFile out( dest );
if ( out.open( IO_WriteOnly ) ) {
out.writeBlock( data );
out.close();
@@ -213,7 +213,7 @@ bool ResourceFile::load()
mAsynchronous = false;
- QFile file( mFileName );
+ TQFile file( mFileName );
if ( !file.open( IO_ReadOnly ) ) {
addressBook()->error( i18n( "Unable to open file '%1'." ).arg( mFileName ) );
return false;
@@ -245,25 +245,25 @@ bool ResourceFile::save( Ticket * )
kdDebug(5700) << "ResourceFile::save()" << endl;
// Only do the logrotate dance when the __0 file is not 0 bytes.
- QFile file( mFileName + "__0" );
+ TQFile file( mFileName + "__0" );
if ( file.size() != 0 ) {
- const QString last = mFileName + "__20";
+ const TQString last = mFileName + "__20";
kdDebug() << "deleting " << last << endl;
- QFile::remove( last );
+ TQFile::remove( last );
for (int i=19; i>=0; i--)
{
- const QString src = mFileName + "__" + QString::number(i);
- const QString dest = mFileName + "__" + QString::number(i+1);
+ const TQString src = mFileName + "__" + TQString::number(i);
+ const TQString dest = mFileName + "__" + TQString::number(i+1);
kdDebug() << "moving " << src << " -> " << dest << endl;
// copy src to dest
- QFile in( src );
+ TQFile in( src );
if ( in.open( IO_ReadOnly ) ) {
- const QByteArray data = in.readAll();
+ const TQByteArray data = in.readAll();
- QFile out( dest );
+ TQFile out( dest );
if ( out.open( IO_WriteOnly ) ) {
out.writeBlock( data );
out.close();
@@ -273,13 +273,13 @@ bool ResourceFile::save( Ticket * )
}
// remove src
- QFile::remove( src );
+ TQFile::remove( src );
}
} else
kdDebug() << "Not starting logrotate __0 is 0 bytes." << endl;
- QString extension = "__0";
- (void) KSaveFile::backupFile( mFileName, QString::null /*directory*/,
+ TQString extension = "__0";
+ (void) KSaveFile::backupFile( mFileName, TQString::null /*directory*/,
extension );
mDirWatch.stopScan();
@@ -309,14 +309,14 @@ bool ResourceFile::asyncSave( Ticket *ticket )
bool ok = save( ticket );
if ( !ok )
- QTimer::singleShot( 0, this, SLOT( emitSavingError() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( emitSavingError() ) );
else
- QTimer::singleShot( 0, this, SLOT( emitSavingFinished() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( emitSavingFinished() ) );
return ok;
}
-void ResourceFile::setFileName( const QString &fileName )
+void ResourceFile::setFileName( const TQString &fileName )
{
mDirWatch.stopScan();
if ( mDirWatch.contains( mFileName ) )
@@ -328,12 +328,12 @@ void ResourceFile::setFileName( const QString &fileName )
mDirWatch.startScan();
}
-QString ResourceFile::fileName() const
+TQString ResourceFile::fileName() const
{
return mFileName;
}
-void ResourceFile::setFormat( const QString &format )
+void ResourceFile::setFormat( const TQString &format )
{
mFormatName = format;
delete mFormat;
@@ -342,7 +342,7 @@ void ResourceFile::setFormat( const QString &format )
mFormat = factory->format( mFormatName );
}
-QString ResourceFile::format() const
+TQString ResourceFile::format() const
{
return mFormatName;
}
@@ -365,9 +365,9 @@ void ResourceFile::fileChanged()
void ResourceFile::removeAddressee( const Addressee &addr )
{
- QFile::remove( QFile::encodeName( locateLocal( "data", "kabc/photos/" ) + addr.uid() ) );
- QFile::remove( QFile::encodeName( locateLocal( "data", "kabc/logos/" ) + addr.uid() ) );
- QFile::remove( QFile::encodeName( locateLocal( "data", "kabc/sounds/" ) + addr.uid() ) );
+ TQFile::remove( TQFile::encodeName( locateLocal( "data", "kabc/photos/" ) + addr.uid() ) );
+ TQFile::remove( TQFile::encodeName( locateLocal( "data", "kabc/logos/" ) + addr.uid() ) );
+ TQFile::remove( TQFile::encodeName( locateLocal( "data", "kabc/sounds/" ) + addr.uid() ) );
mAddrMap.erase( addr.uid() );
}
diff --git a/kabc/plugins/file/resourcefile.h b/kabc/plugins/file/resourcefile.h
index 84dfc7cda..b44c22ec1 100644
--- a/kabc/plugins/file/resourcefile.h
+++ b/kabc/plugins/file/resourcefile.h
@@ -52,7 +52,7 @@ class KABC_EXPORT ResourceFile : public Resource
/**
Construct file resource on file @arg fileName using format @arg formatName.
*/
- ResourceFile( const QString &fileName, const QString &formatName = "vcard" );
+ ResourceFile( const TQString &fileName, const TQString &formatName = "vcard" );
/**
Destructor.
@@ -103,22 +103,22 @@ class KABC_EXPORT ResourceFile : public Resource
/**
Set name of file to be used for saving.
*/
- void setFileName( const QString & );
+ void setFileName( const TQString & );
/**
Return name of file used for loading and saving the address book.
*/
- QString fileName() const;
+ TQString fileName() const;
/**
Sets a new format by name.
*/
- void setFormat( const QString &name );
+ void setFormat( const TQString &name );
/**
Returns the format name.
*/
- QString format() const;
+ TQString format() const;
/**
Remove a addressee from its source.
@@ -136,14 +136,14 @@ class KABC_EXPORT ResourceFile : public Resource
void fileChanged();
protected:
- void init( const QString &fileName, const QString &format );
+ void init( const TQString &fileName, const TQString &format );
- bool lock( const QString &fileName );
- void unlock( const QString &fileName );
+ bool lock( const TQString &fileName );
+ void unlock( const TQString &fileName );
private:
- QString mFileName;
- QString mFormatName;
+ TQString mFileName;
+ TQString mFormatName;
FormatPlugin *mFormat;
diff --git a/kabc/plugins/file/resourcefileconfig.cpp b/kabc/plugins/file/resourcefileconfig.cpp
index a6d8ab4f9..92b07594f 100644
--- a/kabc/plugins/file/resourcefileconfig.cpp
+++ b/kabc/plugins/file/resourcefileconfig.cpp
@@ -18,8 +18,8 @@
Boston, MA 02110-1301, USA.
*/
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <kdebug.h>
#include <klocale.h>
@@ -36,30 +36,30 @@
using namespace KABC;
-ResourceFileConfig::ResourceFileConfig( QWidget* parent, const char* name )
+ResourceFileConfig::ResourceFileConfig( TQWidget* parent, const char* name )
: ConfigWidget( parent, name )
{
- QGridLayout *mainLayout = new QGridLayout( this, 2, 2, 0,
+ TQGridLayout *mainLayout = new TQGridLayout( this, 2, 2, 0,
KDialog::spacingHint() );
- QLabel *label = new QLabel( i18n( "Format:" ), this );
+ TQLabel *label = new TQLabel( i18n( "Format:" ), this );
mFormatBox = new KComboBox( this );
mainLayout->addWidget( label, 0, 0 );
mainLayout->addWidget( mFormatBox, 0, 1 );
- label = new QLabel( i18n( "Location:" ), this );
+ label = new TQLabel( i18n( "Location:" ), this );
mFileNameEdit = new KURLRequester( this );
- connect( mFileNameEdit, SIGNAL( textChanged( const QString & ) ),
- SLOT( checkFilePermissions( const QString & ) ) );
+ connect( mFileNameEdit, TQT_SIGNAL( textChanged( const TQString & ) ),
+ TQT_SLOT( checkFilePermissions( const TQString & ) ) );
mainLayout->addWidget( label, 1, 0 );
mainLayout->addWidget( mFileNameEdit, 1, 1 );
FormatFactory *factory = FormatFactory::self();
- QStringList formats = factory->formats();
- QStringList::Iterator it;
+ TQStringList formats = factory->formats();
+ TQStringList::Iterator it;
for ( it = formats.begin(); it != formats.end(); ++it ) {
FormatInfo *info = factory->info( *it );
if ( info ) {
@@ -108,11 +108,11 @@ void ResourceFileConfig::saveSettings( KRES::Resource *res )
resource->setFileName( mFileNameEdit->url() );
}
-void ResourceFileConfig::checkFilePermissions( const QString& fileName )
+void ResourceFileConfig::checkFilePermissions( const TQString& fileName )
{
// If file exist but is not writeable...
- if ( access( QFile::encodeName( fileName ), F_OK ) == 0 )
- emit setReadOnly( access( QFile::encodeName( fileName ), W_OK ) < 0 );
+ if ( access( TQFile::encodeName( fileName ), F_OK ) == 0 )
+ emit setReadOnly( access( TQFile::encodeName( fileName ), W_OK ) < 0 );
}
#include "resourcefileconfig.moc"
diff --git a/kabc/plugins/file/resourcefileconfig.h b/kabc/plugins/file/resourcefileconfig.h
index 3e92f0728..343a5623d 100644
--- a/kabc/plugins/file/resourcefileconfig.h
+++ b/kabc/plugins/file/resourcefileconfig.h
@@ -33,7 +33,7 @@ class KABC_EXPORT ResourceFileConfig : public KRES::ConfigWidget
Q_OBJECT
public:
- ResourceFileConfig( QWidget* parent = 0, const char* name = 0 );
+ ResourceFileConfig( TQWidget* parent = 0, const char* name = 0 );
void setEditMode( bool value );
@@ -42,14 +42,14 @@ public slots:
void saveSettings( KRES::Resource *resource );
protected slots:
- void checkFilePermissions( const QString& fileName );
+ void checkFilePermissions( const TQString& fileName );
private:
KComboBox* mFormatBox;
KURLRequester* mFileNameEdit;
bool mInEditMode;
- QStringList mFormatTypes;
+ TQStringList mFormatTypes;
};
}
diff --git a/kabc/plugins/ldapkio/resourceldapkio.cpp b/kabc/plugins/ldapkio/resourceldapkio.cpp
index 30b8ba7e0..df0baf455 100644
--- a/kabc/plugins/ldapkio/resourceldapkio.cpp
+++ b/kabc/plugins/ldapkio/resourceldapkio.cpp
@@ -20,9 +20,9 @@
*/
-#include <qapplication.h>
-#include <qbuffer.h>
-#include <qfile.h>
+#include <tqapplication.h>
+#include <tqbuffer.h>
+#include <tqfile.h>
#include <kdebug.h>
#include <kglobal.h>
@@ -44,28 +44,28 @@
using namespace KABC;
// Hack from Netaccess
-void qt_enter_modal( QWidget *widget );
-void qt_leave_modal( QWidget *widget );
+void qt_enter_modal( TQWidget *widget );
+void qt_leave_modal( TQWidget *widget );
class ResourceLDAPKIO::ResourceLDAPKIOPrivate
{
public:
LDIF mLdif;
bool mTLS,mSSL,mSubTree;
- QString mResultDn;
+ TQString mResultDn;
Addressee mAddr;
Address mAd;
Resource::Iterator mSaveIt;
bool mSASL;
- QString mMech;
- QString mRealm, mBindDN;
+ TQString mMech;
+ TQString mRealm, mBindDN;
LDAPUrl mLDAPUrl;
int mVer, mSizeLimit, mTimeLimit, mRDNPrefix;
int mError;
int mCachePolicy;
bool mReadOnly;
bool mAutoCache;
- QString mCacheDst;
+ TQString mCacheDst;
KTempFile *mTmp;
};
@@ -74,8 +74,8 @@ ResourceLDAPKIO::ResourceLDAPKIO( const KConfig *config )
{
d = new ResourceLDAPKIOPrivate;
if ( config ) {
- QMap<QString, QString> attrList;
- QStringList attributes = config->readListEntry( "LdapAttributes" );
+ TQMap<TQString, TQString> attrList;
+ TQStringList attributes = config->readListEntry( "LdapAttributes" );
for ( uint pos = 0; pos < attributes.count(); pos += 2 )
mAttributes.insert( attributes[ pos ], attributes[ pos + 1 ] );
@@ -122,8 +122,8 @@ ResourceLDAPKIO::~ResourceLDAPKIO()
void ResourceLDAPKIO::enter_loop()
{
- QWidget dummy(0,0,WType_Dialog | WShowModal);
- dummy.setFocusPolicy( QWidget::NoFocus );
+ TQWidget dummy(0,0,WType_Dialog | WShowModal);
+ dummy.setFocusPolicy( TQWidget::NoFocus );
qt_enter_modal(&dummy);
qApp->enter_loop();
qt_leave_modal(&dummy);
@@ -157,7 +157,7 @@ void ResourceLDAPKIO::listResult( KIO::Job *job)
qApp->exit_loop();
}
-QString ResourceLDAPKIO::findUid( const QString &uid )
+TQString ResourceLDAPKIO::findUid( const TQString &uid )
{
LDAPUrl url( d->mLDAPUrl );
KIO::UDSEntry entry;
@@ -173,18 +173,18 @@ QString ResourceLDAPKIO::findUid( const QString &uid )
KIO::ListJob * listJob = KIO::listDir( url, false /* no GUI */ );
connect( listJob,
- SIGNAL( entries( KIO::Job *, const KIO::UDSEntryList& ) ),
- SLOT( entries( KIO::Job*, const KIO::UDSEntryList& ) ) );
- connect( listJob, SIGNAL( result( KIO::Job* ) ),
- this, SLOT( listResult( KIO::Job* ) ) );
+ TQT_SIGNAL( entries( KIO::Job *, const KIO::UDSEntryList& ) ),
+ TQT_SLOT( entries( KIO::Job*, const KIO::UDSEntryList& ) ) );
+ connect( listJob, TQT_SIGNAL( result( KIO::Job* ) ),
+ this, TQT_SLOT( listResult( KIO::Job* ) ) );
enter_loop();
return d->mResultDn;
}
-QCString ResourceLDAPKIO::addEntry( const QString &attr, const QString &value, bool mod )
+TQCString ResourceLDAPKIO::addEntry( const TQString &attr, const TQString &value, bool mod )
{
- QCString tmp;
+ TQCString tmp;
if ( !attr.isEmpty() ) {
if ( mod ) tmp += LDIF::assembleLine( "replace", attr ) + "\n";
tmp += LDIF::assembleLine( attr, value ) + "\n";
@@ -193,12 +193,12 @@ QCString ResourceLDAPKIO::addEntry( const QString &attr, const QString &value, b
return ( tmp );
}
-bool ResourceLDAPKIO::AddresseeToLDIF( QByteArray &ldif, const Addressee &addr,
- const QString &olddn )
+bool ResourceLDAPKIO::AddresseeToLDIF( TQByteArray &ldif, const Addressee &addr,
+ const TQString &olddn )
{
- QCString tmp;
- QString dn;
- QByteArray data;
+ TQCString tmp;
+ TQString dn;
+ TQByteArray data;
bool mod = false;
if ( olddn.isEmpty() ) {
@@ -237,8 +237,8 @@ bool ResourceLDAPKIO::AddresseeToLDIF( QByteArray &ldif, const Addressee &addr,
if ( mod ) tmp += "changetype: modify\n";
if ( !mod ) {
tmp += "objectClass: top\n";
- QStringList obclass = QStringList::split( ',', mAttributes[ "objectClass" ] );
- for ( QStringList::iterator it = obclass.begin(); it != obclass.end(); it++ ) {
+ TQStringList obclass = TQStringList::split( ',', mAttributes[ "objectClass" ] );
+ for ( TQStringList::iterator it = obclass.begin(); it != obclass.end(); it++ ) {
tmp += LDIF::assembleLine( "objectClass", *it ) + "\n";
}
}
@@ -273,8 +273,8 @@ bool ResourceLDAPKIO::AddresseeToLDIF( QByteArray &ldif, const Addressee &addr,
tmp += addEntry( mAttributes[ "postalcode" ], ad.postalCode(), mod );
}
- QStringList emails = addr.emails();
- QStringList::ConstIterator mailIt = emails.begin();
+ TQStringList emails = addr.emails();
+ TQStringList::ConstIterator mailIt = emails.begin();
if ( !mAttributes[ "mail" ].isEmpty() ) {
if ( mod ) tmp +=
@@ -296,8 +296,8 @@ bool ResourceLDAPKIO::AddresseeToLDIF( QByteArray &ldif, const Addressee &addr,
}
if ( !mAttributes[ "jpegPhoto" ].isEmpty() ) {
- QByteArray pic;
- QBuffer buffer( pic );
+ TQByteArray pic;
+ TQBuffer buffer( pic );
buffer.open( IO_WriteOnly );
addr.photo().data().save( &buffer, "JPEG" );
@@ -308,7 +308,7 @@ bool ResourceLDAPKIO::AddresseeToLDIF( QByteArray &ldif, const Addressee &addr,
}
tmp += "\n";
- kdDebug(7125) << "ldif: " << QString::fromUtf8(tmp) << endl;
+ kdDebug(7125) << "ldif: " << TQString::fromUtf8(tmp) << endl;
ldif = tmp;
return true;
}
@@ -386,8 +386,8 @@ void ResourceLDAPKIO::init()
d->mLDAPUrl.setDn( mDn );
if (!mAttributes.empty()) {
- QMap<QString,QString>::Iterator it;
- QStringList attr;
+ TQMap<TQString,TQString>::Iterator it;
+ TQStringList attr;
for ( it = mAttributes.begin(); it != mAttributes.end(); ++it ) {
if ( !it.data().isEmpty() && it.key() != "objectClass" )
attr.append( it.data() );
@@ -400,11 +400,11 @@ void ResourceLDAPKIO::init()
d->mLDAPUrl.setFilter( mFilter );
d->mLDAPUrl.setExtension( "x-dir", "base" );
if ( d->mTLS ) d->mLDAPUrl.setExtension( "x-tls", "" );
- d->mLDAPUrl.setExtension( "x-ver", QString::number( d->mVer ) );
+ d->mLDAPUrl.setExtension( "x-ver", TQString::number( d->mVer ) );
if ( d->mSizeLimit )
- d->mLDAPUrl.setExtension( "x-sizelimit", QString::number( d->mSizeLimit ) );
+ d->mLDAPUrl.setExtension( "x-sizelimit", TQString::number( d->mSizeLimit ) );
if ( d->mTimeLimit )
- d->mLDAPUrl.setExtension( "x-timelimit", QString::number( d->mTimeLimit ) );
+ d->mLDAPUrl.setExtension( "x-timelimit", TQString::number( d->mTimeLimit ) );
if ( d->mSASL ) {
d->mLDAPUrl.setExtension( "x-sasl", "" );
if ( !d->mBindDN.isEmpty() ) d->mLDAPUrl.setExtension( "bindname", d->mBindDN );
@@ -442,8 +442,8 @@ void ResourceLDAPKIO::writeConfig( KConfig *config )
config->writeEntry( "LdapCachePolicy", d->mCachePolicy );
config->writeEntry( "LdapAutoCache", d->mAutoCache );
- QStringList attributes;
- QMap<QString, QString>::Iterator it;
+ TQStringList attributes;
+ TQMap<TQString, TQString>::Iterator it;
for ( it = mAttributes.begin(); it != mAttributes.end(); ++it )
attributes << it.key() << it.data();
@@ -487,7 +487,7 @@ void ResourceLDAPKIO::activateCache()
{
if ( d->mTmp && d->mError == 0 ) {
d->mTmp->close();
- rename( QFile::encodeName( d->mTmp->name() ), QFile::encodeName( d->mCacheDst ) );
+ rename( TQFile::encodeName( d->mTmp->name() ), TQFile::encodeName( d->mCacheDst ) );
}
if ( d->mTmp ) {
delete d->mTmp;
@@ -511,8 +511,8 @@ KIO::Job *ResourceLDAPKIO::loadFromCache()
KURL url( d->mCacheDst );
job = KIO::get( url, true, false );
- connect( job, SIGNAL( data( KIO::Job*, const QByteArray& ) ),
- this, SLOT( data( KIO::Job*, const QByteArray& ) ) );
+ connect( job, TQT_SIGNAL( data( KIO::Job*, const TQByteArray& ) ),
+ this, TQT_SLOT( data( KIO::Job*, const TQByteArray& ) ) );
}
return job;
}
@@ -535,17 +535,17 @@ bool ResourceLDAPKIO::load()
createCache();
if ( d->mCachePolicy != Cache_Always ) {
job = KIO::get( d->mLDAPUrl, true, false );
- connect( job, SIGNAL( data( KIO::Job*, const QByteArray& ) ),
- this, SLOT( data( KIO::Job*, const QByteArray& ) ) );
- connect( job, SIGNAL( result( KIO::Job* ) ),
- this, SLOT( syncLoadSaveResult( KIO::Job* ) ) );
+ connect( job, TQT_SIGNAL( data( KIO::Job*, const TQByteArray& ) ),
+ this, TQT_SLOT( data( KIO::Job*, const TQByteArray& ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job* ) ),
+ this, TQT_SLOT( syncLoadSaveResult( KIO::Job* ) ) );
enter_loop();
}
job = loadFromCache();
if ( job ) {
- connect( job, SIGNAL( result( KIO::Job* ) ),
- this, SLOT( syncLoadSaveResult( KIO::Job* ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job* ) ),
+ this, TQT_SLOT( syncLoadSaveResult( KIO::Job* ) ) );
enter_loop();
}
if ( mErrorMsg.isEmpty() ) {
@@ -572,17 +572,17 @@ bool ResourceLDAPKIO::asyncLoad()
createCache();
if ( d->mCachePolicy != Cache_Always ) {
KIO::Job *job = KIO::get( d->mLDAPUrl, true, false );
- connect( job, SIGNAL( data( KIO::Job*, const QByteArray& ) ),
- this, SLOT( data( KIO::Job*, const QByteArray& ) ) );
- connect( job, SIGNAL( result( KIO::Job* ) ),
- this, SLOT( result( KIO::Job* ) ) );
+ connect( job, TQT_SIGNAL( data( KIO::Job*, const TQByteArray& ) ),
+ this, TQT_SLOT( data( KIO::Job*, const TQByteArray& ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job* ) ),
+ this, TQT_SLOT( result( KIO::Job* ) ) );
} else {
result( NULL );
}
return true;
}
-void ResourceLDAPKIO::data( KIO::Job *, const QByteArray &data )
+void ResourceLDAPKIO::data( KIO::Job *, const TQByteArray &data )
{
if ( data.size() ) {
d->mLdif.setLDIF( data );
@@ -594,8 +594,8 @@ void ResourceLDAPKIO::data( KIO::Job *, const QByteArray &data )
}
LDIF::ParseVal ret;
- QString name;
- QByteArray value;
+ TQString name;
+ TQByteArray value;
do {
ret = d->mLdif.nextItem();
switch ( ret ) {
@@ -607,60 +607,60 @@ void ResourceLDAPKIO::data( KIO::Job *, const QByteArray &data )
value = d->mLdif.val();
if ( name == mAttributes[ "commonName" ].lower() ) {
if ( !d->mAddr.formattedName().isEmpty() ) {
- QString fn = d->mAddr.formattedName();
- d->mAddr.setNameFromString( QString::fromUtf8( value, value.size() ) );
+ TQString fn = d->mAddr.formattedName();
+ d->mAddr.setNameFromString( TQString::fromUtf8( value, value.size() ) );
d->mAddr.setFormattedName( fn );
} else
- d->mAddr.setNameFromString( QString::fromUtf8( value, value.size() ) );
+ d->mAddr.setNameFromString( TQString::fromUtf8( value, value.size() ) );
} else if ( name == mAttributes[ "formattedName" ].lower() ) {
- d->mAddr.setFormattedName( QString::fromUtf8( value, value.size() ) );
+ d->mAddr.setFormattedName( TQString::fromUtf8( value, value.size() ) );
} else if ( name == mAttributes[ "givenName" ].lower() ) {
- d->mAddr.setGivenName( QString::fromUtf8( value, value.size() ) );
+ d->mAddr.setGivenName( TQString::fromUtf8( value, value.size() ) );
} else if ( name == mAttributes[ "mail" ].lower() ) {
- d->mAddr.insertEmail( QString::fromUtf8( value, value.size() ), true );
+ d->mAddr.insertEmail( TQString::fromUtf8( value, value.size() ), true );
} else if ( name == mAttributes[ "mailAlias" ].lower() ) {
- d->mAddr.insertEmail( QString::fromUtf8( value, value.size() ), false );
+ d->mAddr.insertEmail( TQString::fromUtf8( value, value.size() ), false );
} else if ( name == mAttributes[ "phoneNumber" ].lower() ) {
PhoneNumber phone;
- phone.setNumber( QString::fromUtf8( value, value.size() ) );
+ phone.setNumber( TQString::fromUtf8( value, value.size() ) );
d->mAddr.insertPhoneNumber( phone );
} else if ( name == mAttributes[ "telephoneNumber" ].lower() ) {
- PhoneNumber phone( QString::fromUtf8( value, value.size() ),
+ PhoneNumber phone( TQString::fromUtf8( value, value.size() ),
PhoneNumber::Work );
d->mAddr.insertPhoneNumber( phone );
} else if ( name == mAttributes[ "facsimileTelephoneNumber" ].lower() ) {
- PhoneNumber phone( QString::fromUtf8( value, value.size() ),
+ PhoneNumber phone( TQString::fromUtf8( value, value.size() ),
PhoneNumber::Fax );
d->mAddr.insertPhoneNumber( phone );
} else if ( name == mAttributes[ "mobile" ].lower() ) {
- PhoneNumber phone( QString::fromUtf8( value, value.size() ),
+ PhoneNumber phone( TQString::fromUtf8( value, value.size() ),
PhoneNumber::Cell );
d->mAddr.insertPhoneNumber( phone );
} else if ( name == mAttributes[ "pager" ].lower() ) {
- PhoneNumber phone( QString::fromUtf8( value, value.size() ),
+ PhoneNumber phone( TQString::fromUtf8( value, value.size() ),
PhoneNumber::Pager );
d->mAddr.insertPhoneNumber( phone );
} else if ( name == mAttributes[ "description" ].lower() ) {
- d->mAddr.setNote( QString::fromUtf8( value, value.size() ) );
+ d->mAddr.setNote( TQString::fromUtf8( value, value.size() ) );
} else if ( name == mAttributes[ "title" ].lower() ) {
- d->mAddr.setTitle( QString::fromUtf8( value, value.size() ) );
+ d->mAddr.setTitle( TQString::fromUtf8( value, value.size() ) );
} else if ( name == mAttributes[ "street" ].lower() ) {
- d->mAd.setStreet( QString::fromUtf8( value, value.size() ) );
+ d->mAd.setStreet( TQString::fromUtf8( value, value.size() ) );
} else if ( name == mAttributes[ "state" ].lower() ) {
- d->mAd.setRegion( QString::fromUtf8( value, value.size() ) );
+ d->mAd.setRegion( TQString::fromUtf8( value, value.size() ) );
} else if ( name == mAttributes[ "city" ].lower() ) {
- d->mAd.setLocality( QString::fromUtf8( value, value.size() ) );
+ d->mAd.setLocality( TQString::fromUtf8( value, value.size() ) );
} else if ( name == mAttributes[ "postalcode" ].lower() ) {
- d->mAd.setPostalCode( QString::fromUtf8( value, value.size() ) );
+ d->mAd.setPostalCode( TQString::fromUtf8( value, value.size() ) );
} else if ( name == mAttributes[ "organization" ].lower() ) {
- d->mAddr.setOrganization( QString::fromUtf8( value, value.size() ) );
+ d->mAddr.setOrganization( TQString::fromUtf8( value, value.size() ) );
} else if ( name == mAttributes[ "familyName" ].lower() ) {
- d->mAddr.setFamilyName( QString::fromUtf8( value, value.size() ) );
+ d->mAddr.setFamilyName( TQString::fromUtf8( value, value.size() ) );
} else if ( name == mAttributes[ "uid" ].lower() ) {
- d->mAddr.setUid( QString::fromUtf8( value, value.size() ) );
+ d->mAddr.setUid( TQString::fromUtf8( value, value.size() ) );
} else if ( name == mAttributes[ "jpegPhoto" ].lower() ) {
KABC::Picture photo;
- QImage img( value );
+ TQImage img( value );
if ( !img.isNull() ) {
photo.setData( img );
photo.setType( "image/jpeg" );
@@ -714,8 +714,8 @@ void ResourceLDAPKIO::result( KIO::Job *job )
KIO::Job *cjob;
cjob = loadFromCache();
if ( cjob ) {
- connect( cjob, SIGNAL( result( KIO::Job* ) ),
- this, SLOT( loadCacheResult( KIO::Job* ) ) );
+ connect( cjob, TQT_SIGNAL( result( KIO::Job* ) ),
+ this, TQT_SLOT( loadCacheResult( KIO::Job* ) ) );
} else {
if ( !mErrorMsg.isEmpty() )
emit loadingError( this, mErrorMsg );
@@ -730,10 +730,10 @@ bool ResourceLDAPKIO::save( Ticket* )
d->mSaveIt = begin();
KIO::Job *job = KIO::put( d->mLDAPUrl, -1, true, false, false );
- connect( job, SIGNAL( dataReq( KIO::Job*, QByteArray& ) ),
- this, SLOT( saveData( KIO::Job*, QByteArray& ) ) );
- connect( job, SIGNAL( result( KIO::Job* ) ),
- this, SLOT( syncLoadSaveResult( KIO::Job* ) ) );
+ connect( job, TQT_SIGNAL( dataReq( KIO::Job*, TQByteArray& ) ),
+ this, TQT_SLOT( saveData( KIO::Job*, TQByteArray& ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job* ) ),
+ this, TQT_SLOT( syncLoadSaveResult( KIO::Job* ) ) );
enter_loop();
if ( mErrorMsg.isEmpty() ) {
kdDebug(7125) << "ResourceLDAPKIO save ok!" << endl;
@@ -750,10 +750,10 @@ bool ResourceLDAPKIO::asyncSave( Ticket* )
kdDebug(7125) << "ResourceLDAPKIO asyncSave" << endl;
d->mSaveIt = begin();
KIO::Job *job = KIO::put( d->mLDAPUrl, -1, true, false, false );
- connect( job, SIGNAL( dataReq( KIO::Job*, QByteArray& ) ),
- this, SLOT( saveData( KIO::Job*, QByteArray& ) ) );
- connect( job, SIGNAL( result( KIO::Job* ) ),
- this, SLOT( saveResult( KIO::Job* ) ) );
+ connect( job, TQT_SIGNAL( dataReq( KIO::Job*, TQByteArray& ) ),
+ this, TQT_SLOT( saveData( KIO::Job*, TQByteArray& ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job* ) ),
+ this, TQT_SLOT( saveResult( KIO::Job* ) ) );
return true;
}
@@ -778,7 +778,7 @@ void ResourceLDAPKIO::saveResult( KIO::Job *job )
emit savingFinished( this );
}
-void ResourceLDAPKIO::saveData( KIO::Job*, QByteArray& data )
+void ResourceLDAPKIO::saveData( KIO::Job*, TQByteArray& data )
{
while ( d->mSaveIt != end() &&
!(*d->mSaveIt).changed() ) d->mSaveIt++;
@@ -792,7 +792,7 @@ void ResourceLDAPKIO::saveData( KIO::Job*, QByteArray& data )
kdDebug(7125) << "ResourceLDAPKIO saveData: " << (*d->mSaveIt).assembledName() << endl;
AddresseeToLDIF( data, *d->mSaveIt, findUid( (*d->mSaveIt).uid() ) );
-// kdDebug(7125) << "ResourceLDAPKIO save LDIF: " << QString::fromUtf8(data) << endl;
+// kdDebug(7125) << "ResourceLDAPKIO save LDIF: " << TQString::fromUtf8(data) << endl;
// mark as unchanged
(*d->mSaveIt).setChanged( false );
@@ -801,7 +801,7 @@ void ResourceLDAPKIO::saveData( KIO::Job*, QByteArray& data )
void ResourceLDAPKIO::removeAddressee( const Addressee& addr )
{
- QString dn = findUid( addr.uid() );
+ TQString dn = findUid( addr.uid() );
kdDebug(7125) << "ResourceLDAPKIO: removeAddressee: " << dn << endl;
@@ -823,42 +823,42 @@ void ResourceLDAPKIO::removeAddressee( const Addressee& addr )
}
-void ResourceLDAPKIO::setUser( const QString &user )
+void ResourceLDAPKIO::setUser( const TQString &user )
{
mUser = user;
}
-QString ResourceLDAPKIO::user() const
+TQString ResourceLDAPKIO::user() const
{
return mUser;
}
-void ResourceLDAPKIO::setPassword( const QString &password )
+void ResourceLDAPKIO::setPassword( const TQString &password )
{
mPassword = password;
}
-QString ResourceLDAPKIO::password() const
+TQString ResourceLDAPKIO::password() const
{
return mPassword;
}
-void ResourceLDAPKIO::setDn( const QString &dn )
+void ResourceLDAPKIO::setDn( const TQString &dn )
{
mDn = dn;
}
-QString ResourceLDAPKIO::dn() const
+TQString ResourceLDAPKIO::dn() const
{
return mDn;
}
-void ResourceLDAPKIO::setHost( const QString &host )
+void ResourceLDAPKIO::setHost( const TQString &host )
{
mHost = host;
}
-QString ResourceLDAPKIO::host() const
+TQString ResourceLDAPKIO::host() const
{
return mHost;
}
@@ -903,12 +903,12 @@ int ResourceLDAPKIO::timeLimit()
return d->mTimeLimit;
}
-void ResourceLDAPKIO::setFilter( const QString &filter )
+void ResourceLDAPKIO::setFilter( const TQString &filter )
{
mFilter = filter;
}
-QString ResourceLDAPKIO::filter() const
+TQString ResourceLDAPKIO::filter() const
{
return mFilter;
}
@@ -952,12 +952,12 @@ bool ResourceLDAPKIO::isSubTree() const
return d->mSubTree;
}
-void ResourceLDAPKIO::setAttributes( const QMap<QString, QString> &attributes )
+void ResourceLDAPKIO::setAttributes( const TQMap<TQString, TQString> &attributes )
{
mAttributes = attributes;
}
-QMap<QString, QString> ResourceLDAPKIO::attributes() const
+TQMap<TQString, TQString> ResourceLDAPKIO::attributes() const
{
return mAttributes;
}
@@ -982,32 +982,32 @@ bool ResourceLDAPKIO::isSASL() const
return d->mSASL;
}
-void ResourceLDAPKIO::setMech( const QString &mech )
+void ResourceLDAPKIO::setMech( const TQString &mech )
{
d->mMech = mech;
}
-QString ResourceLDAPKIO::mech() const
+TQString ResourceLDAPKIO::mech() const
{
return d->mMech;
}
-void ResourceLDAPKIO::setRealm( const QString &realm )
+void ResourceLDAPKIO::setRealm( const TQString &realm )
{
d->mRealm = realm;
}
-QString ResourceLDAPKIO::realm() const
+TQString ResourceLDAPKIO::realm() const
{
return d->mRealm;
}
-void ResourceLDAPKIO::setBindDN( const QString &binddn )
+void ResourceLDAPKIO::setBindDN( const TQString &binddn )
{
d->mBindDN = binddn;
}
-QString ResourceLDAPKIO::bindDN() const
+TQString ResourceLDAPKIO::bindDN() const
{
return d->mBindDN;
}
@@ -1032,7 +1032,7 @@ bool ResourceLDAPKIO::autoCache()
return d->mAutoCache;
}
-QString ResourceLDAPKIO::cacheDst() const
+TQString ResourceLDAPKIO::cacheDst() const
{
return d->mCacheDst;
}
diff --git a/kabc/plugins/ldapkio/resourceldapkio.h b/kabc/plugins/ldapkio/resourceldapkio.h
index bd72a9b11..2b5685fdc 100644
--- a/kabc/plugins/ldapkio/resourceldapkio.h
+++ b/kabc/plugins/ldapkio/resourceldapkio.h
@@ -62,23 +62,23 @@ class KABC_EXPORT ResourceLDAPKIO : public Resource
virtual void removeAddressee( const Addressee& addr );
- void setUser( const QString &user );
- QString user() const;
+ void setUser( const TQString &user );
+ TQString user() const;
- void setPassword( const QString &password );
- QString password() const;
+ void setPassword( const TQString &password );
+ TQString password() const;
- void setRealm( const QString &realm );
- QString realm() const;
+ void setRealm( const TQString &realm );
+ TQString realm() const;
- void setBindDN( const QString &binddn );
- QString bindDN() const;
+ void setBindDN( const TQString &binddn );
+ TQString bindDN() const;
- void setDn( const QString &dn );
- QString dn() const;
+ void setDn( const TQString &dn );
+ TQString dn() const;
- void setHost( const QString &host );
- QString host() const;
+ void setHost( const TQString &host );
+ TQString host() const;
void setPort( int port );
int port() const;
@@ -92,14 +92,14 @@ class KABC_EXPORT ResourceLDAPKIO : public Resource
void setTimeLimit( int timelimit );
int timeLimit();
- void setFilter( const QString &filter );
- QString filter() const;
+ void setFilter( const TQString &filter );
+ TQString filter() const;
void setIsAnonymous( bool value );
bool isAnonymous() const;
- void setAttributes( const QMap<QString, QString> &attributes );
- QMap<QString, QString> attributes() const;
+ void setAttributes( const TQMap<TQString, TQString> &attributes );
+ TQMap<TQString, TQString> attributes() const;
void setRDNPrefix( int value );
int RDNPrefix() const;
@@ -116,8 +116,8 @@ class KABC_EXPORT ResourceLDAPKIO : public Resource
void setIsSASL( bool value );
bool isSASL() const ;
- void setMech( const QString &mech );
- QString mech() const;
+ void setMech( const TQString &mech );
+ TQString mech() const;
void setCachePolicy( int pol );
int cachePolicy() const;
@@ -125,42 +125,42 @@ class KABC_EXPORT ResourceLDAPKIO : public Resource
void setAutoCache( bool value );
bool autoCache();
- QString cacheDst() const;
+ TQString cacheDst() const;
protected slots:
void entries( KIO::Job*, const KIO::UDSEntryList& );
- void data( KIO::Job*, const QByteArray& );
+ void data( KIO::Job*, const TQByteArray& );
void result( KIO::Job* );
void listResult( KIO::Job* );
void syncLoadSaveResult( KIO::Job* );
void saveResult( KIO::Job* );
- void saveData( KIO::Job*, QByteArray& );
+ void saveData( KIO::Job*, TQByteArray& );
void loadCacheResult( KIO::Job* );
private:
- QString mUser;
- QString mPassword;
- QString mDn;
- QString mHost;
- QString mFilter;
+ TQString mUser;
+ TQString mPassword;
+ TQString mDn;
+ TQString mHost;
+ TQString mFilter;
int mPort;
bool mAnonymous;
- QMap<QString, QString> mAttributes;
+ TQMap<TQString, TQString> mAttributes;
KURL mLDAPUrl;
int mGetCounter; //KDE 4: remove
bool mErrorOccured; //KDE 4: remove
- QString mErrorMsg;
- QMap<KIO::Job*, QByteArray> mJobMap; //KDE 4: remove
+ TQString mErrorMsg;
+ TQMap<KIO::Job*, TQByteArray> mJobMap; //KDE 4: remove
KIO::Job *loadFromCache();
void createCache();
void activateCache();
void enter_loop();
- QCString addEntry( const QString &attr, const QString &value, bool mod );
- QString findUid( const QString &uid );
- bool AddresseeToLDIF( QByteArray &ldif, const Addressee &addr,
- const QString &olddn );
+ TQCString addEntry( const TQString &attr, const TQString &value, bool mod );
+ TQString findUid( const TQString &uid );
+ bool AddresseeToLDIF( TQByteArray &ldif, const Addressee &addr,
+ const TQString &olddn );
class ResourceLDAPKIOPrivate;
ResourceLDAPKIOPrivate *d;
diff --git a/kabc/plugins/ldapkio/resourceldapkioconfig.cpp b/kabc/plugins/ldapkio/resourceldapkioconfig.cpp
index ae54ab8c3..271328525 100644
--- a/kabc/plugins/ldapkio/resourceldapkioconfig.cpp
+++ b/kabc/plugins/ldapkio/resourceldapkioconfig.cpp
@@ -17,17 +17,17 @@
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
-#include <qapplication.h>
-
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qspinbox.h>
-#include <qvbox.h>
-#include <qvgroupbox.h>
-#include <qhbuttongroup.h>
-#include <qradiobutton.h>
+#include <tqapplication.h>
+
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqspinbox.h>
+#include <tqvbox.h>
+#include <tqvgroupbox.h>
+#include <tqhbuttongroup.h>
+#include <tqradiobutton.h>
#include <kaccelmanager.h>
#include <kcombobox.h>
@@ -45,21 +45,21 @@
using namespace KABC;
-ResourceLDAPKIOConfig::ResourceLDAPKIOConfig( QWidget* parent, const char* name )
+ResourceLDAPKIOConfig::ResourceLDAPKIOConfig( TQWidget* parent, const char* name )
: KRES::ConfigWidget( parent, name )
{
- QBoxLayout *mainLayout = new QVBoxLayout( this );
+ TQBoxLayout *mainLayout = new TQVBoxLayout( this );
mainLayout->setAutoAdd( true );
cfg = new LdapConfigWidget( LdapConfigWidget::W_ALL, this );
- mSubTree = new QCheckBox( i18n( "Sub-tree query" ), this );
- QHBox *box = new QHBox( this );
+ mSubTree = new TQCheckBox( i18n( "Sub-tree query" ), this );
+ TQHBox *box = new TQHBox( this );
box->setSpacing( KDialog::spacingHint() );
- mEditButton = new QPushButton( i18n( "Edit Attributes..." ), box );
- mCacheButton = new QPushButton( i18n( "Offline Use..." ), box );
+ mEditButton = new TQPushButton( i18n( "Edit Attributes..." ), box );
+ mCacheButton = new TQPushButton( i18n( "Offline Use..." ), box );
- connect( mEditButton, SIGNAL( clicked() ), SLOT( editAttributes() ) );
- connect( mCacheButton, SIGNAL( clicked() ), SLOT( editCache() ) );
+ connect( mEditButton, TQT_SIGNAL( clicked() ), TQT_SLOT( editAttributes() ) );
+ connect( mCacheButton, TQT_SIGNAL( clicked() ), TQT_SLOT( editCache() ) );
}
void ResourceLDAPKIOConfig::loadSettings( KRES::Resource *res )
@@ -143,13 +143,13 @@ void ResourceLDAPKIOConfig::editAttributes()
void ResourceLDAPKIOConfig::editCache()
{
LDAPUrl src;
- QStringList attr;
+ TQStringList attr;
src = cfg->url();
src.setScope( mSubTree->isChecked() ? LDAPUrl::Sub : LDAPUrl::One );
if (!mAttributes.empty()) {
- QMap<QString,QString>::Iterator it;
- QStringList attr;
+ TQMap<TQString,TQString>::Iterator it;
+ TQStringList attr;
for ( it = mAttributes.begin(); it != mAttributes.end(); ++it ) {
if ( !it.data().isEmpty() && it.key() != "objectClass" )
attr.append( it.data() );
@@ -165,34 +165,34 @@ void ResourceLDAPKIOConfig::editCache()
}
-AttributesDialog::AttributesDialog( const QMap<QString, QString> &attributes,
+AttributesDialog::AttributesDialog( const TQMap<TQString, TQString> &attributes,
int rdnprefix,
- QWidget *parent, const char *name )
+ TQWidget *parent, const char *name )
: KDialogBase( Plain, i18n( "Attributes Configuration" ), Ok | Cancel,
Ok, parent, name, true, true )
{
mNameDict.setAutoDelete( true );
- mNameDict.insert( "objectClass", new QString( i18n( "Object classes" ) ) );
- mNameDict.insert( "commonName", new QString( i18n( "Common name" ) ) );
- mNameDict.insert( "formattedName", new QString( i18n( "Formatted name" ) ) );
- mNameDict.insert( "familyName", new QString( i18n( "Family name" ) ) );
- mNameDict.insert( "givenName", new QString( i18n( "Given name" ) ) );
- mNameDict.insert( "organization", new QString( i18n( "Organization" ) ) );
- mNameDict.insert( "title", new QString( i18n( "Title" ) ) );
- mNameDict.insert( "street", new QString( i18n( "Street" ) ) );
- mNameDict.insert( "state", new QString( i18n( "State" ) ) );
- mNameDict.insert( "city", new QString( i18n( "City" ) ) );
- mNameDict.insert( "postalcode", new QString( i18n( "Postal code" ) ) );
- mNameDict.insert( "mail", new QString( i18n( "Email" ) ) );
- mNameDict.insert( "mailAlias", new QString( i18n( "Email alias" ) ) );
- mNameDict.insert( "phoneNumber", new QString( i18n( "Telephone number" ) ) );
- mNameDict.insert( "telephoneNumber", new QString( i18n( "Work telephone number" ) ) );
- mNameDict.insert( "facsimileTelephoneNumber", new QString( i18n( "Fax number" ) ) );
- mNameDict.insert( "mobile", new QString( i18n( "Cell phone number" ) ) );
- mNameDict.insert( "pager", new QString( i18n( "Pager" ) ) );
- mNameDict.insert( "description", new QString( i18n( "Note" ) ) );
- mNameDict.insert( "uid", new QString( i18n( "UID" ) ) );
- mNameDict.insert( "jpegPhoto", new QString( i18n( "Photo" ) ) );
+ mNameDict.insert( "objectClass", new TQString( i18n( "Object classes" ) ) );
+ mNameDict.insert( "commonName", new TQString( i18n( "Common name" ) ) );
+ mNameDict.insert( "formattedName", new TQString( i18n( "Formatted name" ) ) );
+ mNameDict.insert( "familyName", new TQString( i18n( "Family name" ) ) );
+ mNameDict.insert( "givenName", new TQString( i18n( "Given name" ) ) );
+ mNameDict.insert( "organization", new TQString( i18n( "Organization" ) ) );
+ mNameDict.insert( "title", new TQString( i18n( "Title" ) ) );
+ mNameDict.insert( "street", new TQString( i18n( "Street" ) ) );
+ mNameDict.insert( "state", new TQString( i18n( "State" ) ) );
+ mNameDict.insert( "city", new TQString( i18n( "City" ) ) );
+ mNameDict.insert( "postalcode", new TQString( i18n( "Postal code" ) ) );
+ mNameDict.insert( "mail", new TQString( i18n( "Email" ) ) );
+ mNameDict.insert( "mailAlias", new TQString( i18n( "Email alias" ) ) );
+ mNameDict.insert( "phoneNumber", new TQString( i18n( "Telephone number" ) ) );
+ mNameDict.insert( "telephoneNumber", new TQString( i18n( "Work telephone number" ) ) );
+ mNameDict.insert( "facsimileTelephoneNumber", new TQString( i18n( "Fax number" ) ) );
+ mNameDict.insert( "mobile", new TQString( i18n( "Cell phone number" ) ) );
+ mNameDict.insert( "pager", new TQString( i18n( "Pager" ) ) );
+ mNameDict.insert( "description", new TQString( i18n( "Note" ) ) );
+ mNameDict.insert( "uid", new TQString( i18n( "UID" ) ) );
+ mNameDict.insert( "jpegPhoto", new TQString( i18n( "Photo" ) ) );
// default map
mDefaultMap.insert( "objectClass", "inetOrgPerson" );
@@ -218,7 +218,7 @@ AttributesDialog::AttributesDialog( const QMap<QString, QString> &attributes,
mDefaultMap.insert( "jpegPhoto", "jpegPhoto" );
// overwrite the default values here
- QMap<QString, QString> kolabMap, netscapeMap, evolutionMap, outlookMap;
+ TQMap<TQString, TQString> kolabMap, netscapeMap, evolutionMap, outlookMap;
// kolab
kolabMap.insert( "formattedName", "display-name" );
@@ -233,11 +233,11 @@ AttributesDialog::AttributesDialog( const QMap<QString, QString> &attributes,
mMapList.append( evolutionMap );
mMapList.append( outlookMap );
- QFrame *page = plainPage();
- QGridLayout *layout = new QGridLayout( page, 4, ( attributes.count() + 4 ) >> 1,
+ TQFrame *page = plainPage();
+ TQGridLayout *layout = new TQGridLayout( page, 4, ( attributes.count() + 4 ) >> 1,
0, spacingHint() );
- QLabel *label = new QLabel( i18n( "Template:" ), page );
+ TQLabel *label = new TQLabel( i18n( "Template:" ), page );
layout->addWidget( label, 0, 0 );
mMapCombo = new KComboBox( page );
layout->addWidget( mMapCombo, 0, 1 );
@@ -247,9 +247,9 @@ AttributesDialog::AttributesDialog( const QMap<QString, QString> &attributes,
mMapCombo->insertItem( i18n( "Netscape" ) );
mMapCombo->insertItem( i18n( "Evolution" ) );
mMapCombo->insertItem( i18n( "Outlook" ) );
- connect( mMapCombo, SIGNAL( activated( int ) ), SLOT( mapChanged( int ) ) );
+ connect( mMapCombo, TQT_SIGNAL( activated( int ) ), TQT_SLOT( mapChanged( int ) ) );
- label = new QLabel( i18n( "RDN prefix attribute:" ), page );
+ label = new TQLabel( i18n( "RDN prefix attribute:" ), page );
layout->addWidget( label, 1, 0 );
mRDNCombo = new KComboBox( page );
layout->addWidget( mRDNCombo, 1, 1 );
@@ -257,7 +257,7 @@ AttributesDialog::AttributesDialog( const QMap<QString, QString> &attributes,
mRDNCombo->insertItem( i18n( "UID" ) );
mRDNCombo->setCurrentItem( rdnprefix );
- QMap<QString, QString>::ConstIterator it;
+ TQMap<TQString, TQString>::ConstIterator it;
int i, j = 0;
for ( i = 2, it = attributes.begin(); it != attributes.end(); ++it, ++i ) {
if ( mNameDict[ it.key() ] == 0 ) {
@@ -269,7 +269,7 @@ AttributesDialog::AttributesDialog( const QMap<QString, QString> &attributes,
j = 2;
}
kdDebug(7125) << "itkey: " << it.key() << " i: " << i << endl;
- label = new QLabel( *mNameDict[ it.key() ] + ":", page );
+ label = new TQLabel( *mNameDict[ it.key() ] + ":", page );
KLineEdit *lineedit = new KLineEdit( page );
mLineEditDict.insert( it.key(), lineedit );
lineedit->setText( it.data() );
@@ -279,7 +279,7 @@ AttributesDialog::AttributesDialog( const QMap<QString, QString> &attributes,
}
for ( i = 1; i < mMapCombo->count(); i++ ) {
- QDictIterator<KLineEdit> it2( mLineEditDict );
+ TQDictIterator<KLineEdit> it2( mLineEditDict );
for ( ; it2.current(); ++it2 ) {
if ( mMapList[ i ].contains( it2.currentKey() ) ) {
if ( mMapList[ i ][ it2.currentKey() ] != it2.current()->text() ) break;
@@ -300,11 +300,11 @@ AttributesDialog::~AttributesDialog()
{
}
-QMap<QString, QString> AttributesDialog::attributes() const
+TQMap<TQString, TQString> AttributesDialog::attributes() const
{
- QMap<QString, QString> map;
+ TQMap<TQString, TQString> map;
- QDictIterator<KLineEdit> it( mLineEditDict );
+ TQDictIterator<KLineEdit> it( mLineEditDict );
for ( ; it.current(); ++it )
map.insert( it.currentKey(), it.current()->text() );
@@ -320,7 +320,7 @@ void AttributesDialog::mapChanged( int pos )
{
// apply first the default and than the spezific changes
- QMap<QString, QString>::Iterator it;
+ TQMap<TQString, TQString>::Iterator it;
for ( it = mDefaultMap.begin(); it != mDefaultMap.end(); ++it )
mLineEditDict[ it.key() ]->setText( it.data() );
@@ -333,33 +333,33 @@ void AttributesDialog::mapChanged( int pos )
}
OfflineDialog::OfflineDialog( bool autoCache, int cachePolicy, const KURL &src,
- const QString &dst, QWidget *parent, const char *name )
+ const TQString &dst, TQWidget *parent, const char *name )
: KDialogBase( Plain, i18n( "Offline Configuration" ), Ok | Cancel,
Ok, parent, name, true, true )
{
- QFrame *page = plainPage();
- QVBoxLayout *layout = new QVBoxLayout( page );
+ TQFrame *page = plainPage();
+ TQVBoxLayout *layout = new TQVBoxLayout( page );
layout->setAutoAdd( true );
mSrc = src; mDst = dst;
- mCacheGroup = new QButtonGroup( 1, Qt::Horizontal,
+ mCacheGroup = new TQButtonGroup( 1, Qt::Horizontal,
i18n("Offline Cache Policy"), page );
- QRadioButton *bt;
- new QRadioButton( i18n("Do not use offline cache"), mCacheGroup );
- bt = new QRadioButton( i18n("Use local copy if no connection"), mCacheGroup );
- new QRadioButton( i18n("Always use local copy"), mCacheGroup );
+ TQRadioButton *bt;
+ new TQRadioButton( i18n("Do not use offline cache"), mCacheGroup );
+ bt = new TQRadioButton( i18n("Use local copy if no connection"), mCacheGroup );
+ new TQRadioButton( i18n("Always use local copy"), mCacheGroup );
mCacheGroup->setButton( cachePolicy );
- mAutoCache = new QCheckBox( i18n("Refresh offline cache automatically"),
+ mAutoCache = new TQCheckBox( i18n("Refresh offline cache automatically"),
page );
mAutoCache->setChecked( autoCache );
mAutoCache->setEnabled( bt->isChecked() );
- connect( bt, SIGNAL(toggled(bool)), mAutoCache, SLOT(setEnabled(bool)) );
+ connect( bt, TQT_SIGNAL(toggled(bool)), mAutoCache, TQT_SLOT(setEnabled(bool)) );
- QPushButton *lcache = new QPushButton( i18n("Load into Cache"), page );
- connect( lcache, SIGNAL( clicked() ), SLOT( loadCache() ) );
+ TQPushButton *lcache = new TQPushButton( i18n("Load into Cache"), page );
+ connect( lcache, TQT_SIGNAL( clicked() ), TQT_SLOT( loadCache() ) );
}
OfflineDialog::~OfflineDialog()
diff --git a/kabc/plugins/ldapkio/resourceldapkioconfig.h b/kabc/plugins/ldapkio/resourceldapkioconfig.h
index c261cbd06..8bc6d081a 100644
--- a/kabc/plugins/ldapkio/resourceldapkioconfig.h
+++ b/kabc/plugins/ldapkio/resourceldapkioconfig.h
@@ -21,10 +21,10 @@
#ifndef RESOURCELDAPCONFIG_H
#define RESOURCELDAPCONFIG_H
-#include <qmap.h>
-#include <qradiobutton.h>
-#include <qcombobox.h>
-#include <qdict.h>
+#include <tqmap.h>
+#include <tqradiobutton.h>
+#include <tqcombobox.h>
+#include <tqdict.h>
#include <kdialogbase.h>
#include <kresources/configwidget.h>
@@ -47,7 +47,7 @@ class KABC_EXPORT ResourceLDAPKIOConfig : public KRES::ConfigWidget
Q_OBJECT
public:
- ResourceLDAPKIOConfig( QWidget* parent = 0, const char* name = 0 );
+ ResourceLDAPKIOConfig( TQWidget* parent = 0, const char* name = 0 );
public slots:
void loadSettings( KRES::Resource* );
@@ -57,13 +57,13 @@ class KABC_EXPORT ResourceLDAPKIOConfig : public KRES::ConfigWidget
void editAttributes();
void editCache();
private:
- QPushButton *mEditButton, *mCacheButton;
+ TQPushButton *mEditButton, *mCacheButton;
LdapConfigWidget *cfg;
- QCheckBox *mSubTree;
- QMap<QString, QString> mAttributes;
+ TQCheckBox *mSubTree;
+ TQMap<TQString, TQString> mAttributes;
int mRDNPrefix, mCachePolicy;
bool mAutoCache;
- QString mCacheDst;
+ TQString mCacheDst;
};
class AttributesDialog : public KDialogBase
@@ -71,11 +71,11 @@ class AttributesDialog : public KDialogBase
Q_OBJECT
public:
- AttributesDialog( const QMap<QString, QString> &attributes, int rdnprefix,
- QWidget *parent, const char *name = 0 );
+ AttributesDialog( const TQMap<TQString, TQString> &attributes, int rdnprefix,
+ TQWidget *parent, const char *name = 0 );
~AttributesDialog();
- QMap<QString, QString> attributes() const;
+ TQMap<TQString, TQString> attributes() const;
int rdnprefix() const;
private slots:
@@ -85,10 +85,10 @@ class AttributesDialog : public KDialogBase
enum { UserMap, KolabMap, NetscapeMap, EvolutionMap, OutlookMap };
KComboBox *mMapCombo, *mRDNCombo;
- QValueList< QMap<QString, QString> > mMapList;
- QMap<QString, QString> mDefaultMap;
- QDict<KLineEdit> mLineEditDict;
- QDict<QString> mNameDict;
+ TQValueList< TQMap<TQString, TQString> > mMapList;
+ TQMap<TQString, TQString> mDefaultMap;
+ TQDict<KLineEdit> mLineEditDict;
+ TQDict<TQString> mNameDict;
};
class OfflineDialog : public KDialogBase
@@ -97,7 +97,7 @@ class OfflineDialog : public KDialogBase
public:
OfflineDialog( bool autoCache, int cachePolicy, const KURL &src,
- const QString &dst, QWidget *parent, const char *name = 0 );
+ const TQString &dst, TQWidget *parent, const char *name = 0 );
~OfflineDialog();
int cachePolicy() const;
@@ -108,9 +108,9 @@ class OfflineDialog : public KDialogBase
private:
KURL mSrc;
- QString mDst;
- QButtonGroup *mCacheGroup;
- QCheckBox *mAutoCache;
+ TQString mDst;
+ TQButtonGroup *mCacheGroup;
+ TQCheckBox *mAutoCache;
};
}
diff --git a/kabc/plugins/net/resourcenet.cpp b/kabc/plugins/net/resourcenet.cpp
index 49d66d9e0..914885877 100644
--- a/kabc/plugins/net/resourcenet.cpp
+++ b/kabc/plugins/net/resourcenet.cpp
@@ -18,7 +18,7 @@
Boston, MA 02110-1301, USA.
*/
-#include <qfile.h>
+#include <tqfile.h>
#include <kdebug.h>
#include <kio/netaccess.h>
@@ -46,7 +46,7 @@ class ResourceNet::ResourceNetPrivate
KIO::Job *mSaveJob;
bool mIsSaving;
- QString mLastErrorString;
+ TQString mLastErrorString;
};
ResourceNet::ResourceNet( const KConfig *config )
@@ -57,11 +57,11 @@ ResourceNet::ResourceNet( const KConfig *config )
if ( config ) {
init( KURL( config->readPathEntry( "NetUrl" ) ), config->readEntry( "NetFormat" ) );
} else {
- init( KURL(), QString("vcard").latin1() );
+ init( KURL(), TQString("vcard").latin1() );
}
}
-ResourceNet::ResourceNet( const KURL &url, const QString &format )
+ResourceNet::ResourceNet( const KURL &url, const TQString &format )
: Resource( 0 ), mFormat( 0 ),
mTempFile( 0 ),
d( new ResourceNetPrivate )
@@ -69,7 +69,7 @@ ResourceNet::ResourceNet( const KURL &url, const QString &format )
init( url, format );
}
-void ResourceNet::init( const KURL &url, const QString &format )
+void ResourceNet::init( const KURL &url, const TQString &format )
{
d->mLoadJob = 0;
d->mIsLoading = false;
@@ -81,7 +81,7 @@ void ResourceNet::init( const KURL &url, const QString &format )
FormatFactory *factory = FormatFactory::self();
mFormat = factory->format( mFormatName );
if ( !mFormat ) {
- mFormatName = QString("vcard").latin1();
+ mFormatName = TQString("vcard").latin1();
mFormat = factory->format( mFormatName );
}
@@ -135,14 +135,14 @@ void ResourceNet::doClose()
bool ResourceNet::load()
{
- QString tempFile;
+ TQString tempFile;
if ( !KIO::NetAccess::download( mUrl, tempFile, 0 ) ) {
addressBook()->error( i18n( "Unable to download file '%1'." ).arg( mUrl.prettyURL() ) );
return false;
}
- QFile file( tempFile );
+ TQFile file( tempFile );
if ( !file.open( IO_ReadOnly ) ) {
addressBook()->error( i18n( "Unable to open file '%1'." ).arg( tempFile ) );
KIO::NetAccess::removeTempFile( tempFile );
@@ -158,7 +158,7 @@ bool ResourceNet::load()
return result;
}
-bool ResourceNet::clearAndLoad( QFile *file )
+bool ResourceNet::clearAndLoad( TQFile *file )
{
clear();
return mFormat->loadAll( addressBook(), this, file );
@@ -192,8 +192,8 @@ bool ResourceNet::asyncLoad()
KIO::Scheduler::checkSlaveOnHold( true );
d->mLoadJob = KIO::file_copy( mUrl, dest, -1, true, false, false );
d->mIsLoading = true;
- connect( d->mLoadJob, SIGNAL( result( KIO::Job* ) ),
- this, SLOT( downloadFinished( KIO::Job* ) ) );
+ connect( d->mLoadJob, TQT_SIGNAL( result( KIO::Job* ) ),
+ this, TQT_SLOT( downloadFinished( KIO::Job* ) ) );
return true;
}
@@ -286,8 +286,8 @@ bool ResourceNet::asyncSave( Ticket* )
KIO::Scheduler::checkSlaveOnHold( true );
d->mIsSaving = true;
d->mSaveJob = KIO::file_copy( src, mUrl, -1, true, false, false );
- connect( d->mSaveJob, SIGNAL( result( KIO::Job* ) ),
- this, SLOT( uploadFinished( KIO::Job* ) ) );
+ connect( d->mSaveJob, TQT_SIGNAL( result( KIO::Job* ) ),
+ this, TQT_SLOT( uploadFinished( KIO::Job* ) ) );
return true;
}
@@ -314,7 +314,7 @@ void ResourceNet::deleteLocalTempFile()
mTempFile = 0;
}
-void ResourceNet::saveToFile( QFile *file )
+void ResourceNet::saveToFile( TQFile *file )
{
mFormat->saveAll( addressBook(), this, file );
}
@@ -329,7 +329,7 @@ KURL ResourceNet::url() const
return mUrl;
}
-void ResourceNet::setFormat( const QString &name )
+void ResourceNet::setFormat( const TQString &name )
{
mFormatName = name;
if ( mFormat )
@@ -339,7 +339,7 @@ void ResourceNet::setFormat( const QString &name )
mFormat = factory->format( mFormatName );
}
-QString ResourceNet::format() const
+TQString ResourceNet::format() const
{
return mFormatName;
}
@@ -352,11 +352,11 @@ void ResourceNet::downloadFinished( KIO::Job* )
if ( !hasTempFile() || mTempFile->status() != 0 ) {
d->mLastErrorString = i18n( "Download failed: Unable to create temporary file" );
- QTimer::singleShot( 0, this, SLOT( signalError() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( signalError() ) );
return;
}
- QFile file( mTempFile->name() );
+ TQFile file( mTempFile->name() );
if ( file.open( IO_ReadOnly ) ) {
if ( clearAndLoad( &file ) )
emit loadingFinished( this );
diff --git a/kabc/plugins/net/resourcenet.h b/kabc/plugins/net/resourcenet.h
index b315be6df..ccb59694d 100644
--- a/kabc/plugins/net/resourcenet.h
+++ b/kabc/plugins/net/resourcenet.h
@@ -48,7 +48,7 @@ class KABC_EXPORT ResourceNet : public Resource
public:
ResourceNet( const KConfig* );
- ResourceNet( const KURL &url, const QString &format );
+ ResourceNet( const KURL &url, const TQString &format );
~ResourceNet();
virtual void writeConfig( KConfig* );
@@ -77,15 +77,15 @@ class KABC_EXPORT ResourceNet : public Resource
/**
Sets a new format by name.
*/
- void setFormat( const QString &name );
+ void setFormat( const TQString &name );
/**
Returns the format name.
*/
- QString format() const;
+ TQString format() const;
protected:
- void init( const KURL &url, const QString &format );
+ void init( const KURL &url, const TQString &format );
private slots:
void downloadFinished( KIO::Job* );
@@ -93,8 +93,8 @@ class KABC_EXPORT ResourceNet : public Resource
void signalError();
private:
- bool clearAndLoad( QFile *file );
- void saveToFile( QFile *file );
+ bool clearAndLoad( TQFile *file );
+ void saveToFile( TQFile *file );
bool hasTempFile() const { return mTempFile != 0; }
void abortAsyncLoading();
void abortAsyncSaving();
@@ -103,7 +103,7 @@ class KABC_EXPORT ResourceNet : public Resource
void deleteStaleTempFile();
FormatPlugin *mFormat;
- QString mFormatName;
+ TQString mFormatName;
KURL mUrl;
KTempFile *mTempFile;
diff --git a/kabc/plugins/net/resourcenetconfig.cpp b/kabc/plugins/net/resourcenetconfig.cpp
index ef5bfdcb9..b441fbd98 100644
--- a/kabc/plugins/net/resourcenetconfig.cpp
+++ b/kabc/plugins/net/resourcenetconfig.cpp
@@ -18,8 +18,8 @@
Boston, MA 02110-1301, USA.
*/
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <kdebug.h>
#include <klocale.h>
@@ -33,19 +33,19 @@
using namespace KABC;
-ResourceNetConfig::ResourceNetConfig( QWidget* parent, const char* name )
+ResourceNetConfig::ResourceNetConfig( TQWidget* parent, const char* name )
: ConfigWidget( parent, name ), mInEditMode( false )
{
- QGridLayout *mainLayout = new QGridLayout( this, 2, 2, 0,
+ TQGridLayout *mainLayout = new TQGridLayout( this, 2, 2, 0,
KDialog::spacingHint() );
- QLabel *label = new QLabel( i18n( "Format:" ), this );
+ TQLabel *label = new TQLabel( i18n( "Format:" ), this );
mFormatBox = new KComboBox( this );
mainLayout->addWidget( label, 0, 0 );
mainLayout->addWidget( mFormatBox, 0, 1 );
- label = new QLabel( i18n( "Location:" ), this );
+ label = new TQLabel( i18n( "Location:" ), this );
mUrlEdit = new KURLRequester( this );
mUrlEdit->setMode( KFile::File );
@@ -53,8 +53,8 @@ ResourceNetConfig::ResourceNetConfig( QWidget* parent, const char* name )
mainLayout->addWidget( mUrlEdit, 1, 1 );
FormatFactory *factory = FormatFactory::self();
- QStringList formats = factory->formats();
- QStringList::Iterator it;
+ TQStringList formats = factory->formats();
+ TQStringList::Iterator it;
for ( it = formats.begin(); it != formats.end(); ++it ) {
FormatInfo *info = factory->info( *it );
if ( info ) {
diff --git a/kabc/plugins/net/resourcenetconfig.h b/kabc/plugins/net/resourcenetconfig.h
index e35c46c01..e07937739 100644
--- a/kabc/plugins/net/resourcenetconfig.h
+++ b/kabc/plugins/net/resourcenetconfig.h
@@ -33,7 +33,7 @@ class KABC_EXPORT ResourceNetConfig : public KRES::ConfigWidget
Q_OBJECT
public:
- ResourceNetConfig( QWidget* parent = 0, const char* name = 0 );
+ ResourceNetConfig( TQWidget* parent = 0, const char* name = 0 );
void setEditMode( bool value );
@@ -45,7 +45,7 @@ class KABC_EXPORT ResourceNetConfig : public KRES::ConfigWidget
KComboBox* mFormatBox;
KURLRequester* mUrlEdit;
- QStringList mFormatTypes;
+ TQStringList mFormatTypes;
bool mInEditMode;
};
diff --git a/kabc/plugins/sql/resourcesql.cpp b/kabc/plugins/sql/resourcesql.cpp
index 2e6eb6902..55f02bae7 100644
--- a/kabc/plugins/sql/resourcesql.cpp
+++ b/kabc/plugins/sql/resourcesql.cpp
@@ -18,8 +18,8 @@
Boston, MA 02110-1301, USA.
*/
-#include <qsqldatabase.h>
-#include <qsqlcursor.h>
+#include <tqsqldatabase.h>
+#include <tqsqlcursor.h>
#include <kdebug.h>
#include <kglobal.h>
@@ -42,7 +42,7 @@ extern "C"
ResourceSql::ResourceSql( AddressBook *ab, const KConfig *config )
: Resource( ab ), mDb( 0 )
{
- QString user, password, db, host;
+ TQString user, password, db, host;
user = config->readEntry( "SqlUser" );
password = cryptStr( config->readEntry( "SqlPassword " ) );
@@ -52,15 +52,15 @@ ResourceSql::ResourceSql( AddressBook *ab, const KConfig *config )
init( user, password, db, host );
}
-ResourceSql::ResourceSql( AddressBook *ab, const QString &user,
- const QString &password, const QString &db, const QString &host )
+ResourceSql::ResourceSql( AddressBook *ab, const TQString &user,
+ const TQString &password, const TQString &db, const TQString &host )
: Resource( ab ), mDb( 0 )
{
init( user, password, db, host );
}
-void ResourceSql::init( const QString &user, const QString &password,
- const QString &db, const QString &host )
+void ResourceSql::init( const TQString &user, const TQString &password,
+ const TQString &db, const TQString &host )
{
mUser = user;
mPassword = password;
@@ -80,12 +80,12 @@ Ticket *ResourceSql::requestSaveTicket()
bool ResourceSql::open()
{
- QStringList drivers = QSqlDatabase::drivers();
- for ( QStringList::Iterator it = drivers.begin(); it != drivers.end(); ++it ) {
+ TQStringList drivers = TQSqlDatabase::drivers();
+ for ( TQStringList::Iterator it = drivers.begin(); it != drivers.end(); ++it ) {
kdDebug(5700) << "Driver: " << (*it) << endl;
}
- mDb = QSqlDatabase::addDatabase( "QMYSQL3" );
+ mDb = TQSqlDatabase::addDatabase( "QMYSQL3" );
if ( !mDb ) {
kdDebug(5700) << "Error. Unable to connect to database." << endl;
@@ -112,14 +112,14 @@ void ResourceSql::close()
bool ResourceSql::load()
{
- QSqlQuery query( "select addressId, name, familyName, givenName, "
+ TQSqlQuery query( "select addressId, name, familyName, givenName, "
"additionalName, prefix, suffix, nickname, birthday, "
"mailer, timezone, geo_latitude, geo_longitude, title, "
"role, organization, note, productId, revision, "
"sortString, url from kaddressbook_main_" + mUser );
while ( query.next() ) {
- QString addrId = query.value(0).toString();
+ TQString addrId = query.value(0).toString();
Addressee addr;
addr.setResource( this );
@@ -146,7 +146,7 @@ bool ResourceSql::load()
// emails
{
- QSqlQuery emailsQuery( "select email, preferred from kaddressbook_emails "
+ TQSqlQuery emailsQuery( "select email, preferred from kaddressbook_emails "
"where addressId = '" + addrId + "'" );
while ( emailsQuery.next() )
addr.insertEmail( emailsQuery.value( 0 ).toString(),
@@ -155,7 +155,7 @@ bool ResourceSql::load()
// phones
{
- QSqlQuery phonesQuery( "select number, type from kaddressbook_phones "
+ TQSqlQuery phonesQuery( "select number, type from kaddressbook_phones "
"where addressId = '" + addrId + "'" );
while ( phonesQuery.next() )
addr.insertPhoneNumber( PhoneNumber( phonesQuery.value( 0 ).toString(),
@@ -164,7 +164,7 @@ bool ResourceSql::load()
// addresses
{
- QSqlQuery addressesQuery( "select postOfficeBox, extended, street, "
+ TQSqlQuery addressesQuery( "select postOfficeBox, extended, street, "
"locality, region, postalCode, country, label, type "
"from kaddressbook_addresses where addressId = '" + addrId + "'" );
while ( addressesQuery.next() ) {
@@ -185,7 +185,7 @@ bool ResourceSql::load()
// categories
{
- QSqlQuery categoriesQuery( "select category from kaddressbook_categories "
+ TQSqlQuery categoriesQuery( "select category from kaddressbook_categories "
"where addressId = '" + addrId + "'" );
while ( categoriesQuery.next() )
addr.insertCategory( categoriesQuery.value( 0 ).toString() );
@@ -193,7 +193,7 @@ bool ResourceSql::load()
// customs
{
- QSqlQuery customsQuery( "select app, name, value from kaddressbook_customs "
+ TQSqlQuery customsQuery( "select app, name, value from kaddressbook_customs "
"where addressId = '" + addrId + "'" );
while ( customsQuery.next() )
addr.insertCustom( customsQuery.value( 0 ).toString(),
@@ -210,11 +210,11 @@ bool ResourceSql::load()
bool ResourceSql::save( Ticket * )
{
// we have to delete all entries for this user and reinsert them
- QSqlQuery query( "select addressId from kaddressbook_main_" + mUser );
+ TQSqlQuery query( "select addressId from kaddressbook_main_" + mUser );
while ( query.next() ) {
- QString addrId = query.value( 0 ).toString();
- QSqlQuery q;
+ TQString addrId = query.value( 0 ).toString();
+ TQSqlQuery q;
q.exec( "DELETE FROM kaddressbook_emails WHERE addressId = '" + addrId + "'" );
q.exec( "DELETE FROM kaddressbook_phones WHERE addressId = '" + addrId + "'" );
@@ -231,7 +231,7 @@ bool ResourceSql::save( Ticket * )
if ( (*it).resource() != this && (*it).resource() != 0 ) // save only my and new entries
continue;
- QString uid = (*it).uid();
+ TQString uid = (*it).uid();
query.exec( "INSERT INTO kaddressbook_main_" + mUser + " VALUES ('" +
(*it).uid() + "','" +
@@ -244,9 +244,9 @@ bool ResourceSql::save( Ticket * )
(*it).nickName() + "','" +
(*it).birthday().toString( Qt::ISODate ) + "','" +
(*it).mailer() + "','" +
- QString::number( (*it).timeZone().offset() ) + "','" +
- QString::number( (*it).geo().latitude() ) + "','" +
- QString::number( (*it).geo().longitude() ) + "','" +
+ TQString::number( (*it).timeZone().offset() ) + "','" +
+ TQString::number( (*it).geo().latitude() ) + "','" +
+ TQString::number( (*it).geo().longitude() ) + "','" +
(*it).title() + "','" +
(*it).role() + "','" +
(*it).organization() + "','" +
@@ -259,14 +259,14 @@ bool ResourceSql::save( Ticket * )
// emails
{
- QStringList emails = (*it).emails();
- QStringList::ConstIterator it;
+ TQStringList emails = (*it).emails();
+ TQStringList::ConstIterator it;
bool preferred = true;
for( it = emails.begin(); it != emails.end(); ++it ) {
query.exec("INSERT INTO kaddressbook_emails VALUES ('" +
uid + "','" +
(*it) + "','" +
- QString::number(preferred) + "')");
+ TQString::number(preferred) + "')");
preferred = false;
}
}
@@ -279,7 +279,7 @@ bool ResourceSql::save( Ticket * )
query.exec("INSERT INTO kaddressbook_phones VALUES ('" +
uid + "','" +
(*it).number() + "','" +
- QString::number( (*it).type() ) + "')");
+ TQString::number( (*it).type() ) + "')");
}
}
@@ -298,14 +298,14 @@ bool ResourceSql::save( Ticket * )
(*it).postalCode() + "','" +
(*it).country() + "','" +
(*it).label() + "','" +
- QString::number( (*it).type() ) + "')");
+ TQString::number( (*it).type() ) + "')");
}
}
// categories
{
- QStringList categories = (*it).categories();
- QStringList::ConstIterator it;
+ TQStringList categories = (*it).categories();
+ TQStringList::ConstIterator it;
for( it = categories.begin(); it != categories.end(); ++it )
query.exec("INSERT INTO kaddressbook_categories VALUES ('" +
uid + "','" +
@@ -314,14 +314,14 @@ bool ResourceSql::save( Ticket * )
// customs
{
- QStringList list = (*it).customs();
- QStringList::ConstIterator it;
+ TQStringList list = (*it).customs();
+ TQStringList::ConstIterator it;
for( it = list.begin(); it != list.end(); ++it ) {
int dashPos = (*it).find( '-' );
int colonPos = (*it).find( ':' );
- QString app = (*it).left( dashPos );
- QString name = (*it).mid( dashPos + 1, colonPos - dashPos - 1 );
- QString value = (*it).right( (*it).length() - colonPos - 1 );
+ TQString app = (*it).left( dashPos );
+ TQString name = (*it).mid( dashPos + 1, colonPos - dashPos - 1 );
+ TQString value = (*it).right( (*it).length() - colonPos - 1 );
query.exec("INSERT INTO kaddressbook_categories VALUES ('" +
uid + "','" + app + "','" + name + "','" + value + "')");
@@ -332,7 +332,7 @@ bool ResourceSql::save( Ticket * )
return true;
}
-QString ResourceSql::identifier() const
+TQString ResourceSql::identifier() const
{
return mHost + "_" + mDbName;
}
diff --git a/kabc/plugins/sql/resourcesql.h b/kabc/plugins/sql/resourcesql.h
index c0b61b69b..a5fc60b55 100644
--- a/kabc/plugins/sql/resourcesql.h
+++ b/kabc/plugins/sql/resourcesql.h
@@ -33,8 +33,8 @@ namespace KABC {
class ResourceSql : public Resource
{
public:
- ResourceSql( AddressBook *ab, const QString &user, const QString &password,
- const QString &db, const QString &host );
+ ResourceSql( AddressBook *ab, const TQString &user, const TQString &password,
+ const TQString &db, const TQString &host );
ResourceSql( AddressBook *ab, const KConfig * );
bool open();
@@ -45,18 +45,18 @@ public:
bool load();
bool save( Ticket * ticket );
- QString identifier() const;
+ TQString identifier() const;
private:
- void init(const QString &user, const QString &password,
- const QString &db, const QString &host );
+ void init(const TQString &user, const TQString &password,
+ const TQString &db, const TQString &host );
- QString mUser;
- QString mPassword;
- QString mDbName;
- QString mHost;
+ TQString mUser;
+ TQString mPassword;
+ TQString mDbName;
+ TQString mHost;
- QSqlDatabase *mDb;
+ TQSqlDatabase *mDb;
};
}
diff --git a/kabc/plugins/sql/resourcesqlconfig.cpp b/kabc/plugins/sql/resourcesqlconfig.cpp
index d9abffa30..ef1651cde 100644
--- a/kabc/plugins/sql/resourcesqlconfig.cpp
+++ b/kabc/plugins/sql/resourcesqlconfig.cpp
@@ -18,10 +18,10 @@
Boston, MA 02110-1301, USA.
*/
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qspinbox.h>
-#include <qvbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqspinbox.h>
+#include <tqvbox.h>
#include <klineedit.h>
#include <klocale.h>
@@ -31,43 +31,43 @@
using namespace KABC;
-ResourceSqlConfig::ResourceSqlConfig( QWidget* parent, const char* name )
+ResourceSqlConfig::ResourceSqlConfig( TQWidget* parent, const char* name )
: ResourceConfigWidget( parent, name )
{
resize( 290, 170 );
- QGridLayout *mainLayout = new QGridLayout( this, 4, 2 );
+ TQGridLayout *mainLayout = new TQGridLayout( this, 4, 2 );
- QLabel *label = new QLabel( i18n( "Username:" ), this );
+ TQLabel *label = new TQLabel( i18n( "Username:" ), this );
mUser = new KLineEdit( this );
mainLayout->addWidget( label, 0, 0 );
mainLayout->addWidget( mUser, 0, 1 );
- label = new QLabel( i18n( "Password:" ), this );
+ label = new TQLabel( i18n( "Password:" ), this );
mPassword = new KLineEdit( this );
mPassword->setEchoMode( KLineEdit::Password );
mainLayout->addWidget( label, 1, 0 );
mainLayout->addWidget( mPassword, 1, 1 );
- label = new QLabel( i18n( "Host:" ), this );
+ label = new TQLabel( i18n( "Host:" ), this );
mHost = new KLineEdit( this );
mainLayout->addWidget( label, 2, 0 );
mainLayout->addWidget( mHost, 2, 1 );
- label = new QLabel( i18n( "Port:" ), this );
- QVBox *box = new QVBox(this);
- mPort = new QSpinBox(0, 65535, 1, box );
- mPort->setSizePolicy(QSizePolicy(QSizePolicy::Maximum, QSizePolicy::Preferred));
+ label = new TQLabel( i18n( "Port:" ), this );
+ TQVBox *box = new TQVBox(this);
+ mPort = new TQSpinBox(0, 65535, 1, box );
+ mPort->setSizePolicy(TQSizePolicy(TQSizePolicy::Maximum, TQSizePolicy::Preferred));
mPort->setValue(389);
- new QWidget(box, "dummy");
+ new TQWidget(box, "dummy");
mainLayout->addWidget( label, 3, 0 );
mainLayout->addWidget( box, 3, 1 );
- label = new QLabel( i18n( "Database:" ), this );
+ label = new TQLabel( i18n( "Database:" ), this );
mDbName = new KLineEdit( this );
mainLayout->addWidget( label, 4, 0 );
diff --git a/kabc/plugins/sql/resourcesqlconfig.h b/kabc/plugins/sql/resourcesqlconfig.h
index d7230870e..cb96563b7 100644
--- a/kabc/plugins/sql/resourcesqlconfig.h
+++ b/kabc/plugins/sql/resourcesqlconfig.h
@@ -33,7 +33,7 @@ class ResourceSqlConfig : public ResourceConfigWidget
Q_OBJECT
public:
- ResourceSqlConfig( QWidget* parent = 0, const char* name = 0 );
+ ResourceSqlConfig( TQWidget* parent = 0, const char* name = 0 );
public slots:
void loadSettings( KConfig *config );
@@ -44,7 +44,7 @@ private:
KLineEdit* mPassword;
KLineEdit* mDbName;
KLineEdit* mHost;
- QSpinBox* mPort;
+ TQSpinBox* mPort;
};
}