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 --- libkdepim/addresseeview.cpp | 112 ++++++++++++++++++++++---------------------- 1 file changed, 56 insertions(+), 56 deletions(-) (limited to 'libkdepim/addresseeview.cpp') diff --git a/libkdepim/addresseeview.cpp b/libkdepim/addresseeview.cpp index d8ead42b2..f291e4e1d 100644 --- a/libkdepim/addresseeview.cpp +++ b/libkdepim/addresseeview.cpp @@ -151,11 +151,11 @@ void AddresseeView::enableLinks( int linkMask ) TQString AddresseeView::vCardAsHTML( const KABC::Addressee& addr, ::KIMProxy *proxy, LinkMask linkMask, bool internalLoading, FieldMask fieldMask ) { - TQString image = TQString( "contact_%1_image" ).arg( addr.uid() ); + TQString image = TQString( "contact_%1_image" ).tqarg( addr.uid() ); // Style strings from Gentix; this is just an initial version. // - // These will be substituted into various HTML strings with .arg(). + // These will be substituted into various HTML strings with .tqarg(). // Search for @STYLE@ to find where. Note how we use %1 as a // placeholder where we fill in something else (in this case, // the global background color). @@ -165,12 +165,12 @@ TQString AddresseeView::vCardAsHTML( const KABC::Addressee& addr, ::KIMProxy *pr "style=\"" "padding-right: 2px; " "border-right: #000 dashed 1px; " - "background: %1;\"").arg(backgroundColor); + "background: %1;\"").tqarg(backgroundColor); TQString backgroundColor2 = KGlobalSettings::baseColor().name(); TQString cellStyle2 = TQString::tqfromLatin1( "style=\"" "padding-left: 2px; " - "background: %1;\"").arg(backgroundColor2); + "background: %1;\"").tqarg(backgroundColor2); TQString tableStyle = TQString::tqfromLatin1( "style=\"" "border: solid 1px; " @@ -216,8 +216,8 @@ TQString AddresseeView::vCardAsHTML( const KABC::Addressee& addr, ::KIMProxy *pr if ( date.isValid() ) dynamicPart += rowFmtStr - .arg( KABC::Addressee::birthdayLabel() ) - .arg( KGlobal::locale()->formatDate( date, true ) ); + .tqarg( KABC::Addressee::birthdayLabel() ) + .tqarg( KGlobal::locale()->formatDate( date, true ) ); } if ( fieldMask & PhoneFields ) { @@ -235,15 +235,15 @@ TQString AddresseeView::vCardAsHTML( const KABC::Addressee& addr, ::KIMProxy *pr if ( linkMask & PhoneLinks ) { TQString smsURL; if ( (*phoneIt).type() & KABC::PhoneNumber::Cell ) - smsURL = TQString(" (%2)" ).arg( number ).arg( i18n( "SMS") ); + smsURL = TQString(" (%2)" ).tqarg( number ).tqarg( i18n( "SMS") ); dynamicPart += rowFmtStr - .arg( (*phoneIt).typeLabel().tqreplace( " ", " " ) ) - .arg( TQString::tqfromLatin1( "%2%3" ).arg( url ).arg( number ).arg( smsURL ) ); + .tqarg( (*phoneIt).typeLabel().tqreplace( " ", " " ) ) + .tqarg( TQString::tqfromLatin1( "%2%3" ).tqarg( url ).tqarg( number ).tqarg( smsURL ) ); } else { dynamicPart += rowFmtStr - .arg( (*phoneIt).typeLabel().tqreplace( " ", " " ) ) - .arg( number ); + .tqarg( (*phoneIt).typeLabel().tqreplace( " ", " " ) ) + .tqarg( number ); } } } @@ -257,11 +257,11 @@ TQString AddresseeView::vCardAsHTML( const KABC::Addressee& addr, ::KIMProxy *pr TQUrl::encode( fullEmail ); if ( linkMask & EmailLinks ) { - dynamicPart += rowFmtStr.arg( type ) - .arg( TQString::tqfromLatin1( "%2" ) - .arg( fullEmail, TQStyleSheet::escape( *emailIt ) ) ); + dynamicPart += rowFmtStr.tqarg( type ) + .tqarg( TQString::tqfromLatin1( "%2" ) + .tqarg( fullEmail, TQStyleSheet::escape( *emailIt ) ) ); } else { - dynamicPart += rowFmtStr.arg( type ).arg( *emailIt ); + dynamicPart += rowFmtStr.tqarg( type ).tqarg( *emailIt ); } } } @@ -276,7 +276,7 @@ TQString AddresseeView::vCardAsHTML( const KABC::Addressee& addr, ::KIMProxy *pr } else { url = addr.url().prettyURL(); } - dynamicPart += rowFmtStr.arg( i18n("Homepage") ).arg( url ); + dynamicPart += rowFmtStr.tqarg( i18n("Homepage") ).tqarg( url ); } TQString blog = addr.custom( "KADDRESSBOOK", "BlogFeed" ); @@ -284,7 +284,7 @@ TQString AddresseeView::vCardAsHTML( const KABC::Addressee& addr, ::KIMProxy *pr if ( linkMask & URLLinks ) { blog = KStringHandler::tagURLs( blog ); } - dynamicPart += rowFmtStr.arg( i18n("Blog Feed") ).arg( blog ); + dynamicPart += rowFmtStr.tqarg( i18n("Blog Feed") ).tqarg( blog ); } } @@ -303,12 +303,12 @@ TQString AddresseeView::vCardAsHTML( const KABC::Addressee& addr, ::KIMProxy *pr if ( linkMask & AddressLinks ) { dynamicPart += rowFmtStr - .arg( KABC::Address::typeLabel( (*addrIt).type() ) ) - .arg( link ); + .tqarg( KABC::Address::typeLabel( (*addrIt).type() ) ) + .tqarg( link ); } else { dynamicPart += rowFmtStr - .arg( KABC::Address::typeLabel( (*addrIt).type() ) ) - .arg( formattedAddress ); + .tqarg( KABC::Address::typeLabel( (*addrIt).type() ) ) + .tqarg( formattedAddress ); } } else { TQString link = "" + @@ -316,12 +316,12 @@ TQString AddresseeView::vCardAsHTML( const KABC::Addressee& addr, ::KIMProxy *pr if ( linkMask & AddressLinks ) { dynamicPart += rowFmtStr - .arg( KABC::Address::typeLabel( (*addrIt).type() ) ) - .arg( link ); + .tqarg( KABC::Address::typeLabel( (*addrIt).type() ) ) + .tqarg( link ); } else { dynamicPart += rowFmtStr - .arg( KABC::Address::typeLabel( (*addrIt).type() ) ) - .arg( (*addrIt).label().tqreplace( '\n', "
" ) ); + .tqarg( KABC::Address::typeLabel( (*addrIt).type() ) ) + .tqarg( (*addrIt).label().tqreplace( '\n', "
" ) ); } } } @@ -333,7 +333,7 @@ TQString AddresseeView::vCardAsHTML( const KABC::Addressee& addr, ::KIMProxy *pr // the data afterwards (keeps us safe from possible % signs // in either one). notes = TQStyleSheet::escape( addr.note() ); - notes = rowFmtStr.arg( i18n( "Notes" ) ).arg( notes.tqreplace( '\n', "
" ) ) ; + notes = rowFmtStr.tqarg( i18n( "Notes" ) ).tqarg( notes.tqreplace( '\n', "
" ) ) ; } TQString customData; @@ -371,7 +371,7 @@ TQString AddresseeView::vCardAsHTML( const KABC::Addressee& addr, ::KIMProxy *pr if ( keyIt != titleMap.end() ) key = keyIt.data(); - customData += rowFmtStr.arg( key ).arg( TQStyleSheet::escape( value ) ) ; + customData += rowFmtStr.tqarg( key ).tqarg( TQStyleSheet::escape( value ) ) ; } } } @@ -385,7 +385,7 @@ TQString AddresseeView::vCardAsHTML( const KABC::Addressee& addr, ::KIMProxy *pr const TQString imAddress = addr.custom( "KADDRESSBOOK", "X-IMAddress" ); if ( !imAddress.isEmpty() ) { - customData += rowFmtStr.arg( i18n( "IM Address" ) ).arg( TQStyleSheet::escape( imAddress ) ) ; + customData += rowFmtStr.tqarg( i18n( "IM Address" ) ).tqarg( TQStyleSheet::escape( imAddress ) ) ; } if ( proxy ) { @@ -393,7 +393,7 @@ TQString AddresseeView::vCardAsHTML( const KABC::Addressee& addr, ::KIMProxy *pr // set image source to either a TQMimeSourceFactory key or a data:/ URL TQString imgSrc; if ( internalLoading ) { - imgSrc = TQString::tqfromLatin1( "im_status_%1_image").arg( addr.uid() ); + imgSrc = TQString::tqfromLatin1( "im_status_%1_image").tqarg( addr.uid() ); TQMimeSourceFactory::defaultFactory()->setPixmap( imgSrc, proxy->presenceIcon( addr.uid() ) ); } else imgSrc = pixmapAsDataUrl( proxy->presenceIcon( addr.uid() ) ); @@ -407,10 +407,10 @@ TQString AddresseeView::vCardAsHTML( const KABC::Addressee& addr, ::KIMProxy *pr // append our status to the rest of the dynamic part of the addressee dynamicPart += rowFmtStr - .arg( i18n( "Presence" ) ) - .arg( imtqStatus - .arg( imgSrc ) - .arg( proxy->presenceString( addr.uid() ) ) + .tqarg( i18n( "Presence" ) ) + .tqarg( imtqStatus + .tqarg( imgSrc ) + .tqarg( proxy->presenceString( addr.uid() ) ) ); } } @@ -424,44 +424,44 @@ TQString AddresseeView::vCardAsHTML( const KABC::Addressee& addr, ::KIMProxy *pr TQString strAddr = TQString::tqfromLatin1( "
" "" - "").arg(tableStyle); + "").tqarg(tableStyle); strAddr.append( TQString::tqfromLatin1( "") - .arg( image ) ); + .tqarg( image ) ); strAddr.append( TQString::tqfromLatin1( "" // name "") - .arg( name ) ); + .tqarg( name ) ); strAddr.append( TQString::tqfromLatin1( "" "" // role "") - .arg( role ) ); + .tqarg( role ) ); strAddr.append( TQString::tqfromLatin1( "" "" // organization "") - .arg( organization ) ); + .tqarg( organization ) ); strAddr.append( TQString::tqfromLatin1( "") - .arg( cellStyle2 ) ); + .tqarg( cellStyle2 ) ); strAddr.append( dynamicPart ); strAddr.append( notes ); strAddr.append( customData ); @@ -476,7 +476,7 @@ TQString AddresseeView::vCardAsHTML( const KABC::Addressee& addr, ::KIMProxy *pr if ( !label.isEmpty() ) addrBookName = label; } - strAddr.append( i18n( "

Address book: %1

" ).arg( addrBookName ) ); + strAddr.append( i18n( "

Address book: %1

" ).tqarg( addrBookName ) ); } return strAddr; } @@ -532,11 +532,11 @@ void AddresseeView::updateView() "%3" // dynamic part "" "" ) - .arg( KGlobalSettings::textColor().name() ) - .arg( KGlobalSettings::baseColor().name() ) - .arg( strAddr ); + .tqarg( KGlobalSettings::textColor().name() ) + .tqarg( KGlobalSettings::baseColor().name() ) + .tqarg( strAddr ); - TQString imageURL = TQString( "contact_%1_image" ).arg( mAddressee.uid() ); + TQString imageURL = TQString( "contact_%1_image" ).tqarg( mAddressee.uid() ); KABC::Picture picture = mAddressee.photo(); if ( picture.isIntern() && !picture.data().isNull() ) @@ -544,7 +544,7 @@ void AddresseeView::updateView() else { if ( !picture.url().isEmpty() ) { if ( mImageData.count() > 0 ) - TQMimeSourceFactory::defaultFactory()->setImage( imageURL, mImageData ); + TQMimeSourceFactory::defaultFactory()->setImage( imageURL, TQImage(mImageData) ); else { mImageJob = KIO::get( KURL( picture.url() ), false, false ); connect( mImageJob, TQT_SIGNAL( data( KIO::Job*, const TQByteArray& ) ), @@ -690,27 +690,27 @@ void AddresseeView::slotHighlighted( const TQString &link ) TQString email = link.mid( 7 ); emit emailHighlighted( email ); - emit highlightedMessage( i18n( "Send mail to '%1'" ).arg( email ) ); + emit highlightedMessage( i18n( "Send mail to '%1'" ).tqarg( email ) ); } else if ( link.startsWith( "phone:" ) ) { TQString number = link.mid( 8 ); emit phoneNumberHighlighted( strippedNumber( number ) ); - emit highlightedMessage( i18n( "Call number %1" ).arg( number ) ); + emit highlightedMessage( i18n( "Call number %1" ).tqarg( number ) ); } else if ( link.startsWith( "fax:" ) ) { TQString number = link.mid( 6 ); emit faxNumberHighlighted( strippedNumber( number ) ); - emit highlightedMessage( i18n( "Send fax to %1" ).arg( number ) ); + emit highlightedMessage( i18n( "Send fax to %1" ).tqarg( number ) ); } else if ( link.startsWith( "addr:" ) ) { emit highlightedMessage( i18n( "Show address on map" ) ); } else if ( link.startsWith( "sms:" ) ) { TQString number = link.mid( 6 ); - emit highlightedMessage( i18n( "Send SMS to %1" ).arg( number ) ); + emit highlightedMessage( i18n( "Send SMS to %1" ).tqarg( number ) ); } else if ( link.startsWith( "http:" ) || link.startsWith( "https:" ) ) { emit urlHighlighted( link ); - emit highlightedMessage( i18n( "Open URL %1" ).arg( link ) ); + emit highlightedMessage( i18n( "Open URL %1" ).tqarg( link ) ); } else if ( link.startsWith( "im:" ) ) { - emit highlightedMessage( i18n( "Chat with %1" ).arg( mAddressee.realName() ) ); + emit highlightedMessage( i18n( "Chat with %1" ).tqarg( mAddressee.realName() ) ); } else emit highlightedMessage( "" ); } -- cgit v1.2.1
") - .arg( cellStyle ) ); + .tqarg( cellStyle ) ); strAddr.append( TQString::tqfromLatin1( "" // image "") - .arg( cellStyle2 ) ); + .tqarg( cellStyle2 ) ); strAddr.append( TQString::tqfromLatin1( "%2
") - .arg( cellStyle2 ) ); + .tqarg( cellStyle2 ) ); strAddr.append( TQString::tqfromLatin1( "%3
") - .arg( cellStyle2 ) ); + .tqarg( cellStyle2 ) ); strAddr.append( TQString::tqfromLatin1( "%4
") - .arg( cellStyle ) ); + .tqarg( cellStyle ) ); strAddr.append( TQString::tqfromLatin1( "