From f4fae92b6768541e2952173c3d4b09040f95bf7e Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 16 Feb 2011 20:17:18 +0000 Subject: 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 --- kaddressbook/xxport/Makefile.am | 18 +++---- kaddressbook/xxport/csv_xxport.cpp | 14 ++--- kaddressbook/xxport/csvimportdialog.cpp | 34 ++++++------- kaddressbook/xxport/dateparser.h | 2 +- kaddressbook/xxport/gnokii_xxport.cpp | 90 ++++++++++++++++----------------- kaddressbook/xxport/kde2_xxport.cpp | 4 +- kaddressbook/xxport/ldif_xxport.cpp | 10 ++-- kaddressbook/xxport/opera_xxport.cpp | 26 +++++----- kaddressbook/xxport/pab_xxport.cpp | 2 +- kaddressbook/xxport/vcard_xxport.cpp | 52 +++++++++---------- 10 files changed, 126 insertions(+), 126 deletions(-) (limited to 'kaddressbook/xxport') 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( "Unable to open file %1.%2." ); - 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( "Unable to open file %1." ); - 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() "
  • M: month with 2 digits
  • " "
  • d: day with 1 or 2 digits
  • " "
  • D: day with 2 digits
  • " ) ); - 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("%1%2"); + TQString format = TQString::tqfromLatin1("%1%2"); - return TQString::fromLatin1("%1
    %2%3%4%5%6

    ") + return TQString::tqfromLatin1("%1
    %2%3%4%5%6

    ") .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("Please connect your Mobile Phone to your computer and press " "Continue to start importing the personal contacts.

    " "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.
    ") )) return addrList; - m_progressDlg = new KProgressDialog( parentWidget(), "importwidget", + m_progressDlg = new KProgressDialog( tqparentWidget(), "importwidget", i18n("Mobile Phone Import"), i18n("
    Establishing connection to the Mobile Phone.

    " "Please wait...
    ") ); @@ -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("Please connect your Mobile Phone to your computer and press " "Continue to start exporting the selected personal contacts.

    " "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.
    ") )) return false; - m_progressDlg = new KProgressDialog( parentWidget(), "importwidget", + m_progressDlg = new KProgressDialog( tqparentWidget(), "importwidget", i18n("Mobile Phone Export"), i18n("
    Establishing connection to the Mobile Phone.

    " "Please wait...
    ") ); @@ -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("Do you want the selected contacts to be appended to " - "the current mobile phonebook or should they replace all " + "the current mobile phonebook or should they tqreplace all " "currently existing phonebook entries ?

    " - "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.
    "), 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("The following contacts could not be exported to the Mobile Phone. " "Possible Reasons for this problem could be: