diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-02-16 20:17:18 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-02-16 20:17:18 +0000 |
commit | f4fae92b6768541e2952173c3d4b09040f95bf7e (patch) | |
tree | d8c5d93232235cd635f3310b4d95490df181ba2d /kaddressbook/xxport | |
parent | 125c0a08265b75a133644d3b55f47e37c919f45d (diff) | |
download | tdepim-f4fae92b6768541e2952173c3d4b09040f95bf7e.tar.gz tdepim-f4fae92b6768541e2952173c3d4b09040f95bf7e.zip |
Moved kpilot from kdepim to applications, as the core Trinity libraries should not contain hardware-dependent software
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1221127 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kaddressbook/xxport')
-rw-r--r-- | kaddressbook/xxport/Makefile.am | 18 | ||||
-rw-r--r-- | kaddressbook/xxport/csv_xxport.cpp | 14 | ||||
-rw-r--r-- | kaddressbook/xxport/csvimportdialog.cpp | 34 | ||||
-rw-r--r-- | kaddressbook/xxport/dateparser.h | 2 | ||||
-rw-r--r-- | kaddressbook/xxport/gnokii_xxport.cpp | 90 | ||||
-rw-r--r-- | kaddressbook/xxport/kde2_xxport.cpp | 4 | ||||
-rw-r--r-- | kaddressbook/xxport/ldif_xxport.cpp | 10 | ||||
-rw-r--r-- | kaddressbook/xxport/opera_xxport.cpp | 26 | ||||
-rw-r--r-- | kaddressbook/xxport/pab_xxport.cpp | 2 | ||||
-rw-r--r-- | kaddressbook/xxport/vcard_xxport.cpp | 52 |
10 files changed, 126 insertions, 126 deletions
diff --git a/kaddressbook/xxport/Makefile.am b/kaddressbook/xxport/Makefile.am index 5aebc23f2..f88d91d19 100644 --- a/kaddressbook/xxport/Makefile.am +++ b/kaddressbook/xxport/Makefile.am @@ -21,33 +21,33 @@ XXLIBS = $(top_builddir)/kaddressbook/interfaces/libkabinterfaces.la \ $(top_builddir)/libkdepim/libkdepim.la libkaddrbk_csv_xxport_la_SOURCES = csv_xxport.cpp csvimportdialog.cpp dateparser.cpp -libkaddrbk_csv_xxport_la_LIBADD = $(XXLIBS) +libkaddrbk_csv_xxport_la_LIBADD = $(XXLIBS) $(LIB_QT) $(LIB_KDECORE) $(LIB_KDEUI) $(LIB_KABC) $(LIB_KIO) libkaddrbk_vcard_xxport_la_SOURCES = vcard_xxport.cpp -libkaddrbk_vcard_xxport_la_LIBADD = $(XXLIBS) \ +libkaddrbk_vcard_xxport_la_LIBADD = $(XXLIBS) $(LIB_QT) $(LIB_KDECORE) $(LIB_KDEUI) $(LIB_KABC) $(LIB_KIO) \ $(top_builddir)/kaddressbook/libkaddressbook.la \ $(top_builddir)/libkdenetwork/qgpgme/libqgpgme.la libkaddrbk_kde2_xxport_la_SOURCES = kde2_xxport.cpp -libkaddrbk_kde2_xxport_la_LIBADD = $(XXLIBS) +libkaddrbk_kde2_xxport_la_LIBADD = $(XXLIBS) $(LIB_QT) $(LIB_KDECORE) $(LIB_KDEUI) $(LIB_KABC) $(LIB_KIO) libkaddrbk_bookmark_xxport_la_SOURCES = bookmark_xxport.cpp -libkaddrbk_bookmark_xxport_la_LIBADD = $(XXLIBS) +libkaddrbk_bookmark_xxport_la_LIBADD = $(XXLIBS) $(LIB_QT) $(LIB_KDECORE) $(LIB_KDEUI) $(LIB_KABC) $(LIB_KIO) libkaddrbk_eudora_xxport_la_SOURCES = eudora_xxport.cpp -libkaddrbk_eudora_xxport_la_LIBADD = $(XXLIBS) +libkaddrbk_eudora_xxport_la_LIBADD = $(XXLIBS) $(LIB_QT) $(LIB_KDECORE) $(LIB_KDEUI) $(LIB_KABC) $(LIB_KIO) libkaddrbk_ldif_xxport_la_SOURCES = ldif_xxport.cpp -libkaddrbk_ldif_xxport_la_LIBADD = $(XXLIBS) +libkaddrbk_ldif_xxport_la_LIBADD = $(XXLIBS) $(LIB_QT) $(LIB_KDECORE) $(LIB_KDEUI) $(LIB_KABC) $(LIB_KIO) libkaddrbk_gnokii_xxport_la_SOURCES = gnokii_xxport.cpp -libkaddrbk_gnokii_xxport_la_LIBADD = $(XPMLIB) $(LIB_GNOKII) $(XXLIBS) +libkaddrbk_gnokii_xxport_la_LIBADD = $(XPMLIB) $(LIB_GNOKII) $(XXLIBS) $(LIB_QT) $(LIB_KDECORE) $(LIB_KDEUI) $(LIB_KABC) $(LIB_KIO) libkaddrbk_opera_xxport_la_SOURCES = opera_xxport.cpp -libkaddrbk_opera_xxport_la_LIBADD = $(XXLIBS) +libkaddrbk_opera_xxport_la_LIBADD = $(XXLIBS) $(LIB_QT) $(LIB_KDECORE) $(LIB_KDEUI) $(LIB_KABC) $(LIB_KIO) libkaddrbk_pab_xxport_la_SOURCES = pab_xxport.cpp pab_mapihd.cpp pab_pablib.cpp -libkaddrbk_pab_xxport_la_LIBADD = $(XXLIBS) +libkaddrbk_pab_xxport_la_LIBADD = $(XXLIBS) $(LIB_QT) $(LIB_KDECORE) $(LIB_KDEUI) $(LIB_KABC) $(LIB_KIO) noinst_HEADERS = csvimportdialog.h diff --git a/kaddressbook/xxport/csv_xxport.cpp b/kaddressbook/xxport/csv_xxport.cpp index b1ee94047..52286d3b7 100644 --- a/kaddressbook/xxport/csv_xxport.cpp +++ b/kaddressbook/xxport/csv_xxport.cpp @@ -50,7 +50,7 @@ bool CSVXXPort::exportContacts( const KABC::AddresseeList &list, const TQString& return true; 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; } @@ -58,7 +58,7 @@ bool CSVXXPort::exportContacts( const KABC::AddresseeList &list, const TQString& KTempFile tmpFile; if ( tmpFile.status() != 0 ) { TQString txt = i18n( "<qt>Unable to open file <b>%1</b>.%2.</qt>" ); - KMessageBox::error( parentWidget(), txt.arg( url.url() ) + KMessageBox::error( tqparentWidget(), txt.arg( url.url() ) .arg( strerror( tmpFile.status() ) ) ); return false; } @@ -66,19 +66,19 @@ bool CSVXXPort::exportContacts( const KABC::AddresseeList &list, const TQString& doExport( tmpFile.file(), list ); tmpFile.close(); - return KIO::NetAccess::upload( tmpFile.name(), url, parentWidget() ); + return KIO::NetAccess::upload( tmpFile.name(), url, tqparentWidget() ); } else { TQFile file( url.path() ); if ( !file.open( IO_WriteOnly ) ) { TQString txt = i18n( "<qt>Unable to open file <b>%1</b>.</qt>" ); - KMessageBox::error( parentWidget(), txt.arg( url.path() ) ); + KMessageBox::error( tqparentWidget(), txt.arg( url.path() ) ); return false; } doExport( &file, list ); file.close(); - KMessageBox::information( parentWidget(), i18n( "The contacts have been exported successfully." ) ); + KMessageBox::information( tqparentWidget(), i18n( "The contacts have been exported successfully." ) ); return true; } @@ -86,7 +86,7 @@ bool CSVXXPort::exportContacts( const KABC::AddresseeList &list, const TQString& KABC::AddresseeList CSVXXPort::importContacts( const TQString& ) const { - CSVImportDialog dlg( addressBook(), parentWidget() ); + CSVImportDialog dlg( addressBook(), tqparentWidget() ); if ( dlg.exec() ) return dlg.contacts(); else @@ -123,7 +123,7 @@ void CSVXXPort::doExport( TQFile *fp, const KABC::AddresseeList &list ) if ( !first ) t << ","; - t << "\"" << (*fieldIter)->value( addr ).replace( "\n", "\\n" ) << "\""; + t << "\"" << (*fieldIter)->value( addr ).tqreplace( "\n", "\\n" ) << "\""; first = false; } diff --git a/kaddressbook/xxport/csvimportdialog.cpp b/kaddressbook/xxport/csvimportdialog.cpp index bbcd74d2a..36f760540 100644 --- a/kaddressbook/xxport/csvimportdialog.cpp +++ b/kaddressbook/xxport/csvimportdialog.cpp @@ -367,7 +367,7 @@ void CSVImportDialog::initGUI() { mPage = plainPage(); - TQGridLayout *layout = new TQGridLayout( mPage, 1, 1, marginHint(), + TQGridLayout *tqlayout = new TQGridLayout( mPage, 1, 1, marginHint(), spacingHint() ); TQHBoxLayout *hbox = new TQHBoxLayout(); hbox->setSpacing( spacingHint() ); @@ -379,16 +379,16 @@ void CSVImportDialog::initGUI() mUrlRequester->setFilter( "*.csv" ); hbox->addWidget( mUrlRequester ); - layout->addMultiCellLayout( hbox, 0, 0, 0, 4 ); + tqlayout->addMultiCellLayout( hbox, 0, 0, 0, 4 ); // Delimiter: comma, semicolon, tab, space, other mDelimiterBox = new TQButtonGroup( i18n( "Delimiter" ), mPage ); mDelimiterBox->setColumnLayout( 0, Qt::Vertical ); - mDelimiterBox->layout()->setSpacing( spacingHint() ); - mDelimiterBox->layout()->setMargin( marginHint() ); - TQGridLayout *delimiterLayout = new TQGridLayout( mDelimiterBox->layout() ); - delimiterLayout->setAlignment( Qt::AlignTop ); - layout->addMultiCellWidget( mDelimiterBox, 1, 4, 0, 0 ); + mDelimiterBox->tqlayout()->setSpacing( spacingHint() ); + mDelimiterBox->tqlayout()->setMargin( marginHint() ); + TQGridLayout *delimiterLayout = new TQGridLayout( mDelimiterBox->tqlayout() ); + delimiterLayout->tqsetAlignment( Qt::AlignTop ); + tqlayout->addMultiCellWidget( mDelimiterBox, 1, 4, 0, 0 ); mRadioComma = new TQRadioButton( i18n( "Comma" ), mDelimiterBox ); mRadioComma->setChecked( true ); @@ -411,13 +411,13 @@ void CSVImportDialog::initGUI() mComboLine = new TQComboBox( false, mPage ); mComboLine->insertItem( i18n( "1" ) ); - layout->addWidget( mComboLine, 2, 3 ); + tqlayout->addWidget( mComboLine, 2, 3 ); mComboQuote = new TQComboBox( false, mPage ); mComboQuote->insertItem( i18n( "\"" ), 0 ); mComboQuote->insertItem( i18n( "'" ), 1 ); mComboQuote->insertItem( i18n( "None" ), 2 ); - layout->addWidget( mComboQuote, 2, 2 ); + tqlayout->addWidget( mComboQuote, 2, 2 ); mDatePatternEdit = new TQLineEdit( mPage ); mDatePatternEdit->setText( "Y-M-D" ); // ISO 8601 format as default @@ -427,28 +427,28 @@ void CSVImportDialog::initGUI() "<li>M: month with 2 digits</li>" "<li>d: day with 1 or 2 digits</li>" "<li>D: day with 2 digits</li></ul>" ) ); - layout->addWidget( mDatePatternEdit, 2, 4 ); + tqlayout->addWidget( mDatePatternEdit, 2, 4 ); label = new TQLabel( i18n( "Start at line:" ), mPage ); - layout->addWidget( label, 1, 3 ); + tqlayout->addWidget( label, 1, 3 ); label = new TQLabel( i18n( "Textquote:" ), mPage ); - layout->addWidget( label, 1, 2 ); + tqlayout->addWidget( label, 1, 2 ); label = new TQLabel( i18n( "Date format:" ), mPage ); - layout->addWidget( label, 1, 4 ); + tqlayout->addWidget( label, 1, 4 ); mIgnoreDuplicates = new TQCheckBox( mPage ); mIgnoreDuplicates->setText( i18n( "Ignore duplicate delimiters" ) ); - layout->addMultiCellWidget( mIgnoreDuplicates, 3, 3, 2, 4 ); + tqlayout->addMultiCellWidget( mIgnoreDuplicates, 3, 3, 2, 4 ); mCodecCombo = new TQComboBox( mPage ); - layout->addMultiCellWidget( mCodecCombo, 4, 4, 2, 4 ); + tqlayout->addMultiCellWidget( mCodecCombo, 4, 4, 2, 4 ); mTable = new TQTable( 0, 0, mPage ); mTable->setSelectionMode( TQTable::NoSelection ); mTable->horizontalHeader()->hide(); - layout->addMultiCellWidget( mTable, 5, 5, 0, 4 ); + tqlayout->addMultiCellWidget( mTable, 5, 5, 0, 4 ); setButtonText( User1, i18n( "Apply Template..." ) ); setButtonText( User2, i18n( "Save Template..." ) ); @@ -854,7 +854,7 @@ void CSVImportDialog::saveTemplate() if ( fileName.isEmpty() ) return; - if ( !fileName.contains( ".desktop" ) ) + if ( !fileName.tqcontains( ".desktop" ) ) fileName += ".desktop"; if( TQFileInfo(fileName).exists() ) { diff --git a/kaddressbook/xxport/dateparser.h b/kaddressbook/xxport/dateparser.h index 3087d339a..569969515 100644 --- a/kaddressbook/xxport/dateparser.h +++ b/kaddressbook/xxport/dateparser.h @@ -29,7 +29,7 @@ /** This class parses the date out of a given string with the help of a pattern. - The pattern can contains the following key characters: + The pattern can tqcontains the following key characters: y = year (e.g. 82) Y = year (e.g. 1982) m = month (e.g. 7, 07 or 12) diff --git a/kaddressbook/xxport/gnokii_xxport.cpp b/kaddressbook/xxport/gnokii_xxport.cpp index c6bd0917d..faf527073 100644 --- a/kaddressbook/xxport/gnokii_xxport.cpp +++ b/kaddressbook/xxport/gnokii_xxport.cpp @@ -173,9 +173,9 @@ static gn_error read_phone_memstat( const gn_memory_type memtype, gn_memory_stat static TQString buildPhoneInfoString( const gn_memory_status &memstat ) { - TQString format = TQString::fromLatin1("<tr><td><b>%1</b></td><td>%2</td></tr>"); + TQString format = TQString::tqfromLatin1("<tr><td><b>%1</b></td><td>%2</td></tr>"); - return TQString::fromLatin1("<b>%1</b><br><table>%2%3%4%5%6</table><br>") + return TQString::tqfromLatin1("<b>%1</b><br><table>%2%3%4%5%6</table><br>") .arg(i18n("Mobile Phone information:")) .arg(format.arg(i18n("Manufacturer")).arg(GN_FROM(manufacturer))) .arg(format.arg(i18n("Phone model")).arg(GN_FROM(model))) @@ -272,7 +272,7 @@ static gn_error read_phone_entries( const char *memtypestr, gn_memory_type memty TQDateTime datetime; gn_timestamp ts = gn_lib_get_pb_date(state); if (ts.year<1998) - datetime = TQDateTime::currentDateTime(); + datetime = TQDateTime::tqcurrentDateTime(); else datetime = TQDateTime( TQDate(ts.year, ts.month, ts.day), TQTime(ts.hour, ts.minute, ts.second) ); @@ -481,14 +481,14 @@ static gn_error xxport_phone_write_entry( int phone_location, gn_memory_type mem if (Addr->isEmpty()) continue; TQStringList a; TQChar sem(';'); - TQString sem_repl(TQString::fromLatin1(",")); - a.append( Addr->postOfficeBox().replace( sem, sem_repl ) ); - a.append( Addr->extended() .replace( sem, sem_repl ) ); - a.append( Addr->street() .replace( sem, sem_repl ) ); - a.append( Addr->locality() .replace( sem, sem_repl ) ); - a.append( Addr->region() .replace( sem, sem_repl ) ); - a.append( Addr->postalCode() .replace( sem, sem_repl ) ); - a.append( Addr->country() .replace( sem, sem_repl ) ); + TQString sem_repl(TQString::tqfromLatin1(",")); + a.append( Addr->postOfficeBox().tqreplace( sem, sem_repl ) ); + a.append( Addr->extended() .tqreplace( sem, sem_repl ) ); + a.append( Addr->street() .tqreplace( sem, sem_repl ) ); + a.append( Addr->locality() .tqreplace( sem, sem_repl ) ); + a.append( Addr->region() .tqreplace( sem, sem_repl ) ); + a.append( Addr->postalCode() .tqreplace( sem, sem_repl ) ); + a.append( Addr->country() .tqreplace( sem, sem_repl ) ); s = a.join(sem); gn_lib_set_pb_subentry(state, -1 /* index to append entry */, GN_PHONEBOOK_ENTRY_Postal, GN_PHONEBOOK_NUMBER_General, GN_TO(s)); @@ -528,7 +528,7 @@ KABC::AddresseeList GNOKIIXXPort::importContacts( const TQString& ) const { KABC::AddresseeList addrList; - if (KMessageBox::Continue != KMessageBox::warningContinueCancel(parentWidget(), + if (KMessageBox::Continue != KMessageBox::warningContinueCancel(tqparentWidget(), i18n("<qt>Please connect your Mobile Phone to your computer and press " "<b>Continue</b> to start importing the personal contacts.<br><br>" "Please note that if your Mobile Phone is not properly connected " @@ -536,7 +536,7 @@ KABC::AddresseeList GNOKIIXXPort::importContacts( const TQString& ) const "KAddressbook will behave unresponsively.</qt>") )) return addrList; - m_progressDlg = new KProgressDialog( parentWidget(), "importwidget", + m_progressDlg = new KProgressDialog( tqparentWidget(), "importwidget", i18n("Mobile Phone Import"), i18n("<qt><center>Establishing connection to the Mobile Phone.<br><br>" "Please wait...</center></qt>") ); @@ -555,7 +555,7 @@ KABC::AddresseeList GNOKIIXXPort::importContacts( const TQString& ) const m_progressDlg->unsetCursor(); if (!errStr.isEmpty()) { - KMessageBox::error(parentWidget(), errStr); + KMessageBox::error(tqparentWidget(), errStr); delete m_progressDlg; return addrList; } @@ -577,7 +577,7 @@ KABC::AddresseeList GNOKIIXXPort::importContacts( const TQString& ) const bool GNOKIIXXPort::exportContacts( const KABC::AddresseeList &list, const TQString & ) { - if (KMessageBox::Continue != KMessageBox::warningContinueCancel(parentWidget(), + if (KMessageBox::Continue != KMessageBox::warningContinueCancel(tqparentWidget(), i18n("<qt>Please connect your Mobile Phone to your computer and press " "<b>Continue</b> to start exporting the selected personal contacts.<br><br>" "Please note that if your Mobile Phone is not properly connected " @@ -585,7 +585,7 @@ bool GNOKIIXXPort::exportContacts( const KABC::AddresseeList &list, const TQStri "KAddressbook will behave unresponsively.</qt>") )) return false; - m_progressDlg = new KProgressDialog( parentWidget(), "importwidget", + m_progressDlg = new KProgressDialog( tqparentWidget(), "importwidget", i18n("Mobile Phone Export"), i18n("<qt><center>Establishing connection to the Mobile Phone.<br><br>" "Please wait...</center></qt>") ); @@ -612,7 +612,7 @@ bool GNOKIIXXPort::exportContacts( const KABC::AddresseeList &list, const TQStri m_progressDlg->unsetCursor(); if (!errStr.isEmpty()) { - KMessageBox::error(parentWidget(), errStr); + KMessageBox::error(tqparentWidget(), errStr); delete m_progressDlg; return false; } @@ -641,11 +641,11 @@ bool GNOKIIXXPort::exportContacts( const KABC::AddresseeList &list, const TQStri phone_count = memstat.used; if (memstat.free >= (int) list.count()) { - if (KMessageBox::No == KMessageBox::questionYesNo(parentWidget(), + if (KMessageBox::No == KMessageBox::questionYesNo(tqparentWidget(), i18n("<qt>Do you want the selected contacts to be <b>appended</b> to " - "the current mobile phonebook or should they <b>replace</b> all " + "the current mobile phonebook or should they <b>tqreplace</b> all " "currently existing phonebook entries ?<br><br>" - "Please note, that in case you choose to replace the phonebook " + "Please note, that in case you choose to tqreplace the phonebook " "entries, every contact in your phone will be deleted and only " "the newly exported contacts will be available from inside your phone.</qt>"), i18n("Export to Mobile Phone"), @@ -760,7 +760,7 @@ finish: if (!failedList.isEmpty()) { GNOKII_DEBUG(TQString("Failed to export: %1\n").arg(failedList.join(", "))); - KMessageBox::informationList(parentWidget(), + KMessageBox::informationList(tqparentWidget(), i18n("<qt>The following contacts could not be exported to the Mobile Phone. " "Possible Reasons for this problem could be:<br><ul>" "<li>The contacts contain more information per entry than the phone can store.</li>" @@ -827,7 +827,7 @@ static TQString businit(void) return i18n("Gnokii is not yet configured."); // uncomment to debug all gnokii communication on stderr. - // gn_log_debug_mask = GN_LOG_T_STDERR; + // gn_log_debug_tqmask = GN_LOG_T_STDERR; gn_data_clear(&data); @@ -947,9 +947,9 @@ static bool phone_entry_empty( const int index, const gn_memory_type memtype ) static TQString buildPhoneInfoString( const gn_memory_status &memstat ) { - TQString format = TQString::fromLatin1("<tr><td><b>%1</b></td><td>%2</td></tr>"); + TQString format = TQString::tqfromLatin1("<tr><td><b>%1</b></td><td>%2</td></tr>"); - return TQString::fromLatin1("<b>%1</b><br><table>%2%3%4%5%6</table><br>") + return TQString::tqfromLatin1("<b>%1</b><br><table>%2%3%4%5%6</table><br>") .arg(i18n("Mobile Phone information:")) .arg(format.arg(i18n("Manufacturer")).arg(GN_FROM(manufacturer))) .arg(format.arg(i18n("Phone model")).arg(GN_FROM(model))) @@ -1048,7 +1048,7 @@ static gn_error read_phone_entries( const char *memtypestr, gn_memory_type memty // evaluate timestamp (ignore timezone) TQDateTime datetime; if (entry.date.year<1998) - datetime = TQDateTime::currentDateTime(); + datetime = TQDateTime::tqcurrentDateTime(); else datetime = TQDateTime( TQDate(entry.date.year, entry.date.month, entry.date.day), TQTime(entry.date.hour, entry.date.minute, entry.date.second) ); @@ -1267,14 +1267,14 @@ static gn_error xxport_phone_write_entry( int phone_location, gn_memory_type mem subentry->entry_type = GN_PHONEBOOK_ENTRY_Postal; TQStringList a; TQChar sem(';'); - TQString sem_repl(TQString::fromLatin1(",")); - a.append( Addr->postOfficeBox().replace( sem, sem_repl ) ); - a.append( Addr->extended() .replace( sem, sem_repl ) ); - a.append( Addr->street() .replace( sem, sem_repl ) ); - a.append( Addr->locality() .replace( sem, sem_repl ) ); - a.append( Addr->region() .replace( sem, sem_repl ) ); - a.append( Addr->postalCode() .replace( sem, sem_repl ) ); - a.append( Addr->country() .replace( sem, sem_repl ) ); + TQString sem_repl(TQString::tqfromLatin1(",")); + a.append( Addr->postOfficeBox().tqreplace( sem, sem_repl ) ); + a.append( Addr->extended() .tqreplace( sem, sem_repl ) ); + a.append( Addr->street() .tqreplace( sem, sem_repl ) ); + a.append( Addr->locality() .tqreplace( sem, sem_repl ) ); + a.append( Addr->region() .tqreplace( sem, sem_repl ) ); + a.append( Addr->postalCode() .tqreplace( sem, sem_repl ) ); + a.append( Addr->country() .tqreplace( sem, sem_repl ) ); s = a.join(sem); strncpy(subentry->data.number, GN_TO(s), sizeof(subentry->data.number)-1); entry.subentries_count++; @@ -1323,7 +1323,7 @@ KABC::AddresseeList GNOKIIXXPort::importContacts( const TQString& ) const { KABC::AddresseeList addrList; - if (KMessageBox::Continue != KMessageBox::warningContinueCancel(parentWidget(), + if (KMessageBox::Continue != KMessageBox::warningContinueCancel(tqparentWidget(), i18n("<qt>Please connect your Mobile Phone to your computer and press " "<b>Continue</b> to start importing the personal contacts.<br><br>" "Please note that if your Mobile Phone is not properly connected " @@ -1331,7 +1331,7 @@ KABC::AddresseeList GNOKIIXXPort::importContacts( const TQString& ) const "KAddressbook will behave unresponsively.</qt>") )) return addrList; - m_progressDlg = new KProgressDialog( parentWidget(), "importwidget", + m_progressDlg = new KProgressDialog( tqparentWidget(), "importwidget", i18n("Mobile Phone Import"), i18n("<qt><center>Establishing connection to the Mobile Phone.<br><br>" "Please wait...</center></qt>") ); @@ -1350,7 +1350,7 @@ KABC::AddresseeList GNOKIIXXPort::importContacts( const TQString& ) const m_progressDlg->unsetCursor(); if (!errStr.isEmpty()) { - KMessageBox::error(parentWidget(), errStr); + KMessageBox::error(tqparentWidget(), errStr); delete m_progressDlg; return addrList; } @@ -1372,7 +1372,7 @@ KABC::AddresseeList GNOKIIXXPort::importContacts( const TQString& ) const bool GNOKIIXXPort::exportContacts( const KABC::AddresseeList &list, const TQString & ) { - if (KMessageBox::Continue != KMessageBox::warningContinueCancel(parentWidget(), + if (KMessageBox::Continue != KMessageBox::warningContinueCancel(tqparentWidget(), i18n("<qt>Please connect your Mobile Phone to your computer and press " "<b>Continue</b> to start exporting the selected personal contacts.<br><br>" "Please note that if your Mobile Phone is not properly connected " @@ -1380,7 +1380,7 @@ bool GNOKIIXXPort::exportContacts( const KABC::AddresseeList &list, const TQStri "KAddressbook will behave unresponsively.</qt>") )) return false; - m_progressDlg = new KProgressDialog( parentWidget(), "importwidget", + m_progressDlg = new KProgressDialog( tqparentWidget(), "importwidget", i18n("Mobile Phone Export"), i18n("<qt><center>Establishing connection to the Mobile Phone.<br><br>" "Please wait...</center></qt>") ); @@ -1407,7 +1407,7 @@ bool GNOKIIXXPort::exportContacts( const KABC::AddresseeList &list, const TQStri m_progressDlg->unsetCursor(); if (!errStr.isEmpty()) { - KMessageBox::error(parentWidget(), errStr); + KMessageBox::error(tqparentWidget(), errStr); delete m_progressDlg; return false; } @@ -1436,11 +1436,11 @@ bool GNOKIIXXPort::exportContacts( const KABC::AddresseeList &list, const TQStri phone_count = memstat.used; if (memstat.free >= (int) list.count()) { - if (KMessageBox::No == KMessageBox::questionYesNo(parentWidget(), + if (KMessageBox::No == KMessageBox::questionYesNo(tqparentWidget(), i18n("<qt>Do you want the selected contacts to be <b>appended</b> to " - "the current mobile phonebook or should they <b>replace</b> all " + "the current mobile phonebook or should they <b>tqreplace</b> all " "currently existing phonebook entries ?<br><br>" - "Please note, that in case you choose to replace the phonebook " + "Please note, that in case you choose to tqreplace the phonebook " "entries, every contact in your phone will be deleted and only " "the newly exported contacts will be available from inside your phone.</qt>"), i18n("Export to Mobile Phone"), @@ -1555,7 +1555,7 @@ finish: if (!failedList.isEmpty()) { GNOKII_DEBUG(TQString("Failed to export: %1\n").arg(failedList.join(", "))); - KMessageBox::informationList(parentWidget(), + KMessageBox::informationList(tqparentWidget(), i18n("<qt>The following contacts could not be exported to the Mobile Phone. " "Possible Reasons for this problem could be:<br><ul>" "<li>The contacts contain more information per entry than the phone can store.</li>" @@ -1583,7 +1583,7 @@ finish: KABC::AddresseeList GNOKIIXXPort::importContacts( const TQString& ) const { KABC::AddresseeList addrList; - KMessageBox::error(parentWidget(), i18n("Gnokii interface is not available.\n" + KMessageBox::error(tqparentWidget(), i18n("Gnokii interface is not available.\n" "Please ask your distributor to add gnokii at compile time.")); return addrList; } @@ -1591,7 +1591,7 @@ KABC::AddresseeList GNOKIIXXPort::importContacts( const TQString& ) const bool GNOKIIXXPort::exportContacts( const KABC::AddresseeList &list, const TQString & ) { Q_UNUSED(list); - KMessageBox::error(parentWidget(), i18n("Gnokii interface is not available.\n" + KMessageBox::error(tqparentWidget(), i18n("Gnokii interface is not available.\n" "Please ask your distributor to add gnokii at compile time.")); return true; } diff --git a/kaddressbook/xxport/kde2_xxport.cpp b/kaddressbook/xxport/kde2_xxport.cpp index 92a311023..fb03e2c32 100644 --- a/kaddressbook/xxport/kde2_xxport.cpp +++ b/kaddressbook/xxport/kde2_xxport.cpp @@ -49,11 +49,11 @@ KABC::AddresseeList KDE2XXPort::importContacts( const TQString& ) const { TQString fileName = locateLocal( "data", "kabc/std.vcf" ); if ( !TQFile::exists( fileName ) ) { - KMessageBox::sorry( parentWidget(), i18n( "<qt>Could not find a KDE 2 address book <b>%1</b>.</qt>" ).arg( fileName ) ); + KMessageBox::sorry( tqparentWidget(), i18n( "<qt>Could not find a KDE 2 address book <b>%1</b>.</qt>" ).arg( fileName ) ); return KABC::AddresseeList(); } - int result = KMessageBox::questionYesNoCancel( parentWidget(), + int result = KMessageBox::questionYesNoCancel( tqparentWidget(), i18n( "Override previously imported entries?" ), i18n( "Import KDE 2 Addressbook" ), i18n("Import"), i18n("Do Not Import") ); diff --git a/kaddressbook/xxport/ldif_xxport.cpp b/kaddressbook/xxport/ldif_xxport.cpp index 92143c7e2..799e4ca35 100644 --- a/kaddressbook/xxport/ldif_xxport.cpp +++ b/kaddressbook/xxport/ldif_xxport.cpp @@ -71,7 +71,7 @@ KABC::AddresseeList LDIFXXPort::importContacts( const TQString& ) const TQFile file( fileName ); if ( !file.open( IO_ReadOnly ) ) { TQString msg = i18n( "<qt>Unable to open <b>%1</b> for reading.</qt>" ); - KMessageBox::error( parentWidget(), msg.arg( fileName ) ); + KMessageBox::error( tqparentWidget(), msg.arg( fileName ) ); return addrList; } @@ -97,7 +97,7 @@ bool LDIFXXPort::exportContacts( const KABC::AddresseeList &list, const TQString return true; 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; } @@ -106,7 +106,7 @@ bool LDIFXXPort::exportContacts( const KABC::AddresseeList &list, const TQString KTempFile tmpFile; if ( tmpFile.status() != 0 ) { TQString txt = i18n( "<qt>Unable to open file <b>%1</b>.%2.</qt>" ); - KMessageBox::error( parentWidget(), txt.arg( url.url() ) + KMessageBox::error( tqparentWidget(), txt.arg( url.url() ) .arg( strerror( tmpFile.status() ) ) ); return false; } @@ -114,14 +114,14 @@ bool LDIFXXPort::exportContacts( const KABC::AddresseeList &list, const TQString doExport( tmpFile.file(), list ); tmpFile.close(); - return KIO::NetAccess::upload( tmpFile.name(), url, parentWidget() ); + return KIO::NetAccess::upload( tmpFile.name(), url, tqparentWidget() ); } else { TQString filename = url.path(); TQFile file( filename ); if ( !file.open( IO_WriteOnly ) ) { TQString txt = i18n( "<qt>Unable to open file <b>%1</b>.</qt>" ); - KMessageBox::error( parentWidget(), txt.arg( filename ) ); + KMessageBox::error( tqparentWidget(), txt.arg( filename ) ); return false; } diff --git a/kaddressbook/xxport/opera_xxport.cpp b/kaddressbook/xxport/opera_xxport.cpp index 474a66723..c10a28523 100644 --- a/kaddressbook/xxport/opera_xxport.cpp +++ b/kaddressbook/xxport/opera_xxport.cpp @@ -48,14 +48,14 @@ KABC::AddresseeList OperaXXPort::importContacts( const TQString& ) const { KABC::AddresseeList addrList; - TQString fileName = KFileDialog::getOpenFileName( TQDir::homeDirPath() + TQString::fromLatin1( "/.opera/contacts.adr" ) ); + TQString fileName = KFileDialog::getOpenFileName( TQDir::homeDirPath() + TQString::tqfromLatin1( "/.opera/contacts.adr" ) ); if ( fileName.isEmpty() ) return addrList; TQFile file( fileName ); if ( !file.open( IO_ReadOnly ) ) { TQString msg = i18n( "<qt>Unable to open <b>%1</b> for reading.</qt>" ); - KMessageBox::error( parentWidget(), msg.arg( fileName ) ); + KMessageBox::error( tqparentWidget(), msg.arg( fileName ) ); return addrList; } @@ -70,7 +70,7 @@ KABC::AddresseeList OperaXXPort::importContacts( const TQString& ) const while ( !stream.atEnd() ) { line = stream.readLine(); line = line.stripWhiteSpace(); - if ( line == TQString::fromLatin1( "#CONTACT" ) ) { + if ( line == TQString::tqfromLatin1( "#CONTACT" ) ) { parseContact = true; addr = KABC::Addressee(); continue; @@ -87,9 +87,9 @@ KABC::AddresseeList OperaXXPort::importContacts( const TQString& ) const int sep = line.find( '=' ); key = line.left( sep ).lower(); value = line.mid( sep + 1 ); - if ( key == TQString::fromLatin1( "name" ) ) + if ( key == TQString::tqfromLatin1( "name" ) ) addr.setNameFromString( value ); - else if ( key == TQString::fromLatin1( "mail" ) ) { + else if ( key == TQString::tqfromLatin1( "mail" ) ) { TQStringList emails = TQStringList::split( separator, value ); TQStringList::Iterator it = emails.begin(); @@ -98,20 +98,20 @@ KABC::AddresseeList OperaXXPort::importContacts( const TQString& ) const addr.insertEmail( *it, preferred ); preferred = false; } - } else if ( key == TQString::fromLatin1( "phone" ) ) + } else if ( key == TQString::tqfromLatin1( "phone" ) ) addr.insertPhoneNumber( KABC::PhoneNumber( value ) ); - else if ( key == TQString::fromLatin1( "fax" ) ) + else if ( key == TQString::tqfromLatin1( "fax" ) ) addr.insertPhoneNumber( KABC::PhoneNumber( value, KABC::PhoneNumber::Fax | KABC::PhoneNumber::Home ) ); - else if ( key == TQString::fromLatin1( "postaladdress" ) ) { + else if ( key == TQString::tqfromLatin1( "postaladdress" ) ) { KABC::Address address( KABC::Address::Home ); - address.setLabel( value.replace( separator, "\n" ) ); + address.setLabel( value.tqreplace( separator, "\n" ) ); addr.insertAddress( address ); - } else if ( key == TQString::fromLatin1( "description" ) ) - addr.setNote( value.replace( separator, "\n" ) ); - else if ( key == TQString::fromLatin1( "url" ) ) + } else if ( key == TQString::tqfromLatin1( "description" ) ) + addr.setNote( value.tqreplace( separator, "\n" ) ); + else if ( key == TQString::tqfromLatin1( "url" ) ) addr.setUrl( KURL( value ) ); - else if ( key == TQString::fromLatin1( "pictureurl" ) ) { + else if ( key == TQString::tqfromLatin1( "pictureurl" ) ) { KABC::Picture pic( value ); addr.setPhoto( pic ); } diff --git a/kaddressbook/xxport/pab_xxport.cpp b/kaddressbook/xxport/pab_xxport.cpp index 21ac67c07..6aa818503 100644 --- a/kaddressbook/xxport/pab_xxport.cpp +++ b/kaddressbook/xxport/pab_xxport.cpp @@ -55,7 +55,7 @@ KABC::AddresseeList PABXXPort::importContacts( const TQString& ) const if ( fileName.isEmpty() ) return addrList; if ( !TQFile::exists( fileName ) ) { - KMessageBox::sorry( parentWidget(), i18n( "<qt>Could not find a MS Exchange Personal Address Book <b>%1</b>.</qt>" ).arg( fileName ) ); + KMessageBox::sorry( tqparentWidget(), i18n( "<qt>Could not find a MS Exchange Personal Address Book <b>%1</b>.</qt>" ).arg( fileName ) ); return addrList; } diff --git a/kaddressbook/xxport/vcard_xxport.cpp b/kaddressbook/xxport/vcard_xxport.cpp index 1dfc9bcc4..69f854f33 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" ); |