[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdenonbeta/kopete/libkopete/ui
From:       Jason Keirstead <jason () keirstead ! org>
Date:       2003-03-08 19:32:16
[Download RAW message or body]

CVS commit by brunes: 

Fix bug with completion


  M +7 -3      chatview.cpp   1.193


--- kdenonbeta/kopete/libkopete/ui/chatview.cpp  #1.192:1.193
@@ -674,9 +674,13 @@ void ChatView::sendMessage()
 
         QString txt = m_edit->text();
-        if( m_lastMatch.isNull() && txt.contains( QRegExp( QString::fromLatin1("^\\w+:") ) ) )
+        if( m_lastMatch.isNull() && txt.contains( QRegExp( QString::fromLatin1("^\\w+:[\\s\\w]") ) ) )
         {
                 QString search = txt.left( (int)txt.find(':') );
+                if( !search.isEmpty() )
+                {
                 QString match = mComplete->makeCompletion( search );
+                        if( !match.isNull() )
                 m_edit->setText( txt.replace(0,search.length(),match) );
+                }
         }
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic