diff options
Diffstat (limited to 'kopete/protocols/oscar/aim/aimcontact.cpp')
-rw-r--r-- | kopete/protocols/oscar/aim/aimcontact.cpp | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/kopete/protocols/oscar/aim/aimcontact.cpp b/kopete/protocols/oscar/aim/aimcontact.cpp index 7f14d3ba..c71fed4d 100644 --- a/kopete/protocols/oscar/aim/aimcontact.cpp +++ b/kopete/protocols/oscar/aim/aimcontact.cpp @@ -127,16 +127,16 @@ void AIMContact::setAwayMessage(const TQString &message) kdDebug(14152) << k_funcinfo << "Called for '" << contactId() << "', away msg='" << message << "'" << endl; TQString filteredMessage = message; - filteredMessage.tqreplace( + filteredMessage.replace( TQRegExp(TQString::tqfromLatin1("<[hH][tT][mM][lL].*>(.*)</[hH][tT][mM][lL]>")), TQString::tqfromLatin1("\\1")); - filteredMessage.tqreplace( + filteredMessage.replace( TQRegExp(TQString::tqfromLatin1("<[bB][oO][dD][yY].*>(.*)</[bB][oO][dD][yY]>")), TQString::tqfromLatin1("\\1") ); TQRegExp fontRemover( TQString::tqfromLatin1("<[fF][oO][nN][tT].*>(.*)</[fF][oO][nN][tT]>") ); fontRemover.setMinimal(true); - while ( filteredMessage.tqfind( fontRemover ) != -1 ) - filteredMessage.tqreplace( fontRemover, TQString::tqfromLatin1("\\1") ); + while ( filteredMessage.find( fontRemover ) != -1 ) + filteredMessage.replace( fontRemover, TQString::tqfromLatin1("\\1") ); setProperty(mProtocol->awayMessage, filteredMessage); } @@ -392,56 +392,56 @@ void AIMContact::slotSendMsg(Kopete::Message& message, Kopete::ChatSession *) //font-size:xxpt -> <font ptsize=xx> s=message.escapedBody(); - s.tqreplace ( TQRegExp( TQString::tqfromLatin1("<span style=\"([^\"]*)\">([^<]*)</span>")), + s.replace ( TQRegExp( TQString::tqfromLatin1("<span style=\"([^\"]*)\">([^<]*)</span>")), TQString::tqfromLatin1("<style>\\1;\"\\2</style>")); - s.tqreplace ( TQRegExp( TQString::tqfromLatin1("<style>([^\"]*)font-style:italic;([^\"]*)\"([^<]*)</style>")), + s.replace ( TQRegExp( TQString::tqfromLatin1("<style>([^\"]*)font-style:italic;([^\"]*)\"([^<]*)</style>")), TQString::tqfromLatin1("<i><style>\\1\\2\"\\3</style></i>")); - s.tqreplace ( TQRegExp( TQString::tqfromLatin1("<style>([^\"]*)font-weight:600;([^\"]*)\"([^<]*)</style>")), + s.replace ( TQRegExp( TQString::tqfromLatin1("<style>([^\"]*)font-weight:600;([^\"]*)\"([^<]*)</style>")), TQString::tqfromLatin1("<b><style>\\1\\2\"\\3</style></b>")); - s.tqreplace ( TQRegExp( TQString::tqfromLatin1("<style>([^\"]*)text-decoration:underline;([^\"]*)\"([^<]*)</style>")), + s.replace ( TQRegExp( TQString::tqfromLatin1("<style>([^\"]*)text-decoration:underline;([^\"]*)\"([^<]*)</style>")), TQString::tqfromLatin1("<u><style>\\1\\2\"\\3</style></u>")); - s.tqreplace ( TQRegExp( TQString::tqfromLatin1("<style>([^\"]*)font-family:([^;]*);([^\"]*)\"([^<]*)</style>")), + s.replace ( TQRegExp( TQString::tqfromLatin1("<style>([^\"]*)font-family:([^;]*);([^\"]*)\"([^<]*)</style>")), TQString::tqfromLatin1("<font face=\"\\2\"><style>\\1\\3\"\\4</style></font>")); - s.tqreplace ( TQRegExp( TQString::tqfromLatin1("<style>([^\"]*)font-size:([^p]*)pt;([^\"]*)\"([^<]*)</style>")), + s.replace ( TQRegExp( TQString::tqfromLatin1("<style>([^\"]*)font-size:([^p]*)pt;([^\"]*)\"([^<]*)</style>")), TQString::tqfromLatin1("<font ptsize=\"\\2\"><style>\\1\\3\"\\4</style></font>")); - s.tqreplace ( TQRegExp( TQString::tqfromLatin1("<style>([^\"]*)color:([^;]*);([^\"]*)\"([^<]*)</style>")), + s.replace ( TQRegExp( TQString::tqfromLatin1("<style>([^\"]*)color:([^;]*);([^\"]*)\"([^<]*)</style>")), TQString::tqfromLatin1("<font color=\"\\2\"><style>\\1\\3\"\\4</style></font>")); - s.tqreplace ( TQRegExp( TQString::tqfromLatin1("<style>([^\"]*)\"([^<]*)</style>")), + s.replace ( TQRegExp( TQString::tqfromLatin1("<style>([^\"]*)\"([^<]*)</style>")), TQString::tqfromLatin1("\\2")); //okay now change the <font ptsize="xx"> to <font size="xx"> //0-9 are size 1 - s.tqreplace ( TQRegExp ( TQString::tqfromLatin1("<font ptsize=\"\\d\">")), + s.replace ( TQRegExp ( TQString::tqfromLatin1("<font ptsize=\"\\d\">")), TQString::tqfromLatin1("<font size=\"1\">")); //10-11 are size 2 - s.tqreplace ( TQRegExp ( TQString::tqfromLatin1("<font ptsize=\"1[01]\">")), + s.replace ( TQRegExp ( TQString::tqfromLatin1("<font ptsize=\"1[01]\">")), TQString::tqfromLatin1("<font size=\"2\">")); //12-13 are size 3 - s.tqreplace ( TQRegExp ( TQString::tqfromLatin1("<font ptsize=\"1[23]\">")), + s.replace ( TQRegExp ( TQString::tqfromLatin1("<font ptsize=\"1[23]\">")), TQString::tqfromLatin1("<font size=\"3\">")); //14-16 are size 4 - s.tqreplace ( TQRegExp ( TQString::tqfromLatin1("<font ptsize=\"1[456]\">")), + s.replace ( TQRegExp ( TQString::tqfromLatin1("<font ptsize=\"1[456]\">")), TQString::tqfromLatin1("<font size=\"4\">")); //17-22 are size 5 - s.tqreplace ( TQRegExp ( TQString::tqfromLatin1("<font ptsize=\"(?:1[789]|2[012])\">")), + s.replace ( TQRegExp ( TQString::tqfromLatin1("<font ptsize=\"(?:1[789]|2[012])\">")), TQString::tqfromLatin1("<font size=\"5\">")); //23-29 are size 6 - s.tqreplace ( TQRegExp ( TQString::tqfromLatin1("<font ptsize=\"2[3456789]\">")),TQString::tqfromLatin1("<font size=\"6\">")); + s.replace ( TQRegExp ( TQString::tqfromLatin1("<font ptsize=\"2[3456789]\">")),TQString::tqfromLatin1("<font size=\"6\">")); //30- (and any I missed) are size 7 - s.tqreplace ( TQRegExp ( TQString::tqfromLatin1("<font ptsize=\"[^\"]*\">")),TQString::tqfromLatin1("<font size=\"7\">")); + s.replace ( TQRegExp ( TQString::tqfromLatin1("<font ptsize=\"[^\"]*\">")),TQString::tqfromLatin1("<font size=\"7\">")); // strip left over line break s.remove(TQRegExp(TQString::tqfromLatin1("<br\b[^>]*>$"))); - s.tqreplace ( TQRegExp ( TQString::tqfromLatin1("<br[ /]*>")), TQString::tqfromLatin1("<br>") ); + s.replace ( TQRegExp ( TQString::tqfromLatin1("<br[ /]*>")), TQString::tqfromLatin1("<br>") ); // strip left over line break s.remove( TQRegExp( TQString::tqfromLatin1( "<br>$" ) ) ); |