summaryrefslogtreecommitdiffstats
path: root/kaddressbook/xxport/vcard_xxport.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kaddressbook/xxport/vcard_xxport.cpp')
-rw-r--r--kaddressbook/xxport/vcard_xxport.cpp52
1 files changed, 26 insertions, 26 deletions
diff --git a/kaddressbook/xxport/vcard_xxport.cpp b/kaddressbook/xxport/vcard_xxport.cpp
index 1dfc9bcc..69f854f3 100644
--- a/kaddressbook/xxport/vcard_xxport.cpp
+++ b/kaddressbook/xxport/vcard_xxport.cpp
@@ -131,7 +131,7 @@ bool VCardXXPort::exportContacts( const KABC::AddresseeList &addrList, const TQS
TQString msg = i18n( "You have selected a list of contacts, shall they be "
"exported to several files?" );
- switch ( KMessageBox::questionYesNo( parentWidget(), msg, TQString::null, i18n("Export to Several Files"), i18n("Export to One File") ) ) {
+ switch ( KMessageBox::questionYesNo( tqparentWidget(), msg, TQString::null, i18n("Export to Several Files"), i18n("Export to One File") ) ) {
case KMessageBox::Yes: {
KURL baseUrl = KFileDialog::getExistingURL();
if ( baseUrl.isEmpty() )
@@ -146,7 +146,7 @@ bool VCardXXPort::exportContacts( const KABC::AddresseeList &addrList, const TQS
else
testUrl = baseUrl.url() + "/" + (*it).givenName() + "_" + (*it).familyName();
- if ( KIO::NetAccess::exists( testUrl + (counter == 0 ? "" : TQString::number( counter )) + ".vcf", false, parentWidget() ) ) {
+ if ( KIO::NetAccess::exists( testUrl + (counter == 0 ? "" : TQString::number( counter )) + ".vcf", false, tqparentWidget() ) ) {
counter++;
url = testUrl + TQString::number( counter ) + ".vcf";
} else
@@ -208,7 +208,7 @@ KABC::AddresseeList VCardXXPort::importContacts( const TQString& ) const
#endif
} else {
if ( XXPortManager::importURL.isEmpty() )
- urls = KFileDialog::getOpenURLs( TQString::null, "*.vcf|vCards", parentWidget(),
+ urls = KFileDialog::getOpenURLs( TQString::null, "*.vcf|vCards", tqparentWidget(),
i18n( "Select vCard to Import" ) );
else
urls.append( XXPortManager::importURL );
@@ -220,7 +220,7 @@ KABC::AddresseeList VCardXXPort::importContacts( const TQString& ) const
bool anyFailures = false;
KURL::List::Iterator it;
for ( it = urls.begin(); it != urls.end(); ++it ) {
- if ( KIO::NetAccess::download( *it, fileName, parentWidget() ) ) {
+ if ( KIO::NetAccess::download( *it, fileName, tqparentWidget() ) ) {
TQFile file( fileName );
@@ -237,12 +237,12 @@ KABC::AddresseeList VCardXXPort::importContacts( const TQString& ) const
TQString vCardText;
- // With version 3.0, vCards are encoded with UTF-8 by default. Otherwise, use fromLatin1()
+ // With version 3.0, vCards are encoded with UTF-8 by default. Otherwise, use tqfromLatin1()
// and hope that are fields are encoded correctly.
- if ( TQString::fromLatin1( rawData ).lower().contains( "version:3.0" ) ) {
+ if ( TQString::tqfromLatin1( rawData ).lower().tqcontains( "version:3.0" ) ) {
vCardText = TQString::fromUtf8( rawData );
} else {
- vCardText = TQString::fromLatin1( rawData );
+ vCardText = TQString::tqfromLatin1( rawData );
}
addrList += parseVCard( vCardText );
}
@@ -253,13 +253,13 @@ KABC::AddresseeList VCardXXPort::importContacts( const TQString& ) const
text = text.arg( (*it).url() );
text = text.arg( kapp->translate( "TQFile",
file.errorString().latin1() ) );
- KMessageBox::error( parentWidget(), text, caption );
+ KMessageBox::error( tqparentWidget(), text, caption );
anyFailures = true;
}
} else {
TQString text = i18n( "<qt>Unable to access vCard: %1</qt>" );
text = text.arg( KIO::NetAccess::lastErrorString() );
- KMessageBox::error( parentWidget(), text, caption );
+ KMessageBox::error( tqparentWidget(), text, caption );
anyFailures = true;
}
}
@@ -267,12 +267,12 @@ KABC::AddresseeList VCardXXPort::importContacts( const TQString& ) const
if ( !XXPortManager::importURL.isEmpty() ) { // a vcard was passed via cmd
if ( addrList.isEmpty() ) {
if ( anyFailures && urls.count() > 1 )
- KMessageBox::information( parentWidget(),
+ KMessageBox::information( tqparentWidget(),
i18n( "No contacts were imported, due to errors with the vCards." ) );
else if ( !anyFailures )
- KMessageBox::information( parentWidget(), i18n( "The vCard does not contain any contacts." ) );
+ KMessageBox::information( tqparentWidget(), i18n( "The vCard does not contain any contacts." ) );
} else {
- VCardViewerDialog dlg( addrList, parentWidget() );
+ VCardViewerDialog dlg( addrList, tqparentWidget() );
dlg.exec();
addrList = dlg.contacts();
}
@@ -293,7 +293,7 @@ KABC::AddresseeList VCardXXPort::parseVCard( const TQByteArray &data ) const
bool VCardXXPort::doExport( const KURL &url, const TQByteArray &data )
{
if( TQFileInfo(url.path()).exists() ) {
- if(KMessageBox::questionYesNo( parentWidget(), i18n("Do you want to overwrite file \"%1\"").arg( url.path()) ) == KMessageBox::No)
+ if(KMessageBox::questionYesNo( tqparentWidget(), i18n("Do you want to overwrite file \"%1\"").arg( url.path()) ) == KMessageBox::No)
return false;
}
KTempFile tmpFile;
@@ -302,7 +302,7 @@ bool VCardXXPort::doExport( const KURL &url, const TQByteArray &data )
tmpFile.file()->writeBlock( data.data(), data.size() );
tmpFile.close();
- return KIO::NetAccess::upload( tmpFile.name(), url, parentWidget() );
+ return KIO::NetAccess::upload( tmpFile.name(), url, tqparentWidget() );
}
#else
KABC::AddresseeList VCardXXPort::parseVCard( const TQString &data ) const
@@ -315,7 +315,7 @@ KABC::AddresseeList VCardXXPort::parseVCard( const TQString &data ) const
bool VCardXXPort::doExport( const KURL &url, const TQString &data )
{
if( TQFileInfo(url.path()).exists() ) {
- if(KMessageBox::questionYesNo( parentWidget(), i18n("Do you want to overwrite file \"%1\"").arg( url.path()) ) == KMessageBox::No)
+ if(KMessageBox::questionYesNo( tqparentWidget(), i18n("Do you want to overwrite file \"%1\"").arg( url.path()) ) == KMessageBox::No)
return false;
}
KTempFile tmpFile;
@@ -327,7 +327,7 @@ bool VCardXXPort::doExport( const KURL &url, const TQString &data )
stream << data;
tmpFile.close();
- return KIO::NetAccess::upload( tmpFile.name(), url, parentWidget() );
+ return KIO::NetAccess::upload( tmpFile.name(), url, tqparentWidget() );
}
#endif
@@ -338,7 +338,7 @@ KABC::AddresseeList VCardXXPort::filterContacts( const KABC::AddresseeList &addr
if ( addrList.isEmpty() )
return addrList;
- VCardExportSelectionDialog dlg( parentWidget() );
+ VCardExportSelectionDialog dlg( tqparentWidget() );
if ( !dlg.exec() )
return list;
@@ -471,18 +471,18 @@ VCardViewerDialog::VCardViewerDialog( const KABC::Addressee::List &list,
mContacts( list )
{
TQFrame *page = plainPage();
- TQVBoxLayout *layout = new TQVBoxLayout( page, marginHint(), spacingHint() );
+ TQVBoxLayout *tqlayout = new TQVBoxLayout( page, marginHint(), spacingHint() );
TQLabel *label = new TQLabel( i18n( "Do you want to import this contact in your address book?" ), page );
TQFont font = label->font();
font.setBold( true );
label->setFont( font );
- layout->addWidget( label );
+ tqlayout->addWidget( label );
mView = new KPIM::AddresseeView( page );
mView->enableLinks( 0 );
mView->setVScrollBarMode( TQScrollView::Auto );
- layout->addWidget( mView );
+ tqlayout->addWidget( mView );
setButtonText( Apply, i18n( "Import All..." ) );
@@ -544,22 +544,22 @@ VCardExportSelectionDialog::VCardExportSelectionDialog( TQWidget *parent,
{
TQFrame *page = plainPage();
- TQVBoxLayout *layout = new TQVBoxLayout( page, marginHint(), spacingHint() );
+ TQVBoxLayout *tqlayout = new TQVBoxLayout( page, marginHint(), spacingHint() );
TQLabel *label = new TQLabel( i18n( "Select the fields which shall be exported in the vCard." ), page );
- layout->addWidget( label );
+ tqlayout->addWidget( label );
mPrivateBox = new TQCheckBox( i18n( "Private fields" ), page );
- layout->addWidget( mPrivateBox );
+ tqlayout->addWidget( mPrivateBox );
mBusinessBox = new TQCheckBox( i18n( "Business fields" ), page );
- layout->addWidget( mBusinessBox );
+ tqlayout->addWidget( mBusinessBox );
mOtherBox = new TQCheckBox( i18n( "Other fields" ), page );
- layout->addWidget( mOtherBox );
+ tqlayout->addWidget( mOtherBox );
mEncryptionKeys = new TQCheckBox( i18n( "Encryption keys" ), page );
- layout->addWidget( mEncryptionKeys );
+ tqlayout->addWidget( mEncryptionKeys );
KConfig config( "kaddressbookrc" );
config.setGroup( "XXPortVCard" );