diff options
Diffstat (limited to 'kaddressbook/xxport/opera_xxport.cpp')
-rw-r--r-- | kaddressbook/xxport/opera_xxport.cpp | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/kaddressbook/xxport/opera_xxport.cpp b/kaddressbook/xxport/opera_xxport.cpp index c3d707b88..474a66723 100644 --- a/kaddressbook/xxport/opera_xxport.cpp +++ b/kaddressbook/xxport/opera_xxport.cpp @@ -22,8 +22,8 @@ without including the source code for Qt in the source distribution. */ -#include <qfile.h> -#include <qregexp.h> +#include <tqfile.h> +#include <tqregexp.h> #include <kfiledialog.h> #include <kio/netaccess.h> @@ -38,39 +38,39 @@ K_EXPORT_KADDRESSBOOK_XXFILTER( libkaddrbk_opera_xxport, OperaXXPort ) -OperaXXPort::OperaXXPort( KABC::AddressBook *ab, QWidget *parent, const char *name ) +OperaXXPort::OperaXXPort( KABC::AddressBook *ab, TQWidget *parent, const char *name ) : KAB::XXPort( ab, parent, name ) { createImportAction( i18n( "Import Opera Addressbook..." ) ); } -KABC::AddresseeList OperaXXPort::importContacts( const QString& ) const +KABC::AddresseeList OperaXXPort::importContacts( const TQString& ) const { KABC::AddresseeList addrList; - QString fileName = KFileDialog::getOpenFileName( QDir::homeDirPath() + QString::fromLatin1( "/.opera/contacts.adr" ) ); + TQString fileName = KFileDialog::getOpenFileName( TQDir::homeDirPath() + TQString::fromLatin1( "/.opera/contacts.adr" ) ); if ( fileName.isEmpty() ) return addrList; - QFile file( fileName ); + TQFile file( fileName ); if ( !file.open( IO_ReadOnly ) ) { - QString msg = i18n( "<qt>Unable to open <b>%1</b> for reading.</qt>" ); + TQString msg = i18n( "<qt>Unable to open <b>%1</b> for reading.</qt>" ); KMessageBox::error( parentWidget(), msg.arg( fileName ) ); return addrList; } - QTextStream stream( &file ); - stream.setEncoding( QTextStream::UnicodeUTF8 ); - QString line, key, value; + TQTextStream stream( &file ); + stream.setEncoding( TQTextStream::UnicodeUTF8 ); + TQString line, key, value; bool parseContact = false; KABC::Addressee addr; - QRegExp separator( "\x02\x02" ); + TQRegExp separator( "\x02\x02" ); while ( !stream.atEnd() ) { line = stream.readLine(); line = line.stripWhiteSpace(); - if ( line == QString::fromLatin1( "#CONTACT" ) ) { + if ( line == TQString::fromLatin1( "#CONTACT" ) ) { parseContact = true; addr = KABC::Addressee(); continue; @@ -87,31 +87,31 @@ KABC::AddresseeList OperaXXPort::importContacts( const QString& ) const int sep = line.find( '=' ); key = line.left( sep ).lower(); value = line.mid( sep + 1 ); - if ( key == QString::fromLatin1( "name" ) ) + if ( key == TQString::fromLatin1( "name" ) ) addr.setNameFromString( value ); - else if ( key == QString::fromLatin1( "mail" ) ) { - QStringList emails = QStringList::split( separator, value ); + else if ( key == TQString::fromLatin1( "mail" ) ) { + TQStringList emails = TQStringList::split( separator, value ); - QStringList::Iterator it = emails.begin(); + TQStringList::Iterator it = emails.begin(); bool preferred = true; for ( ; it != emails.end(); ++it ) { addr.insertEmail( *it, preferred ); preferred = false; } - } else if ( key == QString::fromLatin1( "phone" ) ) + } else if ( key == TQString::fromLatin1( "phone" ) ) addr.insertPhoneNumber( KABC::PhoneNumber( value ) ); - else if ( key == QString::fromLatin1( "fax" ) ) + else if ( key == TQString::fromLatin1( "fax" ) ) addr.insertPhoneNumber( KABC::PhoneNumber( value, KABC::PhoneNumber::Fax | KABC::PhoneNumber::Home ) ); - else if ( key == QString::fromLatin1( "postaladdress" ) ) { + else if ( key == TQString::fromLatin1( "postaladdress" ) ) { KABC::Address address( KABC::Address::Home ); address.setLabel( value.replace( separator, "\n" ) ); addr.insertAddress( address ); - } else if ( key == QString::fromLatin1( "description" ) ) + } else if ( key == TQString::fromLatin1( "description" ) ) addr.setNote( value.replace( separator, "\n" ) ); - else if ( key == QString::fromLatin1( "url" ) ) + else if ( key == TQString::fromLatin1( "url" ) ) addr.setUrl( KURL( value ) ); - else if ( key == QString::fromLatin1( "pictureurl" ) ) { + else if ( key == TQString::fromLatin1( "pictureurl" ) ) { KABC::Picture pic( value ); addr.setPhoto( pic ); } |