summaryrefslogtreecommitdiffstats
path: root/kaddressbook/xxport/ldif_xxport.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kaddressbook/xxport/ldif_xxport.cpp')
-rw-r--r--kaddressbook/xxport/ldif_xxport.cpp40
1 files changed, 20 insertions, 20 deletions
diff --git a/kaddressbook/xxport/ldif_xxport.cpp b/kaddressbook/xxport/ldif_xxport.cpp
index 342ff9d8..d632d449 100644
--- a/kaddressbook/xxport/ldif_xxport.cpp
+++ b/kaddressbook/xxport/ldif_xxport.cpp
@@ -33,7 +33,7 @@
into your KDE Addressbook.
*/
-#include <qfile.h>
+#include <tqfile.h>
#include <kfiledialog.h>
#include <kio/netaccess.h>
@@ -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( "<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 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( "<qt>Unable to open file <b>%1</b>.%2.</qt>" );
+ TQString txt = i18n( "<qt>Unable to open file <b>%1</b>.%2.</qt>" );
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( "<qt>Unable to open file <b>%1</b>.</qt>" );
+ TQString txt = i18n( "<qt>Unable to open file <b>%1</b>.</qt>" );
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;
}