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 --- libkcal/incidenceformatter.cpp | 90 +++++++++++++++++++++--------------------- 1 file changed, 45 insertions(+), 45 deletions(-) (limited to 'libkcal/incidenceformatter.cpp') diff --git a/libkcal/incidenceformatter.cpp b/libkcal/incidenceformatter.cpp index cebdd0b16..ebfb68eab 100644 --- a/libkcal/incidenceformatter.cpp +++ b/libkcal/incidenceformatter.cpp @@ -74,7 +74,7 @@ static TQString htmlAddLink( const TQString &ref, const TQString &text, static TQString htmlAddTag( const TQString & tag, const TQString & text ) { - int numLineBreaks = text.contains( "\n" ); + int numLineBreaks = text.tqcontains( "\n" ); TQString str = "<" + tag + ">"; TQString tmpText = text; TQString tmpStr = str; @@ -184,7 +184,7 @@ static TQString displayViewLinkPerson( const TQString& email, TQString name, TQS // and either name or uid is missing if ( !email.isEmpty() && ( name.isEmpty() || uid.isEmpty() ) ) { KABC::AddressBook *add_book = KABC::StdAddressBook::self( true ); - KABC::Addressee::List addressList = add_book->findByEmail( email ); + KABC::Addressee::List addressList = add_book->tqfindByEmail( email ); if ( !addressList.isEmpty() ) { KABC::Addressee o = addressList.first(); if ( !o.isEmpty() && addressList.size() < 2 ) { @@ -1135,7 +1135,7 @@ static TQString invitationPerson( const TQString& email, TQString name, TQString // and either name or uid is missing if ( !email.isEmpty() && ( name.isEmpty() || uid.isEmpty() ) ) { KABC::AddressBook *add_book = KABC::StdAddressBook::self( true ); - KABC::Addressee::List addressList = add_book->findByEmail( email ); + KABC::Addressee::List addressList = add_book->tqfindByEmail( email ); if ( !addressList.isEmpty() ) { KABC::Addressee o = addressList.first(); if ( !o.isEmpty() && addressList.size() < 2 ) { @@ -2278,7 +2278,7 @@ static bool incidenceOwnedByMe( Calendar *calendar, Incidence *incidence ) return true; } const TQString subRes = res->subresourceIdentifier( incidence ); - if ( !subRes.contains( "/.INBOX.directory/" ) ) { + if ( !subRes.tqcontains( "/.INBOX.directory/" ) ) { return false; } return true; @@ -2426,9 +2426,9 @@ TQString IncidenceFormatter::formatICalInvitationHelper( TQString invitation, // First make the text of the message TQString html; - TQString tableStyle = TQString::fromLatin1( + TQString tableStyle = TQString::tqfromLatin1( "style=\"border: solid 1px; margin: 0em;\"" ); - TQString tableHead = TQString::fromLatin1( + TQString tableHead = TQString::tqfromLatin1( "
" "" "
").arg(tableStyle); @@ -2701,7 +2701,7 @@ TQString IncidenceFormatter::formatICalInvitationNoHtml( TQString invitation, //----------------------------------------------------------------------------- -static TQString stringProp( KTNEFMessage* tnefMsg, const Q_UINT32& key, +static TQString stringProp( KTNEFMessage* tnefMsg, const TQ_UINT32& key, const TQString& fallback = TQString::null) { return tnefMsg->findProp( key < 0x10000 ? key & 0xFFFF : key >> 16, @@ -2831,7 +2831,7 @@ TQString IncidenceFormatter::msTNEFToVPart( const TQByteArray& tnef ) KTNEFParser parser; TQBuffer buf( tnef ); - CalendarLocal cal ( TQString::fromLatin1( "UTC" ) ); + CalendarLocal cal ( TQString::tqfromLatin1( "UTC" ) ); KABC::Addressee addressee; KABC::VCardConverter cardConv; ICalFormat calFormat; @@ -2926,13 +2926,13 @@ TQString IncidenceFormatter::msTNEFToVPart( const TQByteArray& tnef ) Attendee *attendee = new Attendee( s, s, true ); if( bIsReply ) { if( bCompatMethodAccepted ) - attendee->setStatus( Attendee::Accepted ); + attendee->seStatus( Attendee::Accepted ); if( bCompatMethodDeclined ) - attendee->setStatus( Attendee::Declined ); + attendee->seStatus( Attendee::Declined ); if( bCompatMethodAcceptedCond ) - attendee->setStatus(Attendee::Tentative); + attendee->seStatus(Attendee::Tentative); } else { - attendee->setStatus( Attendee::NeedsAction ); + attendee->seStatus( Attendee::NeedsAction ); attendee->setRole( Attendee::ReqParticipant ); } event->addAttendee(attendee); @@ -2947,13 +2947,13 @@ TQString IncidenceFormatter::msTNEFToVPart( const TQByteArray& tnef ) true ); if( bIsReply ) { if( bCompatMethodAccepted ) - attendee->setStatus( Attendee::Accepted ); + attendee->seStatus( Attendee::Accepted ); if( bCompatMethodAcceptedCond ) - attendee->setStatus( Attendee::Declined ); + attendee->seStatus( Attendee::Declined ); if( bCompatMethodDeclined ) - attendee->setStatus( Attendee::Tentative ); + attendee->seStatus( Attendee::Tentative ); } else { - attendee->setStatus(Attendee::NeedsAction); + attendee->seStatus(Attendee::NeedsAction); attendee->setRole(Attendee::ReqParticipant); } event->addAttendee(attendee); @@ -2966,12 +2966,12 @@ TQString IncidenceFormatter::msTNEFToVPart( const TQByteArray& tnef ) if( !s.isEmpty() ) event->setOrganizer( s ); - s = tnefMsg->findProp( 0x8516 ).replace( TQChar( '-' ), TQString::null ) - .replace( TQChar( ':' ), TQString::null ); + s = tnefMsg->findProp( 0x8516 ).tqreplace( TQChar( '-' ), TQString::null ) + .tqreplace( TQChar( ':' ), TQString::null ); event->setDtStart( TQDateTime::fromString( s ) ); // ## Format?? - s = tnefMsg->findProp( 0x8517 ).replace( TQChar( '-' ), TQString::null ) - .replace( TQChar( ':' ), TQString::null ); + s = tnefMsg->findProp( 0x8517 ).tqreplace( TQChar( '-' ), TQString::null ) + .tqreplace( TQChar( ':' ), TQString::null ); event->setDtEnd( TQDateTime::fromString( s ) ); s = tnefMsg->findProp( 0x8208 ); @@ -2988,9 +2988,9 @@ TQString IncidenceFormatter::msTNEFToVPart( const TQByteArray& tnef ) // PENDING(khz): is this value in local timezone? Must it be // adjusted? Most likely this is a bug in the server or in // Outlook - we ignore it for now. - s = tnefMsg->findProp( 0x8202 ).replace( TQChar( '-' ), TQString::null ) - .replace( TQChar( ':' ), TQString::null ); - // ### libkcal always uses currentDateTime() + s = tnefMsg->findProp( 0x8202 ).tqreplace( TQChar( '-' ), TQString::null ) + .tqreplace( TQChar( ':' ), TQString::null ); + // ### libkcal always uses tqcurrentDateTime() // event->setDtStamp(TQDateTime::fromString(s)); s = tnefMsg->findNamedProp( "Keywords" ); @@ -3010,12 +3010,12 @@ TQString IncidenceFormatter::msTNEFToVPart( const TQByteArray& tnef ) Alarm *alarm = new Alarm(event); TQDateTime highNoonTime = pureISOToLocalQDateTime( tnefMsg->findProp( 0x8502 ) - .replace( TQChar( '-' ), "" ) - .replace( TQChar( ':' ), "" ) ); + .tqreplace( TQChar( '-' ), "" ) + .tqreplace( TQChar( ':' ), "" ) ); TQDateTime wakeMeUpTime = pureISOToLocalQDateTime( tnefMsg->findProp( 0x8560, "" ) - .replace( TQChar( '-' ), "" ) - .replace( TQChar( ':' ), "" ) ); + .tqreplace( TQChar( '-' ), "" ) + .tqreplace( TQChar( ':' ), "" ) ); alarm->setTime(wakeMeUpTime); if( highNoonTime.isValid() && wakeMeUpTime.isValid() ) @@ -3047,8 +3047,8 @@ TQString IncidenceFormatter::msTNEFToVPart( const TQByteArray& tnef ) addressee.insertCustom( "KADDRESSBOOK", "X-Profession", stringProp( tnefMsg, MAPI_TAG_PR_PROFESSION ) ); TQString s = tnefMsg->findProp( MAPI_TAG_PR_WEDDING_ANNIVERSARY ) - .replace( TQChar( '-' ), TQString::null ) - .replace( TQChar( ':' ), TQString::null ); + .tqreplace( TQChar( '-' ), TQString::null ) + .tqreplace( TQChar( ':' ), TQString::null ); if( !s.isEmpty() ) addressee.insertCustom( "KADDRESSBOOK", "X-Anniversary", s ); @@ -3114,8 +3114,8 @@ TQString IncidenceFormatter::msTNEFToVPart( const TQByteArray& tnef ) addressee.insertPhoneNumber( KABC::PhoneNumber( nr, KABC::PhoneNumber::Fax | KABC::PhoneNumber::Work ) ); s = tnefMsg->findProp( MAPI_TAG_PR_BIRTHDAY ) - .replace( TQChar( '-' ), TQString::null ) - .replace( TQChar( ':' ), TQString::null ); + .tqreplace( TQChar( '-' ), TQString::null ) + .tqreplace( TQChar( ':' ), TQString::null ); if( !s.isEmpty() ) addressee.setBirthday( TQDateTime::fromString( s ) ); @@ -3218,25 +3218,25 @@ TQString IncidenceFormatter::ToolTipVisitor::dateRangeText( Event *event, const tmp = "
" + i18n("Event start", "From: %1"); if (event->doesFloat()) - ret += tmp.arg( IncidenceFormatter::dateToString( startDt, false ).replace(" ", " ") ); + ret += tmp.arg( IncidenceFormatter::dateToString( startDt, false ).tqreplace(" ", " ") ); else - ret += tmp.arg( IncidenceFormatter::dateToString( startDt ).replace(" ", " ") ); + ret += tmp.arg( IncidenceFormatter::dateToString( startDt ).tqreplace(" ", " ") ); tmp = "
" + i18n("Event end","To: %1"); if (event->doesFloat()) - ret += tmp.arg( IncidenceFormatter::dateToString( endDt, false ).replace(" ", " ") ); + ret += tmp.arg( IncidenceFormatter::dateToString( endDt, false ).tqreplace(" ", " ") ); else - ret += tmp.arg( IncidenceFormatter::dateToString( endDt ).replace(" ", " ") ); + ret += tmp.arg( IncidenceFormatter::dateToString( endDt ).tqreplace(" ", " ") ); } else { ret += "
"+i18n("Date: %1"). - arg( IncidenceFormatter::dateToString( startDt, false ).replace(" ", " ") ); + arg( IncidenceFormatter::dateToString( startDt, false ).tqreplace(" ", " ") ); if ( !event->doesFloat() ) { const TQString dtStartTime = - IncidenceFormatter::timeToString( startDt, true ).replace( " ", " " ); + IncidenceFormatter::timeToString( startDt, true ).tqreplace( " ", " " ); const TQString dtEndTime = - IncidenceFormatter::timeToString( endDt, true ).replace( " ", " " ); + IncidenceFormatter::timeToString( endDt, true ).tqreplace( " ", " " ); if ( dtStartTime == dtEndTime ) { // to prevent 'Time: 17:00 - 17:00' tmp = "
" + i18n("time for event,   to prevent ugly line breaks", "Time: %1"). @@ -3268,7 +3268,7 @@ TQString IncidenceFormatter::ToolTipVisitor::dateRangeText( Todo *todo, const TQ ret += "
" + i18n("Start: %1"). arg( IncidenceFormatter::dateTimeToString( startDt, floats, false ). - replace( " ", " " ) ); + tqreplace( " ", " " ) ); } if ( todo->hasDueDate() && todo->dtDue().isValid() ) { @@ -3283,7 +3283,7 @@ TQString IncidenceFormatter::ToolTipVisitor::dateRangeText( Todo *todo, const TQ ret += "
" + i18n("Due: %1"). arg( IncidenceFormatter::dateTimeToString( dueDt, floats, false ). - replace( " ", " " ) ); + tqreplace( " ", " " ) ); } // Print priority and completed info here, for lack of a better place @@ -3297,7 +3297,7 @@ TQString IncidenceFormatter::ToolTipVisitor::dateRangeText( Todo *todo, const TQ ret += "
"; if ( todo->isCompleted() ) { ret += "" + i18n( "Completed:" ) + "" + " "; - ret += todo->completedStr().replace( " ", " " ); + ret += todo->completedStr().tqreplace( " ", " " ); } else { ret += "" + i18n( "Percent Done:" ) + "" + " "; ret += i18n( "%1%" ).arg( todo->percentComplete() ); @@ -3361,7 +3361,7 @@ static TQString tooltipPerson( const TQString& email, TQString name ) // and name is missing if ( name.isEmpty() && !email.isEmpty() ) { KABC::AddressBook *add_book = KABC::StdAddressBook::self( true ); - KABC::Addressee::List addressList = add_book->findByEmail( email ); + KABC::Addressee::List addressList = add_book->tqfindByEmail( email ); if ( !addressList.isEmpty() ) { KABC::Addressee o = addressList.first(); if ( !o.isEmpty() && addressList.size() < 2 ) { @@ -3475,7 +3475,7 @@ TQString IncidenceFormatter::ToolTipVisitor::generateToolTip( Incidence* inciden TQString tmp = ""; // header - tmp += "" + incidence->summary().replace( "\n", "
" ) + "
"; + tmp += "" + incidence->summary().tqreplace( "\n", "
" ) + "
"; //NOTE: using
seems to confuse TQt3 tooltips in some cases so use "-----" tmp += "
----------
"; @@ -3492,7 +3492,7 @@ TQString IncidenceFormatter::ToolTipVisitor::generateToolTip( Incidence* inciden if ( !incidence->location().isEmpty() ) { tmp += "
"; tmp += "" + i18n( "Location:" ) + "" + " "; - tmp += incidence->location().replace( "\n", "
" ); + tmp += incidence->location().tqreplace( "\n", "
" ); } TQString durStr = IncidenceFormatter::durationString( incidence ); @@ -3515,7 +3515,7 @@ TQString IncidenceFormatter::ToolTipVisitor::generateToolTip( Incidence* inciden } tmp += "
----------
"; tmp += "" + i18n( "Description:" ) + "" + "
"; - tmp += desc.replace( "\n", "
" ); + tmp += desc.tqreplace( "\n", "
" ); tmp += "
----------"; } -- cgit v1.2.1