summaryrefslogtreecommitdiffstats
path: root/libkcal/incidenceformatter.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 06:08:18 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 06:08:18 +0000
commit4c6f8d69e2d1501837affb472c4eb8fec4462240 (patch)
tree766a8ad7939fcf3eec534184c36bd0e0f80489e2 /libkcal/incidenceformatter.cpp
parent469cc56a805bd3d6940d54adbef554877c29853c (diff)
downloadtdepim-4c6f8d69e2d1501837affb472c4eb8fec4462240.tar.gz
tdepim-4c6f8d69e2d1501837affb472c4eb8fec4462240.zip
rename the following methods:
tqfind find tqreplace replace tqcontains contains git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'libkcal/incidenceformatter.cpp')
-rw-r--r--libkcal/incidenceformatter.cpp66
1 files changed, 33 insertions, 33 deletions
diff --git a/libkcal/incidenceformatter.cpp b/libkcal/incidenceformatter.cpp
index 36f988752..49c3967aa 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.tqcontains( "\n" );
+ int numLineBreaks = text.contains( "\n" );
TQString str = "<" + tag + ">";
TQString tmpText = text;
TQString tmpStr = str;
@@ -83,7 +83,7 @@ static TQString htmlAddTag( const TQString & tag, const TQString & text )
int pos = 0;
TQString tmp;
for( int i = 0; i <= numLineBreaks; i++ ) {
- pos = tmpText.tqfind( "\n" );
+ pos = tmpText.find( "\n" );
tmp = tmpText.left( pos );
tmpText = tmpText.right( tmpText.length() - pos - 1 );
tmpStr += tmp + "<br>";
@@ -2278,7 +2278,7 @@ static bool incidenceOwnedByMe( Calendar *calendar, Incidence *incidence )
return true;
}
const TQString subRes = res->subresourceIdentifier( incidence );
- if ( !subRes.tqcontains( "/.INBOX.directory/" ) ) {
+ if ( !subRes.contains( "/.INBOX.directory/" ) ) {
return false;
}
return true;
@@ -2907,9 +2907,9 @@ TQString IncidenceFormatter::msTNEFToVPart( const TQByteArray& tnef )
TQString sSenderSearchKeyEmail( tnefMsg->findProp( 0x0C1D ) );
if( !sSenderSearchKeyEmail.isEmpty() ) {
- int colon = sSenderSearchKeyEmail.tqfind( ':' );
+ int colon = sSenderSearchKeyEmail.find( ':' );
// May be e.g. "SMTP:KHZ@KDE.ORG"
- if( sSenderSearchKeyEmail.tqfind( ':' ) == -1 )
+ if( sSenderSearchKeyEmail.find( ':' ) == -1 )
sSenderSearchKeyEmail.remove( 0, colon+1 );
}
@@ -2920,7 +2920,7 @@ TQString IncidenceFormatter::msTNEFToVPart( const TQByteArray& tnef )
it != attendees.end(); ++it ) {
// Skip all entries that have no '@' since these are
// no mail addresses
- if( (*it).tqfind('@') == -1 ) {
+ if( (*it).find('@') == -1 ) {
s = (*it).stripWhiteSpace();
Attendee *attendee = new Attendee( s, s, true );
@@ -2966,12 +2966,12 @@ TQString IncidenceFormatter::msTNEFToVPart( const TQByteArray& tnef )
if( !s.isEmpty() )
event->setOrganizer( s );
- s = tnefMsg->findProp( 0x8516 ).tqreplace( TQChar( '-' ), TQString() )
- .tqreplace( TQChar( ':' ), TQString() );
+ s = tnefMsg->findProp( 0x8516 ).replace( TQChar( '-' ), TQString() )
+ .replace( TQChar( ':' ), TQString() );
event->setDtStart( TQDateTime::fromString( s ) ); // ## Format??
- s = tnefMsg->findProp( 0x8517 ).tqreplace( TQChar( '-' ), TQString() )
- .tqreplace( TQChar( ':' ), TQString() );
+ s = tnefMsg->findProp( 0x8517 ).replace( TQChar( '-' ), TQString() )
+ .replace( TQChar( ':' ), TQString() );
event->setDtEnd( TQDateTime::fromString( s ) );
s = tnefMsg->findProp( 0x8208 );
@@ -2988,8 +2988,8 @@ 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 ).tqreplace( TQChar( '-' ), TQString() )
- .tqreplace( TQChar( ':' ), TQString() );
+ s = tnefMsg->findProp( 0x8202 ).replace( TQChar( '-' ), TQString() )
+ .replace( TQChar( ':' ), TQString() );
// ### libkcal always uses tqcurrentDateTime()
// event->setDtStamp(TQDateTime::fromString(s));
@@ -3010,12 +3010,12 @@ TQString IncidenceFormatter::msTNEFToVPart( const TQByteArray& tnef )
Alarm *alarm = new Alarm(event);
TQDateTime highNoonTime =
pureISOToLocalTQDateTime( tnefMsg->findProp( 0x8502 )
- .tqreplace( TQChar( '-' ), "" )
- .tqreplace( TQChar( ':' ), "" ) );
+ .replace( TQChar( '-' ), "" )
+ .replace( TQChar( ':' ), "" ) );
TQDateTime wakeMeUpTime =
pureISOToLocalTQDateTime( tnefMsg->findProp( 0x8560, "" )
- .tqreplace( TQChar( '-' ), "" )
- .tqreplace( TQChar( ':' ), "" ) );
+ .replace( TQChar( '-' ), "" )
+ .replace( 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 )
- .tqreplace( TQChar( '-' ), TQString() )
- .tqreplace( TQChar( ':' ), TQString() );
+ .replace( TQChar( '-' ), TQString() )
+ .replace( TQChar( ':' ), TQString() );
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 )
- .tqreplace( TQChar( '-' ), TQString() )
- .tqreplace( TQChar( ':' ), TQString() );
+ .replace( TQChar( '-' ), TQString() )
+ .replace( TQChar( ':' ), TQString() );
if( !s.isEmpty() )
addressee.setBirthday( TQDateTime::fromString( s ) );
@@ -3218,25 +3218,25 @@ TQString IncidenceFormatter::ToolTipVisitor::dateRangeText( Event *event, const
tmp = "<br>" + i18n("Event start", "<i>From:</i>&nbsp;%1");
if (event->doesFloat())
- ret += tmp.tqarg( IncidenceFormatter::dateToString( startDt, false ).tqreplace(" ", "&nbsp;") );
+ ret += tmp.tqarg( IncidenceFormatter::dateToString( startDt, false ).replace(" ", "&nbsp;") );
else
- ret += tmp.tqarg( IncidenceFormatter::dateToString( startDt ).tqreplace(" ", "&nbsp;") );
+ ret += tmp.tqarg( IncidenceFormatter::dateToString( startDt ).replace(" ", "&nbsp;") );
tmp = "<br>" + i18n("Event end","<i>To:</i>&nbsp;%1");
if (event->doesFloat())
- ret += tmp.tqarg( IncidenceFormatter::dateToString( endDt, false ).tqreplace(" ", "&nbsp;") );
+ ret += tmp.tqarg( IncidenceFormatter::dateToString( endDt, false ).replace(" ", "&nbsp;") );
else
- ret += tmp.tqarg( IncidenceFormatter::dateToString( endDt ).tqreplace(" ", "&nbsp;") );
+ ret += tmp.tqarg( IncidenceFormatter::dateToString( endDt ).replace(" ", "&nbsp;") );
} else {
ret += "<br>"+i18n("<i>Date:</i>&nbsp;%1").
- tqarg( IncidenceFormatter::dateToString( startDt, false ).tqreplace(" ", "&nbsp;") );
+ tqarg( IncidenceFormatter::dateToString( startDt, false ).replace(" ", "&nbsp;") );
if ( !event->doesFloat() ) {
const TQString dtStartTime =
- IncidenceFormatter::timeToString( startDt, true ).tqreplace( " ", "&nbsp;" );
+ IncidenceFormatter::timeToString( startDt, true ).replace( " ", "&nbsp;" );
const TQString dtEndTime =
- IncidenceFormatter::timeToString( endDt, true ).tqreplace( " ", "&nbsp;" );
+ IncidenceFormatter::timeToString( endDt, true ).replace( " ", "&nbsp;" );
if ( dtStartTime == dtEndTime ) { // to prevent 'Time: 17:00 - 17:00'
tmp = "<br>" + i18n("time for event, &nbsp; to prevent ugly line breaks",
"<i>Time:</i>&nbsp;%1").
@@ -3268,7 +3268,7 @@ TQString IncidenceFormatter::ToolTipVisitor::dateRangeText( Todo *todo, const TQ
ret += "<br>" +
i18n("<i>Start:</i>&nbsp;%1").
tqarg( IncidenceFormatter::dateTimeToString( startDt, floats, false ).
- tqreplace( " ", "&nbsp;" ) );
+ replace( " ", "&nbsp;" ) );
}
if ( todo->hasDueDate() && todo->dtDue().isValid() ) {
@@ -3283,7 +3283,7 @@ TQString IncidenceFormatter::ToolTipVisitor::dateRangeText( Todo *todo, const TQ
ret += "<br>" +
i18n("<i>Due:</i>&nbsp;%1").
tqarg( IncidenceFormatter::dateTimeToString( dueDt, floats, false ).
- tqreplace( " ", "&nbsp;" ) );
+ replace( " ", "&nbsp;" ) );
}
// 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 += "<br>";
if ( todo->isCompleted() ) {
ret += "<i>" + i18n( "Completed:" ) + "</i>" + "&nbsp;";
- ret += todo->completedStr().tqreplace( " ", "&nbsp;" );
+ ret += todo->completedStr().replace( " ", "&nbsp;" );
} else {
ret += "<i>" + i18n( "Percent Done:" ) + "</i>" + "&nbsp;";
ret += i18n( "%1%" ).tqarg( todo->percentComplete() );
@@ -3475,7 +3475,7 @@ TQString IncidenceFormatter::ToolTipVisitor::generateToolTip( Incidence* inciden
TQString tmp = "<qt>";
// header
- tmp += "<b>" + incidence->summary().tqreplace( "\n", "<br>" ) + "</b>";
+ tmp += "<b>" + incidence->summary().replace( "\n", "<br>" ) + "</b>";
//NOTE: using <hr> seems to confuse TQt3 tooltips in some cases so use "-----"
tmp += "<br>----------<br>";
@@ -3492,7 +3492,7 @@ TQString IncidenceFormatter::ToolTipVisitor::generateToolTip( Incidence* inciden
if ( !incidence->location().isEmpty() ) {
tmp += "<br>";
tmp += "<i>" + i18n( "Location:" ) + "</i>" + "&nbsp;";
- tmp += incidence->location().tqreplace( "\n", "<br>" );
+ tmp += incidence->location().replace( "\n", "<br>" );
}
TQString durStr = IncidenceFormatter::durationString( incidence );
@@ -3515,7 +3515,7 @@ TQString IncidenceFormatter::ToolTipVisitor::generateToolTip( Incidence* inciden
}
tmp += "<br>----------<br>";
tmp += "<i>" + i18n( "Description:" ) + "</i>" + "<br>";
- tmp += desc.tqreplace( "\n", "<br>" );
+ tmp += desc.replace( "\n", "<br>" );
tmp += "<br>----------";
}