Fiw Delete key event in ChatWidget.

This commit is contained in:
Phenom 2015-10-03 11:00:16 +02:00
parent b055500245
commit 64389e35d8

View File

@ -488,10 +488,10 @@ bool ChatWidget::eventFilter(QObject *obj, QEvent *event)
QKeyEvent *keyEvent = static_cast<QKeyEvent*>(event); QKeyEvent *keyEvent = static_cast<QKeyEvent*>(event);
if (keyEvent) { if (keyEvent) {
if (notify && keyEvent->key() == Qt::Key_Delete) { if (keyEvent->key() == Qt::Key_Delete) {
// Delete key pressed // Delete key pressed
if (ui->textBrowser->textCursor().selectedText().length() > 0) { if (ui->textBrowser->textCursor().selectedText().length() > 0) {
if (chatType() == CHATTYPE_LOBBY) { if (notify && chatType() == CHATTYPE_LOBBY) {
QRegExp rx("<a name=\"(.*)\"",Qt::CaseSensitive, QRegExp::RegExp2); QRegExp rx("<a name=\"(.*)\"",Qt::CaseSensitive, QRegExp::RegExp2);
rx.setMinimal(true); rx.setMinimal(true);
QString sel=ui->textBrowser->textCursor().selection().toHtml(); QString sel=ui->textBrowser->textCursor().selection().toHtml();