diff options
Diffstat (limited to 'kopete/libkopete/private')
-rw-r--r-- | kopete/libkopete/private/kopetecommand.cpp | 8 | ||||
-rw-r--r-- | kopete/libkopete/private/kopeteemoticons.cpp | 42 | ||||
-rw-r--r-- | kopete/libkopete/private/kopeteviewmanager.cpp | 12 |
3 files changed, 31 insertions, 31 deletions
diff --git a/kopete/libkopete/private/kopetecommand.cpp b/kopete/libkopete/private/kopetecommand.cpp index f9ae7365..08575fdc 100644 --- a/kopete/libkopete/private/kopetecommand.cpp +++ b/kopete/libkopete/private/kopetecommand.cpp @@ -29,7 +29,7 @@ Kopete::Command::Command( TQObject *parent, const TQString &command, const char* const TQString &help, Kopete::CommandHandler::CommandType type, const TQString &formatString, uint minArgs, int maxArgs, const KShortcut &cut, const TQString &pix ) : KAction( command[0].upper() + command.right( command.length() - 1).lower(), pix, cut, parent, - ( command.lower() + TQString::tqfromLatin1("_command") ).latin1() ) + ( command.lower() + TQString::fromLatin1("_command") ).latin1() ) { init( command, handlerSlot, help, type, formatString, minArgs, maxArgs ); } @@ -102,8 +102,8 @@ void Kopete::Command::processCommand( const TQString &args, Kopete::ChatSession // Translate %s to the whole string and %n to current nickname - formatString.replace( TQString::tqfromLatin1("%n"), manager->myself()->nickName() ); - formatString.replace( TQString::tqfromLatin1("%s"), args ); + formatString.replace( TQString::fromLatin1("%n"), manager->myself()->nickName() ); + formatString.replace( TQString::fromLatin1("%s"), args ); // Translate %1..%N to word1..wordN @@ -115,7 +115,7 @@ void Kopete::Command::processCommand( const TQString &args, Kopete::ChatSession kdDebug(14010) << "New Command after processing alias: " << formatString << endl; - Kopete::CommandHandler::commandHandler()->processMessage( TQString::tqfromLatin1("/") + formatString, manager ); + Kopete::CommandHandler::commandHandler()->processMessage( TQString::fromLatin1("/") + formatString, manager ); } else { diff --git a/kopete/libkopete/private/kopeteemoticons.cpp b/kopete/libkopete/private/kopeteemoticons.cpp index 502504f2..f7fbb373 100644 --- a/kopete/libkopete/private/kopeteemoticons.cpp +++ b/kopete/libkopete/private/kopeteemoticons.cpp @@ -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::tqfromLatin1( "/" ) + filenameNoExt ); + pic = dir->findResource( "emoticons", d->theme + TQString::fromLatin1( "/" ) + filenameNoExt ); if( pic.isNull() ) - pic = dir->findResource( "emoticons", d->theme + TQString::tqfromLatin1( "/" ) + filenameNoExt + TQString::tqfromLatin1( ".mng" ) ); + pic = dir->findResource( "emoticons", d->theme + TQString::fromLatin1( "/" ) + filenameNoExt + TQString::fromLatin1( ".mng" ) ); if ( pic.isNull() ) - pic = dir->findResource( "emoticons", d->theme + TQString::tqfromLatin1( "/" ) + filenameNoExt + TQString::tqfromLatin1( ".png" ) ); + pic = dir->findResource( "emoticons", d->theme + TQString::fromLatin1( "/" ) + filenameNoExt + TQString::fromLatin1( ".png" ) ); if ( pic.isNull() ) - pic = dir->findResource( "emoticons", d->theme + TQString::tqfromLatin1( "/" ) + filenameNoExt + TQString::tqfromLatin1( ".gif" ) ); + pic = dir->findResource( "emoticons", d->theme + TQString::fromLatin1( "/" ) + filenameNoExt + TQString::fromLatin1( ".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::tqfromLatin1( "<img align=\"center\" src=\"" ) + + result = TQString::fromLatin1( "<img align=\"center\" src=\"" ) + e.picPath + - TQString::tqfromLatin1( "\" title=\"" ) + + TQString::fromLatin1( "\" title=\"" ) + matchEscaped + - TQString::tqfromLatin1( "\" width=\"" ) + + TQString::fromLatin1( "\" width=\"" ) + TQString::number( p.width() ) + - TQString::tqfromLatin1( "\" height=\"" ) + + TQString::fromLatin1( "\" height=\"" ) + TQString::number( p.height() ) + - TQString::tqfromLatin1( "\" />" ); + TQString::fromLatin1( "\" />" ); 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::tqfromLatin1( "/emoticons.xml" ) ); + TQString filename= KGlobal::dirs()->findResource( "emoticons", d->theme + TQString::fromLatin1( "/emoticons.xml" ) ); if(!filename.isEmpty()) return initEmoticon_emoticonsxml( filename ); - filename= KGlobal::dirs()->findResource( "emoticons", d->theme + TQString::tqfromLatin1( "/icondef.xml" ) ); + filename= KGlobal::dirs()->findResource( "emoticons", d->theme + TQString::fromLatin1( "/icondef.xml" ) ); if(!filename.isEmpty()) return initEmoticon_JEP0038( filename ); kdWarning(14010) << k_funcinfo << "emotiucon XML theme description not found" <<endl; @@ -376,7 +376,7 @@ void Emoticons::initEmoticons( const TQString &theme ) void Emoticons::initEmoticon_emoticonsxml( const TQString & filename) { - TQDomDocument emoticonMap( TQString::tqfromLatin1( "messaging-emoticon-map" ) ); + TQDomDocument emoticonMap( TQString::fromLatin1( "messaging-emoticon-map" ) ); TQFile mapFile( filename ); mapFile.open( IO_ReadOnly ); @@ -389,10 +389,10 @@ void Emoticons::initEmoticon_emoticonsxml( const TQString & filename) TQDomElement element = node.toElement(); if( !element.isNull() ) { - if( element.tagName() == TQString::tqfromLatin1( "emoticon" ) ) + if( element.tagName() == TQString::fromLatin1( "emoticon" ) ) { TQString emoticon_file = element.attribute( - TQString::tqfromLatin1( "file" ), TQString() ); + TQString::fromLatin1( "file" ), TQString() ); TQStringList items; TQDomNode emoticonNode = node.firstChild(); @@ -401,7 +401,7 @@ void Emoticons::initEmoticon_emoticonsxml( const TQString & filename) TQDomElement emoticonElement = emoticonNode.toElement(); if( !emoticonElement.isNull() ) { - if( emoticonElement.tagName() == TQString::tqfromLatin1( "string" ) ) + if( emoticonElement.tagName() == TQString::fromLatin1( "string" ) ) { items << emoticonElement.text(); } @@ -432,7 +432,7 @@ void Emoticons::initEmoticon_emoticonsxml( const TQString & filename) void Emoticons::initEmoticon_JEP0038( const TQString & filename) { - TQDomDocument emoticonMap( TQString::tqfromLatin1( "icondef" ) ); + TQDomDocument emoticonMap( TQString::fromLatin1( "icondef" ) ); TQFile mapFile( filename ); mapFile.open( IO_ReadOnly ); @@ -445,7 +445,7 @@ void Emoticons::initEmoticon_JEP0038( const TQString & filename) TQDomElement element = node.toElement(); if( !element.isNull() ) { - if( element.tagName() == TQString::tqfromLatin1( "icon" ) ) + if( element.tagName() == TQString::fromLatin1( "icon" ) ) { TQStringList items; TQString emoticon_file; @@ -456,16 +456,16 @@ void Emoticons::initEmoticon_JEP0038( const TQString & filename) TQDomElement emoticonElement = emoticonNode.toElement(); if( !emoticonElement.isNull() ) { - if( emoticonElement.tagName() == TQString::tqfromLatin1( "text" ) ) + if( emoticonElement.tagName() == TQString::fromLatin1( "text" ) ) { //TODO xml:lang items << emoticonElement.text(); } - else if( emoticonElement.tagName() == TQString::tqfromLatin1( "object" ) && emoticon_file.isEmpty() ) + else if( emoticonElement.tagName() == TQString::fromLatin1( "object" ) && emoticon_file.isEmpty() ) { TQString mime= emoticonElement.attribute( - TQString::tqfromLatin1( "mime" ), TQString::tqfromLatin1("image/*") ); - if(mime.startsWith(TQString::tqfromLatin1("image/")) && !mime.endsWith(TQString::tqfromLatin1("/svg+xml"))) + TQString::fromLatin1( "mime" ), TQString::fromLatin1("image/*") ); + if(mime.startsWith(TQString::fromLatin1("image/")) && !mime.endsWith(TQString::fromLatin1("/svg+xml"))) { emoticon_file = emoticonElement.text(); } diff --git a/kopete/libkopete/private/kopeteviewmanager.cpp b/kopete/libkopete/private/kopeteviewmanager.cpp index 7023729c..386106ef 100644 --- a/kopete/libkopete/private/kopeteviewmanager.cpp +++ b/kopete/libkopete/private/kopeteviewmanager.cpp @@ -132,7 +132,7 @@ KopeteView *KopeteViewManager::view( Kopete::ChatSession* session, const TQStrin } if( !viewPlugin ) - viewPlugin = (Kopete::ViewPlugin*)pluginManager->loadPlugin( TQString::tqfromLatin1("kopete_chatwindow") ); + viewPlugin = (Kopete::ViewPlugin*)pluginManager->loadPlugin( TQString::fromLatin1("kopete_chatwindow") ); if( viewPlugin ) { @@ -175,7 +175,7 @@ void KopeteViewManager::messageAppended( Kopete::Message &msg, Kopete::ChatSessi // append msg event to queue if chat window is active but not the chat view in it... appendMessageEvent = appendMessageEvent && !(w->isActiveWindow() && manager->view() == d->activeView); // ...and chat window is on another desktop - appendMessageEvent = appendMessageEvent && (!d->queueOnlyMessagesOnAnotherDesktop || !KWin::windowInfo( w->tqtopLevelWidget()->winId(), NET::WMDesktop ).isOnCurrentDesktop()); + appendMessageEvent = appendMessageEvent && (!d->queueOnlyMessagesOnAnotherDesktop || !KWin::windowInfo( w->topLevelWidget()->winId(), NET::WMDesktop ).isOnCurrentDesktop()); } else { @@ -219,7 +219,7 @@ void KopeteViewManager::messageAppended( Kopete::Message &msg, Kopete::ChatSessi TQString msgText = msg.plainBody(); if( msgText.length() > 90 ) - msgText = msgText.left(88) + TQString::tqfromLatin1("..."); + msgText = msgText.left(88) + TQString::fromLatin1("..."); TQString event; TQString body =i18n( "<qt>Incoming message from %1<br>\"%2\"</qt>" ); @@ -227,14 +227,14 @@ void KopeteViewManager::messageAppended( Kopete::Message &msg, Kopete::ChatSessi switch( msg.importance() ) { case Kopete::Message::Low: - event = TQString::tqfromLatin1( "kopete_contact_lowpriority" ); + event = TQString::fromLatin1( "kopete_contact_lowpriority" ); break; case Kopete::Message::Highlight: - event = TQString::tqfromLatin1( "kopete_contact_highlight" ); + event = TQString::fromLatin1( "kopete_contact_highlight" ); body = i18n( "<qt>A highlighted message arrived from %1<br>\"%2\"</qt>" ); break; default: - event = TQString::tqfromLatin1( "kopete_contact_incoming" ); + event = TQString::fromLatin1( "kopete_contact_incoming" ); } KNotification *notify=KNotification::event(msg.from()->metaContact() , event, body.tqarg( TQStyleSheet::escape(msgFrom), TQStyleSheet::escape(msgText) ), 0, /*msg.from()->metaContact(),*/ w , i18n("View") ); |