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.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/kaddressbook/xxport/vcard_xxport.cpp b/kaddressbook/xxport/vcard_xxport.cpp
index 74b1e9dc8..d917292f7 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( tqparentWidget(), msg, TQString(), i18n("Export to Several Files"), i18n("Export to One File") ) ) {
+ switch ( KMessageBox::questionYesNo( parentWidget(), msg, TQString(), 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, tqparentWidget() ) ) {
+ if ( KIO::NetAccess::exists( testUrl + (counter == 0 ? "" : TQString::number( counter )) + ".vcf", false, parentWidget() ) ) {
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(), "*.vcf|vCards", tqparentWidget(),
+ urls = KFileDialog::getOpenURLs( TQString(), "*.vcf|vCards", parentWidget(),
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, tqparentWidget() ) ) {
+ if ( KIO::NetAccess::download( *it, fileName, parentWidget() ) ) {
TQFile file( fileName );
@@ -253,13 +253,13 @@ KABC::AddresseeList VCardXXPort::importContacts( const TQString& ) const
text = text.tqarg( (*it).url() );
text = text.tqarg( kapp->translate( "TQFile",
TQString(file.errorString()).latin1() ) );
- KMessageBox::error( tqparentWidget(), text, caption );
+ KMessageBox::error( parentWidget(), text, caption );
anyFailures = true;
}
} else {
TQString text = i18n( "<qt>Unable to access vCard: %1</qt>" );
text = text.tqarg( KIO::NetAccess::lastErrorString() );
- KMessageBox::error( tqparentWidget(), text, caption );
+ KMessageBox::error( parentWidget(), 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( tqparentWidget(),
+ KMessageBox::information( parentWidget(),
i18n( "No contacts were imported, due to errors with the vCards." ) );
else if ( !anyFailures )
- KMessageBox::information( tqparentWidget(), i18n( "The vCard does not contain any contacts." ) );
+ KMessageBox::information( parentWidget(), i18n( "The vCard does not contain any contacts." ) );
} else {
- VCardViewerDialog dlg( addrList, tqparentWidget() );
+ VCardViewerDialog dlg( addrList, parentWidget() );
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( tqparentWidget(), i18n("Do you want to overwrite file \"%1\"").tqarg( url.path()) ) == KMessageBox::No)
+ if(KMessageBox::questionYesNo( parentWidget(), i18n("Do you want to overwrite file \"%1\"").tqarg( 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, tqparentWidget() );
+ return KIO::NetAccess::upload( tmpFile.name(), url, parentWidget() );
}
#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( tqparentWidget(), i18n("Do you want to overwrite file \"%1\"").tqarg( url.path()) ) == KMessageBox::No)
+ if(KMessageBox::questionYesNo( parentWidget(), i18n("Do you want to overwrite file \"%1\"").tqarg( 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, tqparentWidget() );
+ return KIO::NetAccess::upload( tmpFile.name(), url, parentWidget() );
}
#endif
@@ -338,7 +338,7 @@ KABC::AddresseeList VCardXXPort::filterContacts( const KABC::AddresseeList &addr
if ( addrList.isEmpty() )
return addrList;
- VCardExportSelectionDialog dlg( tqparentWidget() );
+ VCardExportSelectionDialog dlg( parentWidget() );
if ( !dlg.exec() )
return list;