From 7be55ffa061c026e35e2d6a0effe1161ddb0d41f Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:53:50 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kaddressbook/xxport/ldif_xxport.cpp | 40 ++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'kaddressbook/xxport/ldif_xxport.cpp') diff --git a/kaddressbook/xxport/ldif_xxport.cpp b/kaddressbook/xxport/ldif_xxport.cpp index 342ff9d81..d632d449b 100644 --- a/kaddressbook/xxport/ldif_xxport.cpp +++ b/kaddressbook/xxport/ldif_xxport.cpp @@ -33,7 +33,7 @@ into your KDE Addressbook. */ -#include +#include #include #include @@ -50,7 +50,7 @@ K_EXPORT_KADDRESSBOOK_XXFILTER( libkaddrbk_ldif_xxport, LDIFXXPort ) -LDIFXXPort::LDIFXXPort( KABC::AddressBook *ab, QWidget *parent, const char *name ) +LDIFXXPort::LDIFXXPort( KABC::AddressBook *ab, TQWidget *parent, const char *name ) : KAB::XXPort( ab, parent, name ) { createImportAction( i18n( "Import LDIF Addressbook..." ) ); @@ -59,26 +59,26 @@ LDIFXXPort::LDIFXXPort( KABC::AddressBook *ab, QWidget *parent, const char *name /* import */ -KABC::AddresseeList LDIFXXPort::importContacts( const QString& ) const +KABC::AddresseeList LDIFXXPort::importContacts( const TQString& ) const { KABC::AddresseeList addrList; - QString fileName = KFileDialog::getOpenFileName( QDir::homeDirPath(), + TQString fileName = KFileDialog::getOpenFileName( TQDir::homeDirPath(), "text/x-ldif", 0 ); if ( fileName.isEmpty() ) return addrList; - QFile file( fileName ); + TQFile file( fileName ); if ( !file.open( IO_ReadOnly ) ) { - QString msg = i18n( "Unable to open %1 for reading." ); + TQString msg = i18n( "Unable to open %1 for reading." ); KMessageBox::error( parentWidget(), msg.arg( fileName ) ); return addrList; } - QTextStream t( &file ); - t.setEncoding( QTextStream::Latin1 ); - QString wholeFile = t.read(); - QDateTime dtDefault = QFileInfo(file).lastModified(); + TQTextStream t( &file ); + t.setEncoding( TQTextStream::Latin1 ); + TQString wholeFile = t.read(); + TQDateTime dtDefault = TQFileInfo(file).lastModified(); file.close(); KABC::LDIFConverter::LDIFToAddressee( wholeFile, addrList, dtDefault ); @@ -89,9 +89,9 @@ KABC::AddresseeList LDIFXXPort::importContacts( const QString& ) const /* export */ -bool LDIFXXPort::exportContacts( const KABC::AddresseeList &list, const QString& ) +bool LDIFXXPort::exportContacts( const KABC::AddresseeList &list, const TQString& ) { - KURL url = KFileDialog::getSaveURL( QDir::homeDirPath() + "/addressbook.ldif", + KURL url = KFileDialog::getSaveURL( TQDir::homeDirPath() + "/addressbook.ldif", "text/x-ldif" ); if ( url.isEmpty() ) return true; @@ -99,7 +99,7 @@ bool LDIFXXPort::exportContacts( const KABC::AddresseeList &list, const QString& if ( !url.isLocalFile() ) { KTempFile tmpFile; if ( tmpFile.status() != 0 ) { - QString txt = i18n( "Unable to open file %1.%2." ); + TQString txt = i18n( "Unable to open file %1.%2." ); KMessageBox::error( parentWidget(), txt.arg( url.url() ) .arg( strerror( tmpFile.status() ) ) ); return false; @@ -110,11 +110,11 @@ bool LDIFXXPort::exportContacts( const KABC::AddresseeList &list, const QString& return KIO::NetAccess::upload( tmpFile.name(), url, parentWidget() ); } else { - QString filename = url.path(); - QFile file( filename ); + TQString filename = url.path(); + TQFile file( filename ); if ( !file.open( IO_WriteOnly ) ) { - QString txt = i18n( "Unable to open file %1." ); + TQString txt = i18n( "Unable to open file %1." ); KMessageBox::error( parentWidget(), txt.arg( filename ) ); return false; } @@ -126,13 +126,13 @@ bool LDIFXXPort::exportContacts( const KABC::AddresseeList &list, const QString& } } -void LDIFXXPort::doExport( QFile *fp, const KABC::AddresseeList &list ) +void LDIFXXPort::doExport( TQFile *fp, const KABC::AddresseeList &list ) { - QString str; + TQString str; KABC::LDIFConverter::addresseeToLDIF( list, str ); - QTextStream t( fp ); - t.setEncoding( QTextStream::UnicodeUTF8 ); + TQTextStream t( fp ); + t.setEncoding( TQTextStream::UnicodeUTF8 ); t << str; } -- cgit v1.2.1