From 4ae0c208b66e0f7954e194384464fe2d0a2c56dd Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:51:49 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdesdk@1157652 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kdeaccounts-plugin/kdeaccountsformat.cpp | 28 ++++++++++++++-------------- kdeaccounts-plugin/kdeaccountsformat.h | 10 +++++----- 2 files changed, 19 insertions(+), 19 deletions(-) (limited to 'kdeaccounts-plugin') diff --git a/kdeaccounts-plugin/kdeaccountsformat.cpp b/kdeaccounts-plugin/kdeaccountsformat.cpp index d445e311..fc9f2cb3 100644 --- a/kdeaccounts-plugin/kdeaccountsformat.cpp +++ b/kdeaccounts-plugin/kdeaccountsformat.cpp @@ -1,7 +1,7 @@ #include "kdeaccountsformat.h" -#include -#include +#include +#include #include #include @@ -22,21 +22,21 @@ extern "C" bool KDEAccountsFormat::loadAll( KABC::AddressBook *book, KABC::Resource *resource, - QFile *file ) + TQFile *file ) { if ( !book || !file ) // eh? return false; - QString uuid = "KDEAccountsEntry."; + TQString uuid = "KDEAccountsEntry."; int id = 0; - QByteArray array = file->readAll(); + TQByteArray array = file->readAll(); file->close(); - QByteArray::ConstIterator it = array.begin(); - QByteArray::ConstIterator end = array.end(); - QByteArray::ConstIterator startLine; - QString line; + TQByteArray::ConstIterator it = array.begin(); + TQByteArray::ConstIterator end = array.end(); + TQByteArray::ConstIterator startLine; + TQString line; char eol = '\n'; char delim = ' '; @@ -48,11 +48,11 @@ bool KDEAccountsFormat::loadAll( KABC::AddressBook *book, { } // find eol uint length = it - startLine; - line = QString::fromUtf8( startLine, length ).simplifyWhiteSpace(); + line = TQString::fromUtf8( startLine, length ).simplifyWhiteSpace(); - QString nickName; - QString name; - QString email; + TQString nickName; + TQString name; + TQString email; int firstSpace = line.find( delim ); if ( firstSpace > 0 ) @@ -76,7 +76,7 @@ bool KDEAccountsFormat::loadAll( KABC::AddressBook *book, address.setOrganization("KDE Project"); address.insertCategory("KDE Developer"); address.insertEmail( email ); - address.setUid( uuid + QString::number( id++ )); + address.setUid( uuid + TQString::number( id++ )); address.setResource( resource ); book->insertAddressee( address ); diff --git a/kdeaccounts-plugin/kdeaccountsformat.h b/kdeaccounts-plugin/kdeaccountsformat.h index 6eb07c7c..3e12d30d 100644 --- a/kdeaccounts-plugin/kdeaccountsformat.h +++ b/kdeaccounts-plugin/kdeaccountsformat.h @@ -23,22 +23,22 @@ public: ~KDEAccountsFormat() {} virtual bool loadAll( KABC::AddressBook *, - KABC::Resource *resource, QFile *file ); + KABC::Resource *resource, TQFile *file ); - virtual bool load( KABC::Addressee&, QFile *) + virtual bool load( KABC::Addressee&, TQFile *) { qDebug("*** KDE Accounts format: load single entry not supported."); return false; } - virtual void save( const KABC::Addressee&, QFile *) + virtual void save( const KABC::Addressee&, TQFile *) { qDebug("*** KDE Accounts format: save not supported."); } - virtual void saveAll( KABC::AddressBook *, KABC::Resource *, QFile *) + virtual void saveAll( KABC::AddressBook *, KABC::Resource *, TQFile *) { qDebug("*** KDE Accounts format: save not supported."); } - virtual bool checkFormat( QFile *file ) const + virtual bool checkFormat( TQFile *file ) const { if ( file->name().endsWith( "/accounts" ) ) return true; // lame, but works for me :) -- cgit v1.2.1