From kde-bugs-dist Mon Feb 28 22:18:35 2005 From: Duncan Mac-Vicar Prett Date: Mon, 28 Feb 2005 22:18:35 +0000 To: kde-bugs-dist Subject: [Bug 100334] Holding enter sends empty messages Message-Id: <20050228221835.24855.qmail () ktown ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-bugs-dist&m=110962912921238 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is. http://bugs.kde.org/show_bug.cgi?id=100334 duncan kde org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |FIXED ------- Additional Comments From duncan kde org 2005-02-28 23:18 ------- 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