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

List:       kde-commits
Subject:    kdenetwork/kopete/kopete/chatwindow
From:       Duncan Mac-Vicar Prett <duncan () kde ! org>
Date:       2005-02-28 22:18:24
Message-ID: 20050228221824.067211487A () office ! kde ! org
[Download RAW message or body]

CVS commit by dmacvicar: 



Fix bug: Holding enter sends empty messages

BUGS: 100334


  M +4 -0      chattexteditpart.cpp   1.3


--- kdenetwork/kopete/kopete/chatwindow/chattexteditpart.cpp  #1.2:1.3
@@ -229,4 +229,8 @@ void ChatTextEditPart::sendMessage()
 {
         QString txt = text( Qt::PlainText );
+        // avoid sending emtpy messages or enter keys (see bug 100334)
+        if ( txt.isEmpty() || txt == "\n" )
+                return;
+
         if ( m_lastMatch.isNull() && ( txt.find( QRegExp( QString::fromLatin1("^\\w+:\\s") ) ) > -1 ) )
         { //no last match and it finds something of the form of "word:" at the start of a line


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

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