diff options
Diffstat (limited to 'kopete/kopete/chatwindow')
-rw-r--r-- | kopete/kopete/chatwindow/chatmemberslistwidget.cpp | 8 | ||||
-rw-r--r-- | kopete/kopete/chatwindow/chatmessagepart.cpp | 48 | ||||
-rw-r--r-- | kopete/kopete/chatwindow/chatmessagepart.h | 4 | ||||
-rw-r--r-- | kopete/kopete/chatwindow/chattexteditpart.cpp | 10 | ||||
-rw-r--r-- | kopete/kopete/chatwindow/chatview.cpp | 4 | ||||
-rw-r--r-- | kopete/kopete/chatwindow/kopetechatwindow.cpp | 14 | ||||
-rw-r--r-- | kopete/kopete/chatwindow/kopetechatwindowstyle.cpp | 2 | ||||
-rw-r--r-- | kopete/kopete/chatwindow/kopetechatwindowstylemanager.cpp | 14 | ||||
-rw-r--r-- | kopete/kopete/chatwindow/kopeteemoticonaction.cpp | 2 |
9 files changed, 53 insertions, 53 deletions
diff --git a/kopete/kopete/chatwindow/chatmemberslistwidget.cpp b/kopete/kopete/chatwindow/chatmemberslistwidget.cpp index 9cafeada..9ac26ad3 100644 --- a/kopete/kopete/chatwindow/chatmemberslistwidget.cpp +++ b/kopete/kopete/chatwindow/chatmemberslistwidget.cpp @@ -55,7 +55,7 @@ public: if( TQListViewItem *item = m_listView->itemAt( pos ) ) { TQRect tqitemRect = m_listView->tqitemRect( item ); - if( tqitemRect.tqcontains( pos ) ) + if( tqitemRect.contains( pos ) ) tip( tqitemRect, static_cast<ContactItem*>( item )->contact()->toolTip() ); } } @@ -183,14 +183,14 @@ void ChatMembersListWidget::slotContextMenu( KListView*, TQListViewItem *item, c void ChatMembersListWidget::slotContactAdded( const Kopete::Contact *contact ) { - if ( !m_members.tqcontains( contact ) ) + if ( !m_members.contains( contact ) ) m_members.insert( contact, new ContactItem( this, const_cast<Kopete::Contact*>( contact ) ) ); } void ChatMembersListWidget::slotContactRemoved( const Kopete::Contact *contact ) { kdDebug(14000) << k_funcinfo << endl; - if ( m_members.tqcontains( contact ) && contact != session()->myself() ) + if ( m_members.contains( contact ) && contact != session()->myself() ) { delete m_members[ contact ]; m_members.remove( contact ); @@ -199,7 +199,7 @@ void ChatMembersListWidget::slotContactRemoved( const Kopete::Contact *contact ) void ChatMembersListWidget::slotContactStatusChanged( Kopete::Contact *contact, const Kopete::OnlineStatus &status ) { - if ( m_members.tqcontains( contact ) ) + if ( m_members.contains( contact ) ) m_members[contact]->settqStatus( status ); } diff --git a/kopete/kopete/chatwindow/chatmessagepart.cpp b/kopete/kopete/chatwindow/chatmessagepart.cpp index e91c49fe..2f16217c 100644 --- a/kopete/kopete/chatwindow/chatmessagepart.cpp +++ b/kopete/kopete/chatwindow/chatmessagepart.cpp @@ -950,7 +950,7 @@ void ChatMessagePart::copy(bool justselection /* default false */) KMultipleDrag *drag = new KMultipleDrag( ); drag->addDragObject( textdrag ); if(!htmltext.isEmpty()) { - htmltext.tqreplace( TQChar( 0xa0 ), ' ' ); + htmltext.replace( TQChar( 0xa0 ), ' ' ); TQTextDrag *htmltextdrag = new TQTextDrag(htmltext, 0L); htmltextdrag->setSubtype("html"); drag->addDragObject( htmltextdrag ); @@ -1025,9 +1025,9 @@ TQString ChatMessagePart::formatStyleKeywords( const TQString &sourceHTML, const protocolIcon = KGlobal::iconLoader()->iconPath( iconName, KIcon::Small ); nickLink=TQString::tqfromLatin1("<a href=\"kopetemessage://%1/?protocolId=%2&accountId=%3\" class=\"KopeteDisplayName\">") - .tqarg( TQStyleSheet::escape(message.from()->contactId()).tqreplace('"',"""), - TQStyleSheet::escape(message.from()->protocol()->pluginId()).tqreplace('"',"""), - TQStyleSheet::escape(message.from()->account()->accountId() ).tqreplace('"',""")); + .tqarg( TQStyleSheet::escape(message.from()->contactId()).replace('"',"""), + TQStyleSheet::escape(message.from()->protocol()->pluginId()).replace('"',"""), + TQStyleSheet::escape(message.from()->account()->accountId() ).replace('"',""")); } else { @@ -1036,15 +1036,15 @@ TQString ChatMessagePart::formatStyleKeywords( const TQString &sourceHTML, const // Replace sender (contact nick) - resultHTML = resultHTML.tqreplace( TQString::fromUtf8("%sender%"), nickLink+nick+"</a>" ); + resultHTML = resultHTML.replace( TQString::fromUtf8("%sender%"), nickLink+nick+"</a>" ); // Replace time, by default display only time and display seconds(that was true means). - resultHTML = resultHTML.tqreplace( TQString::fromUtf8("%time%"), KGlobal::locale()->formatTime(message.timestamp().time(), true) ); + resultHTML = resultHTML.replace( TQString::fromUtf8("%time%"), KGlobal::locale()->formatTime(message.timestamp().time(), true) ); // Replace %screenName% (contact ID) - resultHTML = resultHTML.tqreplace( TQString::fromUtf8("%senderScreenName%"), nickLink+TQStyleSheet::escape(contactId)+"</a>" ); + resultHTML = resultHTML.replace( TQString::fromUtf8("%senderScreenName%"), nickLink+TQStyleSheet::escape(contactId)+"</a>" ); // Replace service name (protocol name) - resultHTML = resultHTML.tqreplace( TQString::fromUtf8("%service%"), TQStyleSheet::escape(service) ); + resultHTML = resultHTML.replace( TQString::fromUtf8("%service%"), TQStyleSheet::escape(service) ); // Replace protocolIcon (sender statusIcon) - resultHTML = resultHTML.tqreplace( TQString::fromUtf8("%senderStatusIcon%"), TQStyleSheet::escape(protocolIcon).tqreplace('"',""") ); + resultHTML = resultHTML.replace( TQString::fromUtf8("%senderStatusIcon%"), TQStyleSheet::escape(protocolIcon).replace('"',""") ); // Look for %time{X}% TQRegExp timeRegExp("%time\\{([^}]*)\\}%"); @@ -1052,7 +1052,7 @@ TQString ChatMessagePart::formatStyleKeywords( const TQString &sourceHTML, const while( (pos=timeRegExp.search(resultHTML , pos) ) != -1 ) { TQString timeKeyword = formatTime( timeRegExp.cap(1), message.timestamp() ); - resultHTML = resultHTML.tqreplace( pos , timeRegExp.cap(0).length() , timeKeyword ); + resultHTML = resultHTML.replace( pos , timeRegExp.cap(0).length() , timeKeyword ); } // Look for %textbackgroundcolor{X}% @@ -1069,7 +1069,7 @@ TQString ChatMessagePart::formatStyleKeywords( const TQString &sourceHTML, const int textPos=0; while( (textPos=textBackgroundRegExp.search(resultHTML, textPos) ) != -1 ) { - resultHTML = resultHTML.tqreplace( textPos , textBackgroundRegExp.cap(0).length() , bgColor ); + resultHTML = resultHTML.replace( textPos , textBackgroundRegExp.cap(0).length() , bgColor ); } // Replace userIconPath @@ -1098,7 +1098,7 @@ TQString ChatMessagePart::formatStyleKeywords( const TQString &sourceHTML, const else if(message.direction() == Kopete::Message::Outbound) photoPath = TQString::fromUtf8("Outgoing/buddy_icon.png"); } - resultHTML = resultHTML.tqreplace(TQString::fromUtf8("%userIconPath%"), photoPath); + resultHTML = resultHTML.replace(TQString::fromUtf8("%userIconPath%"), photoPath); } // Replace messages. @@ -1113,7 +1113,7 @@ TQString ChatMessagePart::formatStyleKeywords( const TQString &sourceHTML, const } // Set message direction("rtl"(Right-To-Left) or "ltr"(Left-to-right)) - resultHTML = resultHTML.tqreplace( TQString::fromUtf8("%messageDirection%"), message.isRightToLeft() ? "rtl" : "ltr" ); + resultHTML = resultHTML.replace( TQString::fromUtf8("%messageDirection%"), message.isRightToLeft() ? "rtl" : "ltr" ); // These colors are used for coloring nicknames. I tried to use // colors both visible on light and dark background. @@ -1149,12 +1149,12 @@ TQString ChatMessagePart::formatStyleKeywords( const TQString &sourceHTML, const if ( doLight && lightColorName.isNull() ) lightColorName = TQColor( colorName ).light( light ).name(); - resultHTML = resultHTML.tqreplace( textPos , senderColorRegExp.cap(0).length(), + resultHTML = resultHTML.replace( textPos , senderColorRegExp.cap(0).length(), doLight ? lightColorName : colorName ); } // Replace message at the end, maybe someone could put a Adium keyword in his message :P - resultHTML = resultHTML.tqreplace( TQString::fromUtf8("%message%"), formatMessageBody(message) ); + resultHTML = resultHTML.replace( TQString::fromUtf8("%message%"), formatMessageBody(message) ); // TODO: %status // resultHTML = addNickLinks( resultHTML ); @@ -1180,13 +1180,13 @@ TQString ChatMessagePart::formatStyleKeywords( const TQString &sourceHTML ) destinationName = remoteContact->nickName(); // Replace %chatName%, create a internal span to update it by DOM when asked. - resultHTML = resultHTML.tqreplace( TQString::fromUtf8("%chatName%"), TQString("<span id=\"KopeteHeaderChatNameInternal\">%1</span>").tqarg( formatName(d->manager->displayName()) ) ); + resultHTML = resultHTML.replace( TQString::fromUtf8("%chatName%"), TQString("<span id=\"KopeteHeaderChatNameInternal\">%1</span>").tqarg( formatName(d->manager->displayName()) ) ); // Replace %sourceName% - resultHTML = resultHTML.tqreplace( TQString::fromUtf8("%sourceName%"), formatName(sourceName) ); + resultHTML = resultHTML.replace( TQString::fromUtf8("%sourceName%"), formatName(sourceName) ); // Replace %destinationName% - resultHTML = resultHTML.tqreplace( TQString::fromUtf8("%destinationName%"), formatName(destinationName) ); + resultHTML = resultHTML.replace( TQString::fromUtf8("%destinationName%"), formatName(destinationName) ); // For %timeOpened%, display the date and time (also the seconds). - resultHTML = resultHTML.tqreplace( TQString::fromUtf8("%timeOpened%"), KGlobal::locale()->formatDateTime( TQDateTime::tqcurrentDateTime(), true, true ) ); + resultHTML = resultHTML.replace( TQString::fromUtf8("%timeOpened%"), KGlobal::locale()->formatDateTime( TQDateTime::tqcurrentDateTime(), true, true ) ); // Look for %timeOpened{X}% TQRegExp timeRegExp("%timeOpened\\{([^}]*)\\}%"); @@ -1194,7 +1194,7 @@ TQString ChatMessagePart::formatStyleKeywords( const TQString &sourceHTML ) while( (pos=timeRegExp.search(resultHTML, pos) ) != -1 ) { TQString timeKeyword = formatTime( timeRegExp.cap(1), TQDateTime::tqcurrentDateTime() ); - resultHTML = resultHTML.tqreplace( pos , timeRegExp.cap(0).length() , timeKeyword ); + resultHTML = resultHTML.replace( pos , timeRegExp.cap(0).length() , timeKeyword ); } // Get contact image paths #if 0 @@ -1207,8 +1207,8 @@ TQString ChatMessagePart::formatStyleKeywords( const TQString &sourceHTML ) if( photoOutgoingPath.isEmpty() ) photoOutgoingPath = TQString::fromUtf8("Outgoing/buddy_icon.png"); - resultHTML = resultHTML.tqreplace( TQString::fromUtf8("%incomingIconPath%"), photoIncomingPath); - resultHTML = resultHTML.tqreplace( TQString::fromUtf8("%outgoingIconPath%"), photoOutgoingPath); + resultHTML = resultHTML.replace( TQString::fromUtf8("%incomingIconPath%"), photoIncomingPath); + resultHTML = resultHTML.replace( TQString::fromUtf8("%outgoingIconPath%"), photoOutgoingPath); #endif TQString photoIncoming, photoOutgoing; if( remoteContact->metaContact() && !remoteContact->metaContact()->picture().isNull() ) @@ -1230,8 +1230,8 @@ TQString ChatMessagePart::formatStyleKeywords( const TQString &sourceHTML ) } - resultHTML = resultHTML.tqreplace( TQString::fromUtf8("%incomingIconPath%"), photoIncoming); - resultHTML = resultHTML.tqreplace( TQString::fromUtf8("%outgoingIconPath%"), photoOutgoing ); + resultHTML = resultHTML.replace( TQString::fromUtf8("%incomingIconPath%"), photoIncoming); + resultHTML = resultHTML.replace( TQString::fromUtf8("%outgoingIconPath%"), photoOutgoing ); } return resultHTML; diff --git a/kopete/kopete/chatwindow/chatmessagepart.h b/kopete/kopete/chatwindow/chatmessagepart.h index 97a3c3a3..b7f36da1 100644 --- a/kopete/kopete/chatwindow/chatmessagepart.h +++ b/kopete/kopete/chatwindow/chatmessagepart.h @@ -186,7 +186,7 @@ private: TQString textUnderMouse(); /** - * Format(tqreplace) style keywords for messages (incoming, outgoing, internal) + * Format(replace) style keywords for messages (incoming, outgoing, internal) * Use formatStyleKeywords(const TQString &sourceHTML) for header and footer. * * @param sourceHTML the source html which contains the keywords @@ -196,7 +196,7 @@ private: */ TQString formatStyleKeywords( const TQString &sourceHTML, const Kopete::Message &message ); /** - * Format(tqreplace) style keywords for header and footers. + * Format(replace) style keywords for header and footers. * For messages, use formatStyleKeywords(const TQString &sourceHTML, Kopete::Message &message) instead. * * @param sourceHTML HTML source needed to be replaced. diff --git a/kopete/kopete/chatwindow/chattexteditpart.cpp b/kopete/kopete/chatwindow/chattexteditpart.cpp index 9936b234..b6f214d2 100644 --- a/kopete/kopete/chatwindow/chattexteditpart.cpp +++ b/kopete/kopete/chatwindow/chattexteditpart.cpp @@ -130,8 +130,8 @@ void ChatTextEditPart::complete() if ( parIdx > 0 ) { - int firstSpace = txt.tqfindRev( TQRegExp( TQString::tqfromLatin1("\\s\\S+") ), parIdx - 1 ) + 1; - int lastSpace = txt.tqfind( TQRegExp( TQString::tqfromLatin1("[\\s\\:]") ), firstSpace ); + int firstSpace = txt.findRev( TQRegExp( TQString::tqfromLatin1("\\s\\S+") ), parIdx - 1 ) + 1; + int lastSpace = txt.find( TQRegExp( TQString::tqfromLatin1("[\\s\\:]") ), firstSpace ); if( lastSpace == -1 ) lastSpace = txt.length(); @@ -262,14 +262,14 @@ void ChatTextEditPart::sendMessage() if ( txt.isEmpty() || txt == "\n" ) return; - if ( m_lastMatch.isNull() && ( txt.tqfind( TQRegExp( TQString::tqfromLatin1("^\\w+:\\s") ) ) > -1 ) ) + if ( m_lastMatch.isNull() && ( txt.find( TQRegExp( TQString::tqfromLatin1("^\\w+:\\s") ) ) > -1 ) ) { //no last match and it finds something of the form of "word:" at the start of a line - TQString search = txt.left( txt.tqfind(':') ); + TQString search = txt.left( txt.find(':') ); if( !search.isEmpty() ) { TQString match = mComplete->makeCompletion( search ); if( !match.isNull() ) - edit()->setText( txt.tqreplace(0,search.length(),match) ); + edit()->setText( txt.replace(0,search.length(),match) ); } } diff --git a/kopete/kopete/chatwindow/chatview.cpp b/kopete/kopete/chatwindow/chatview.cpp index 9d42e9f4..52b82768 100644 --- a/kopete/kopete/chatwindow/chatview.cpp +++ b/kopete/kopete/chatwindow/chatview.cpp @@ -970,7 +970,7 @@ void ChatView::dragEnterEvent ( TQDragEnterEvent * event ) Kopete::Contact *c=it.current(); if(c && c->account() == m_manager->account()) { - if( c != m_manager->myself() && !m_manager->members().tqcontains(c) && c->isOnline()) + if( c != m_manager->myself() && !m_manager->members().contains(c) && c->isOnline()) event->accept(); } } @@ -1024,7 +1024,7 @@ void ChatView::dropEvent ( TQDropEvent * event ) Kopete::Contact *c=it.current(); if(c && c->account() == m_manager->account() && c->isOnline()) { - if( c != m_manager->myself() && !m_manager->members().tqcontains(c) ) + if( c != m_manager->myself() && !m_manager->members().contains(c) ) m_manager->inviteContact(c->contactId()); } } diff --git a/kopete/kopete/chatwindow/kopetechatwindow.cpp b/kopete/kopete/chatwindow/kopetechatwindow.cpp index 64bf5099..e88c13cc 100644 --- a/kopete/kopete/chatwindow/kopetechatwindow.cpp +++ b/kopete/kopete/chatwindow/kopetechatwindow.cpp @@ -98,21 +98,21 @@ KopeteChatWindow *KopeteChatWindow::window( Kopete::ChatSession *manager ) switch( KopetePrefs::prefs()->chatWindowPolicy() ) { case GROUP_BY_ACCOUNT: //Open chats from the same protocol in the same window - if( accountMap.tqcontains( manager->account() ) ) + if( accountMap.contains( manager->account() ) ) myWindow = accountMap[ manager->account() ]; else windowCreated = true; break; case GROUP_BY_GROUP: //Open chats from the same group in the same window - if( group && groupMap.tqcontains( group ) ) + if( group && groupMap.contains( group ) ) myWindow = groupMap[ group ]; else windowCreated = true; break; case GROUP_BY_METACONTACT: //Open chats from the same metacontact in the same window - if( mcMap.tqcontains( metaContact ) ) + if( mcMap.contains( metaContact ) ) myWindow = mcMap[ metaContact ]; else windowCreated = true; @@ -149,13 +149,13 @@ KopeteChatWindow *KopeteChatWindow::window( Kopete::ChatSession *manager ) { myWindow = new KopeteChatWindow(); - if ( !accountMap.tqcontains( manager->account() ) ) + if ( !accountMap.contains( manager->account() ) ) accountMap.insert( manager->account(), myWindow ); - if ( !mcMap.tqcontains( metaContact ) ) + if ( !mcMap.contains( metaContact ) ) mcMap.insert( metaContact, myWindow ); - if ( group && !groupMap.tqcontains( group ) ) + if ( group && !groupMap.contains( group ) ) groupMap.insert( group, myWindow ); } @@ -857,7 +857,7 @@ void KopeteChatWindow::setActiveView( TQWidget *widget ) m_activeView = view; - if( !chatViewList.tqcontains( view ) ) + if( !chatViewList.contains( view ) ) attachChatView( view ); connect( m_activeView, TQT_SIGNAL( canSendChanged(bool) ), this, TQT_SLOT( slotUpdateSendEnabled() ) ); diff --git a/kopete/kopete/chatwindow/kopetechatwindowstyle.cpp b/kopete/kopete/chatwindow/kopetechatwindowstyle.cpp index 646b8259..1bc64959 100644 --- a/kopete/kopete/chatwindow/kopetechatwindowstyle.cpp +++ b/kopete/kopete/chatwindow/kopetechatwindowstyle.cpp @@ -157,7 +157,7 @@ void ChatWindowStyle::listVariants() { TQString variantName = *it, variantPath; // Retrieve only the file name. - variantName = variantName.left(variantName.tqfindRev(".")); + variantName = variantName.left(variantName.findRev(".")); // variantPath is relative to baseHref. variantPath = TQString("Variants/%1").tqarg(*it); d->variantsList.insert(variantName, variantPath); diff --git a/kopete/kopete/chatwindow/kopetechatwindowstylemanager.cpp b/kopete/kopete/chatwindow/kopetechatwindowstylemanager.cpp index 56f1844a..c7ee3673 100644 --- a/kopete/kopete/chatwindow/kopetechatwindowstylemanager.cpp +++ b/kopete/kopete/chatwindow/kopetechatwindowstylemanager.cpp @@ -98,7 +98,7 @@ void ChatWindowStyleManager::loadStyles() { TQStringList chatStyles = KGlobal::dirs()->findDirs( "appdata", TQString::fromUtf8( "styles" ) ); TQString localStyleDir( locateLocal( "appdata", TQString::fromUtf8("styles/"),true) ); - if( !chatStyles.tqcontains(localStyleDir)) + if( !chatStyles.contains(localStyleDir)) chatStyles<<localStyleDir; TQStringList::const_iterator it; @@ -289,14 +289,14 @@ bool ChatWindowStyleManager::removeStyle(const TQString &stylePath) // Find for the current style in avaiableStyles map. KURL urlStyle(stylePath); TQString styleName=urlStyle.fileName(); - StyleList::Iterator foundStyle = d->availableStyles.tqfind(styleName); + StyleList::Iterator foundStyle = d->availableStyles.find(styleName); // TQMap iterator return end() if it found no item. if(foundStyle != d->availableStyles.end()) { d->availableStyles.remove(foundStyle); // Remove and delete style from pool if needed. - if( d->stylePool.tqcontains(stylePath) ) + if( d->stylePool.contains(stylePath) ) { ChatWindowStyle *deletedStyle = d->stylePool[stylePath]; d->stylePool.remove(stylePath); @@ -314,7 +314,7 @@ bool ChatWindowStyleManager::removeStyle(const TQString &stylePath) ChatWindowStyle *ChatWindowStyleManager::getStyleFromPool(const TQString &stylePath) { - if( d->stylePool.tqcontains(stylePath) ) + if( d->stylePool.contains(stylePath) ) { // NOTE: This is a hidden config switch for style developers // Check in the config if the cache is disabled. @@ -348,19 +348,19 @@ void ChatWindowStyleManager::slotNewStyles(const KFileItemList &dirList) while( (item = it.current()) != 0 ) { // Ignore data dir(from deprecated XSLT themes) - if( !item->url().fileName().tqcontains(TQString::fromUtf8("data")) ) + if( !item->url().fileName().contains(TQString::fromUtf8("data")) ) { kdDebug(14000) << k_funcinfo << "Listing: " << item->url().fileName() << endl; // If the style path is already in the pool, that's mean the style was updated on disk // Reload the style - if( d->stylePool.tqcontains(item->url().path()) ) + if( d->stylePool.contains(item->url().path()) ) { kdDebug(14000) << k_funcinfo << "Updating style: " << item->url().path() << endl; d->stylePool[item->url().path()]->reload(); // Add to avaialble if required. - if( !d->availableStyles.tqcontains(item->url().fileName()) ) + if( !d->availableStyles.contains(item->url().fileName()) ) d->availableStyles.insert(item->url().fileName(), item->url().path()); } else diff --git a/kopete/kopete/chatwindow/kopeteemoticonaction.cpp b/kopete/kopete/chatwindow/kopeteemoticonaction.cpp index 34c0781b..0b8d6126 100644 --- a/kopete/kopete/chatwindow/kopeteemoticonaction.cpp +++ b/kopete/kopete/chatwindow/kopeteemoticonaction.cpp @@ -73,7 +73,7 @@ KopeteEmoticonAction::KopeteEmoticonAction( TQObject* tqparent, const char* name for( TQMap<TQString, TQStringList>::const_iterator it = emoticonsMap.constBegin(); it != emoticonsMap.constEnd(); ++it ) { - if( ( *it ).tqcontains( ":)" ) || ( *it ).tqcontains( ":-)" ) ) + if( ( *it ).contains( ":)" ) || ( *it ).contains( ":-)" ) ) { icon = it.key(); break; |