From 69cac65817d949cda2672ec4f0aa73d5e66a0ba1 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 22 Jun 2011 00:30:31 +0000 Subject: TQt4 port kdenetwork This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1237912 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kopete/libkopete/private/kopeteemoticons.cpp | 52 ++++++++++++++-------------- 1 file changed, 26 insertions(+), 26 deletions(-) (limited to 'kopete/libkopete/private/kopeteemoticons.cpp') diff --git a/kopete/libkopete/private/kopeteemoticons.cpp b/kopete/libkopete/private/kopeteemoticons.cpp index a2d33341..1edede5d 100644 --- a/kopete/libkopete/private/kopeteemoticons.cpp +++ b/kopete/libkopete/private/kopeteemoticons.cpp @@ -52,7 +52,7 @@ struct Emoticons::Emoticon bool operator< (const Emoticon &e){ return matchText.length() > e.matchText.length(); } TQString matchText; TQString matchTextEscaped; - QString picPath; + TQString picPath; TQString picHTMLCode; }; @@ -183,7 +183,7 @@ TQValueList Emoticons::tokenize( const TQString& message, uint p = c; continue; } /* strict requires space before the emoticon */ - if ( d->emoticonMap.contains( c ) ) + if ( d->emoticonMap.tqcontains( c ) ) { emoticonList = d->emoticonMap[ c ]; bool found = false; @@ -192,7 +192,7 @@ TQValueList Emoticons::tokenize( const TQString& message, uint // If this is an HTML, then search for the HTML form of the emoticon. // For instance >o) needle = ( mode & SkipHTML ) ? (*it).matchTextEscaped : (*it).matchText; - if ( ( pos == (size_t)message.find( needle, pos ) ) ) + if ( ( pos == (size_t)message.tqfind( needle, pos ) ) ) { if( mode & StrictParse ) { @@ -214,11 +214,11 @@ TQValueList Emoticons::tokenize( const TQString& message, uint { if( inHTMLEntity ){ // If we are in an HTML entitiy such as > - int htmlEnd = message.find( ';', pos ); + int htmlEnd = message.tqfind( ';', pos ); // Search for where it ends if( htmlEnd == -1 ) { - // Apparently this HTML entity isn't ended, something is wrong, try skip the '&' + // Aptqparently this HTML entity isn't ended, something is wrong, try skip the '&' // and continue kdDebug( 14000 ) << k_funcinfo << "Broken HTML entity, trying to recover." << endl; inHTMLEntity = false; @@ -300,14 +300,14 @@ void Emoticons::addIfPossible( const TQString& filenameNoExt, const TQStringList TQString pic; //maybe an extension was given, so try to find the exact file - pic = dir->findResource( "emoticons", d->theme + TQString::fromLatin1( "/" ) + filenameNoExt ); + pic = dir->findResource( "emoticons", d->theme + TQString::tqfromLatin1( "/" ) + filenameNoExt ); if( pic.isNull() ) - pic = dir->findResource( "emoticons", d->theme + TQString::fromLatin1( "/" ) + filenameNoExt + TQString::fromLatin1( ".mng" ) ); + pic = dir->findResource( "emoticons", d->theme + TQString::tqfromLatin1( "/" ) + filenameNoExt + TQString::tqfromLatin1( ".mng" ) ); if ( pic.isNull() ) - pic = dir->findResource( "emoticons", d->theme + TQString::fromLatin1( "/" ) + filenameNoExt + TQString::fromLatin1( ".png" ) ); + pic = dir->findResource( "emoticons", d->theme + TQString::tqfromLatin1( "/" ) + filenameNoExt + TQString::tqfromLatin1( ".png" ) ); if ( pic.isNull() ) - pic = dir->findResource( "emoticons", d->theme + TQString::fromLatin1( "/" ) + filenameNoExt + TQString::fromLatin1( ".gif" ) ); + pic = dir->findResource( "emoticons", d->theme + TQString::tqfromLatin1( "/" ) + filenameNoExt + TQString::tqfromLatin1( ".gif" ) ); if( !pic.isNull() ) // only add if we found one file { @@ -328,15 +328,15 @@ void Emoticons::addIfPossible( const TQString& filenameNoExt, const TQStringList // Unless we do so, ChatMessagePart::slotScrollView does not work properly and causing // HTMLPart not to be scrolled to the very last message. p.load( e.picPath ); - result = TQString::fromLatin1( "" ); + TQString::tqfromLatin1( "\" />" ); e.picHTMLCode = result; e.matchTextEscaped = matchEscaped; @@ -365,10 +365,10 @@ void Emoticons::initEmoticons( const TQString &theme ) d->emoticonAndPicList.clear(); d->emoticonMap.clear(); - TQString filename= KGlobal::dirs()->findResource( "emoticons", d->theme + TQString::fromLatin1( "/emoticons.xml" ) ); + TQString filename= KGlobal::dirs()->findResource( "emoticons", d->theme + TQString::tqfromLatin1( "/emoticons.xml" ) ); if(!filename.isEmpty()) return initEmoticon_emoticonsxml( filename ); - filename= KGlobal::dirs()->findResource( "emoticons", d->theme + TQString::fromLatin1( "/icondef.xml" ) ); + filename= KGlobal::dirs()->findResource( "emoticons", d->theme + TQString::tqfromLatin1( "/icondef.xml" ) ); if(!filename.isEmpty()) return initEmoticon_JEP0038( filename ); kdWarning(14010) << k_funcinfo << "emotiucon XML theme description not found" <