From 1c93fca14d9ce37499bcfdf994c660186a0b6f17 Mon Sep 17 00:00:00 2001 From: tpearson Date: Thu, 14 Apr 2011 20:16:30 +0000 Subject: Enable kdepim compilation under Qt4 This will likely break Qt3 compilation temporarily, which is an unintended side effect. A third and final kdepim commit will repair Qt3 compilation shortly. git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1227946 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kaddressbook/xxport/csv_xxport.cpp | 8 +- kaddressbook/xxport/csvimportdialog.cpp | 8 +- kaddressbook/xxport/eudora_xxport.cpp | 8 +- kaddressbook/xxport/gnokii_xxport.cpp | 134 ++++++++++++++++---------------- kaddressbook/xxport/kde2_xxport.cpp | 2 +- kaddressbook/xxport/ldif_xxport.cpp | 10 +-- kaddressbook/xxport/opera_xxport.cpp | 2 +- kaddressbook/xxport/pab_pablib.cpp | 4 +- kaddressbook/xxport/pab_xxport.cpp | 2 +- kaddressbook/xxport/vcard_xxport.cpp | 12 +-- 10 files changed, 95 insertions(+), 95 deletions(-) (limited to 'kaddressbook/xxport') diff --git a/kaddressbook/xxport/csv_xxport.cpp b/kaddressbook/xxport/csv_xxport.cpp index 5fdc89a5c..fc9ac247c 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( tqparentWidget(), 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\"").tqarg( url.path()) ) == KMessageBox::No) return false; } @@ -58,8 +58,8 @@ 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( tqparentWidget(), txt.arg( url.url() ) - .arg( strerror( tmpFile.status() ) ) ); + KMessageBox::error( tqparentWidget(), txt.tqarg( url.url() ) + .tqarg( strerror( tmpFile.status() ) ) ); return false; } @@ -71,7 +71,7 @@ bool CSVXXPort::exportContacts( const KABC::AddresseeList &list, const TQString& TQFile file( url.path() ); if ( !file.open( IO_WriteOnly ) ) { TQString txt = i18n( "Unable to open file %1." ); - KMessageBox::error( tqparentWidget(), txt.arg( url.path() ) ); + KMessageBox::error( tqparentWidget(), txt.tqarg( url.path() ) ); return false; } diff --git a/kaddressbook/xxport/csvimportdialog.cpp b/kaddressbook/xxport/csvimportdialog.cpp index 4356a5997..1120e4f06 100644 --- a/kaddressbook/xxport/csvimportdialog.cpp +++ b/kaddressbook/xxport/csvimportdialog.cpp @@ -383,7 +383,7 @@ void CSVImportDialog::initGUI() // Delimiter: comma, semicolon, tab, space, other mDelimiterBox = new TQButtonGroup( i18n( "Delimiter" ), mPage ); - mDelimiterBox->setColumnLayout( 0, TQt::Vertical ); + mDelimiterBox->setColumnLayout( 0, Qt::Vertical ); mDelimiterBox->tqlayout()->setSpacing( spacingHint() ); mDelimiterBox->tqlayout()->setMargin( marginHint() ); TQGridLayout *delimiterLayout = new TQGridLayout( mDelimiterBox->tqlayout() ); @@ -503,7 +503,7 @@ void CSVImportDialog::fillTable() else if ( code == Guess ) { TQTextCodec* codec = TQTextCodec::codecForContent( mFileArray.data(), mFileArray.size() ); if ( codec ) { - KMessageBox::information( this, i18n( "Using codec '%1'" ).arg( codec->name() ), i18n( "Encoding" ) ); + KMessageBox::information( this, i18n( "Using codec '%1'" ).tqarg( codec->name() ), i18n( "Encoding" ) ); inputStream.setCodec( codec ); } } @@ -663,7 +663,7 @@ void CSVImportDialog::reloadCodecs() for ( int i = 0; ( codec = TQTextCodec::codecForIndex( i ) ); i++ ) mCodecs.append( codec ); - mCodecCombo->insertItem( i18n( "Local (%1)" ).arg( TQTextCodec::codecForLocale()->name() ), Local ); + mCodecCombo->insertItem( i18n( "Local (%1)" ).tqarg( TQTextCodec::codecForLocale()->name() ), Local ); mCodecCombo->insertItem( i18n( "[guess]" ), Guess ); mCodecCombo->insertItem( i18n( "Latin1" ), Latin1 ); mCodecCombo->insertItem( i18n( "Unicode" ), Uni ); @@ -858,7 +858,7 @@ void CSVImportDialog::saveTemplate() fileName += ".desktop"; if( TQFileInfo(fileName).exists() ) { - if(KMessageBox::questionYesNo( this, i18n("Do you want to overwrite file \"%1\"").arg(fileName) ) == KMessageBox::No) + if(KMessageBox::questionYesNo( this, i18n("Do you want to overwrite file \"%1\"").tqarg(fileName) ) == KMessageBox::No) return; } TQString name = KInputDialog::getText( i18n( "Template Name" ), i18n( "Please enter a name for the template:" ) ); diff --git a/kaddressbook/xxport/eudora_xxport.cpp b/kaddressbook/xxport/eudora_xxport.cpp index ca804fe30..9844b5507 100644 --- a/kaddressbook/xxport/eudora_xxport.cpp +++ b/kaddressbook/xxport/eudora_xxport.cpp @@ -152,9 +152,9 @@ TQString EudoraXXPort::email( const TQString& line ) const { int b; TQString result; - b = line.findRev( '\"' ); + b = line.tqfindRev( '\"' ); if ( b == -1 ) { - b = line.findRev( ' ' ); + b = line.tqfindRev( ' ' ); if ( b == -1 ) return result; } @@ -168,9 +168,9 @@ TQString EudoraXXPort::comment( const TQString& line ) const int b; TQString result; uint i; - b = line.findRev( '>' ); + b = line.tqfindRev( '>' ); if ( b == -1 ) { - b = line.findRev( '\"' ); + b = line.tqfindRev( '\"' ); if ( b == -1 ) return result; } diff --git a/kaddressbook/xxport/gnokii_xxport.cpp b/kaddressbook/xxport/gnokii_xxport.cpp index 343831a90..053a850e2 100644 --- a/kaddressbook/xxport/gnokii_xxport.cpp +++ b/kaddressbook/xxport/gnokii_xxport.cpp @@ -63,7 +63,7 @@ extern "C" { #define GNOKII_CHECK_ERROR(error) \ do { \ if (error) \ - kdError() << TQString("ERROR %1: %2\n").arg(error).arg(gn_error_print(error));\ + kdError() << TQString("ERROR %1: %2\n").tqarg(error).tqarg(gn_error_print(error));\ } while (0) // Locale conversion routines: @@ -126,8 +126,8 @@ static TQString businit(void) { GNOKII_DEBUG( "Using new gnokii version." ); - GNOKII_DEBUG( TQString("Compiled with libgnokii version 0x%1\n").arg(TQString::number(LIBGNOKII_VERSION,16)) ); - GNOKII_DEBUG( TQString("Using libgnokii runtime version 0x%1\n").arg(TQString::number(gn_lib_version(),16)) ); + GNOKII_DEBUG( TQString("Compiled with libgnokii version 0x%1\n").tqarg(TQString::number(LIBGNOKII_VERSION,16)) ); + GNOKII_DEBUG( TQString("Using libgnokii runtime version 0x%1\n").tqarg(TQString::number(gn_lib_version(),16)) ); gn_error error = gn_lib_phoneprofile_load(NULL, &state); if (error) @@ -142,7 +142,7 @@ static TQString businit(void) "You might try to run \"gnokii --identify\" on the command line to " "check any cable/transport issues and to verify if your gnokii " "configuration is correct.") - .arg(gn_error_print(error)); + .tqarg(gn_error_print(error)); } // identify phone @@ -152,7 +152,7 @@ static TQString businit(void) imei = gn_lib_get_phone_imei(state); GNOKII_DEBUG( TQString("Found mobile phone: %1 %2, Revision: %3, IMEI: %4\n") - .arg(manufacturer, model, revision, imei) ); + .tqarg(manufacturer, model, revision, imei) ); return TQString(); } @@ -166,7 +166,7 @@ static gn_error read_phone_memstat( const gn_memory_type memtype, gn_memory_stat error = gn_lib_addressbook_memstat(state, memtype, &memstat->used, &memstat->free); GNOKII_DEBUG( TQString("\n\nMobile phone memory status: Type: %1, used=%2, free=%3, total=%4\n\n") - .arg(memtype).arg(memstat->used).arg(memstat->free).arg(memstat->used+memstat->free) ); + .tqarg(memtype).tqarg(memstat->used).tqarg(memstat->free).tqarg(memstat->used+memstat->free) ); return error; } @@ -176,13 +176,13 @@ static TQString buildPhoneInfoString( const gn_memory_status &memstat ) TQString format = TQString::tqfromLatin1("%1%2"); 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))) - .arg(format.arg(i18n("Revision")).arg(GN_FROM(revision))) - .arg(format.arg(i18n("IMEI")).arg(GN_FROM(imei))) - .arg(format.arg(i18n("Phonebook status")) - .arg(i18n("%1 out of %2 contacts used").arg(memstat.used).arg(memstat.used+memstat.free))); + .tqarg(i18n("Mobile Phone information:")) + .tqarg(format.tqarg(i18n("Manufacturer")).tqarg(GN_FROM(manufacturer))) + .tqarg(format.tqarg(i18n("Phone model")).tqarg(GN_FROM(model))) + .tqarg(format.tqarg(i18n("Revision")).tqarg(GN_FROM(revision))) + .tqarg(format.tqarg(i18n("IMEI")).tqarg(GN_FROM(imei))) + .tqarg(format.tqarg(i18n("Phonebook status")) + .tqarg(i18n("%1 out of %2 contacts used").tqarg(memstat.used).tqarg(memstat.used+memstat.free))); } // read and evaluate all phone entries @@ -209,9 +209,9 @@ static gn_error read_phone_entries( const char *memtypestr, gn_memory_type memty progress->setTotalSteps(memstat.used); m_progressDlg->setLabel(i18n("Importing %1 contacts from %2 of the Mobile Phone.

%3
") - .arg(memstat.used) - .arg(gn_memory_type2str(memtype)) - .arg(buildPhoneInfoString(memstat)) ); + .tqarg(memstat.used) + .tqarg(gn_memory_type2str(memtype)) + .tqarg(buildPhoneInfoString(memstat)) ); int num_read = 0; @@ -233,10 +233,10 @@ static gn_error read_phone_entries( const char *memtypestr, gn_memory_type memty const char *name = gn_lib_get_pb_name(state); const char *number = gn_lib_get_pb_number(state); - GNOKII_DEBUG(TQString("%1: %2, num=%3, location=%4, group=%5, count=%6\n").arg(i) - .arg(GN_FROM(name)).arg(GN_FROM(number)) - .arg(gn_lib_get_pb_location(state)).arg(gn_lib_get_pb_caller_group(state)) - .arg(subentries_count)); + GNOKII_DEBUG(TQString("%1: %2, num=%3, location=%4, group=%5, count=%6\n").tqarg(i) + .tqarg(GN_FROM(name)).tqarg(GN_FROM(number)) + .tqarg(gn_lib_get_pb_location(state)).tqarg(gn_lib_get_pb_caller_group(state)) + .tqarg(subentries_count)); KABC::Addressee *a = new KABC::Addressee(); // try to split Name into FamilyName and GivenName @@ -263,10 +263,10 @@ static gn_error read_phone_entries( const char *memtypestr, gn_memory_type memty } a->insertCustom(APP, "X_GSM_CALLERGROUP", s.setNum(gn_lib_get_pb_caller_group(state))); - a->insertCustom(APP, "X_GSM_STORE_AT", TQString("%1%2").arg(memtypestr).arg(gn_lib_get_pb_location(state))); + a->insertCustom(APP, "X_GSM_STORE_AT", TQString("%1%2").tqarg(memtypestr).tqarg(gn_lib_get_pb_location(state))); // set ProductId - a->setProductId(TQString("%1-%2-%3-%4").arg(APP).arg(model).arg(revision).arg(imei)); + a->setProductId(TQString("%1-%2-%3-%4").tqarg(APP).tqarg(model).tqarg(revision).tqarg(imei)); // evaluate timestamp (ignore timezone) TQDateTime datetime; @@ -276,7 +276,7 @@ static gn_error read_phone_entries( const char *memtypestr, gn_memory_type memty else datetime = TQDateTime( TQDate(ts.year, ts.month, ts.day), TQTime(ts.hour, ts.minute, ts.second) ); - GNOKII_DEBUG(TQString(" date=%1\n").arg(datetime.toString())); + GNOKII_DEBUG(TQString(" date=%1\n").tqarg(datetime.toString())); a->setRevision(datetime); if (!subentries_count) @@ -295,7 +295,7 @@ static gn_error read_phone_entries( const char *memtypestr, gn_memory_type memty TQString s = GN_FROM(number).simplifyWhiteSpace(); GNOKII_DEBUG(TQString(" Subentry#%1, entry_type=%2, number_type=%3, number=%4\n") - .arg(n).arg(entry_type).arg(number_type).arg(s)); + .tqarg(n).tqarg(entry_type).tqarg(number_type).tqarg(s)); if (s.isEmpty()) continue; switch(entry_type) { @@ -362,7 +362,7 @@ static gn_error read_phone_entries( const char *memtypestr, gn_memory_type memty break; default: GNOKII_DEBUG(TQString(" Not handled id=%1, entry=%2\n") - .arg(entry_type).arg(s)); + .tqarg(entry_type).tqarg(s)); break; } // switch() } // if(subentry) @@ -425,8 +425,8 @@ static gn_error xxport_phone_write_entry( int phone_location, gn_memory_type mem time.hour(), time.minute(), time.second(), 0 ); gn_lib_set_pb_date(state, ts); - GNOKII_DEBUG(TQString("Write #%1: name=%2, number=%3\n").arg(phone_location) - .arg(GN_FROM(gn_lib_get_pb_name(state))).arg(GN_FROM(gn_lib_get_pb_number(state)))); + GNOKII_DEBUG(TQString("Write #%1: name=%2, number=%3\n").tqarg(phone_location) + .tqarg(GN_FROM(gn_lib_get_pb_name(state))).tqarg(GN_FROM(gn_lib_get_pb_number(state)))); const KABC::Address homeAddr = addr->address(KABC::Address::Home); const KABC::Address workAddr = addr->address(KABC::Address::Work); @@ -467,7 +467,7 @@ static gn_error xxport_phone_write_entry( int phone_location, gn_memory_type mem // only one email allowed if we have URLS, notes, addresses (to avoid phone limitations) if (n && !addr->url().isEmpty() && !addr->note().isEmpty() && addr->addresses().count()) { GNOKII_DEBUG(TQString(" DROPPED email %1 in favor of URLs, notes and addresses.\n") - .arg(s)); + .tqarg(s)); continue; } gn_lib_set_pb_subentry(state, -1 /* index to append entry */, @@ -507,8 +507,8 @@ static gn_error xxport_phone_write_entry( int phone_location, gn_memory_type mem const char *number; gn_lib_get_pb_subentry(state, st, &entry_type, &number_type, &number); GNOKII_DEBUG(TQString(" SubTel #%1: entry_type=%2, number_type=%3, number=%4\n") - .arg(st).arg(entry_type) - .arg(number_type).arg(GN_FROM(number))); + .tqarg(st).tqarg(entry_type) + .tqarg(number_type).tqarg(GN_FROM(number))); } gn_error error = gn_lib_phonebook_write_entry(state, memtype, phone_location); @@ -656,9 +656,9 @@ bool GNOKIIXXPort::exportContacts( const KABC::AddresseeList &list, const TQStri m_progressDlg->setButtonText(i18n("&Stop Export")); m_progressDlg->setLabel(i18n("Exporting %1 contacts to the %2 " "of the Mobile Phone.

%3
") - .arg(list.count()) - .arg(gn_memory_type2str(memtype)) - .arg(buildPhoneInfoString(memstat)) ); + .tqarg(list.count()) + .tqarg(gn_memory_type2str(memtype)) + .tqarg(buildPhoneInfoString(memstat)) ); // Now run the loop... phone_entry_no = 1; @@ -682,7 +682,7 @@ try_next_phone_entry: break; GNOKII_DEBUG(TQString("Try to write entry '%1' at phone_entry_no=%2, phone_count=%3\n") - .arg(addr->realName()).arg(phone_entry_no).arg(phone_count)); + .tqarg(addr->realName()).tqarg(phone_entry_no).tqarg(phone_count)); error = GN_ERR_NONE; @@ -755,7 +755,7 @@ finish: delete m_progressDlg; if (!failedList.isEmpty()) { - GNOKII_DEBUG(TQString("Failed to export: %1\n").arg(failedList.join(", "))); + GNOKII_DEBUG(TQString("Failed to export: %1\n").tqarg(failedList.join(", "))); KMessageBox::informationList(tqparentWidget(), i18n("The following contacts could not be exported to the Mobile Phone. " "Possible Reasons for this problem could be: