mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
hability to delete some lines in chat history browser (Patch from Phenom)
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6612 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
d1d2fbb869
commit
5bf1ce8f07
@ -240,7 +240,20 @@ void ChatWidget::processSettings(bool load)
|
|||||||
|
|
||||||
bool ChatWidget::eventFilter(QObject *obj, QEvent *event)
|
bool ChatWidget::eventFilter(QObject *obj, QEvent *event)
|
||||||
{
|
{
|
||||||
if (obj == ui->chatTextEdit) {
|
if (obj == ui->textBrowser) {
|
||||||
|
if (event->type() == QEvent::KeyPress) {
|
||||||
|
|
||||||
|
QKeyEvent *keyEvent = static_cast<QKeyEvent*>(event);
|
||||||
|
if (keyEvent) {
|
||||||
|
if (keyEvent->key() == Qt::Key_Delete ) {
|
||||||
|
// Delete pressed
|
||||||
|
if (ui->textBrowser->textCursor().selectedText().length()>0)
|
||||||
|
ui->textBrowser->textCursor().deleteChar();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else if (obj == ui->chatTextEdit) {
|
||||||
if (event->type() == QEvent::KeyPress) {
|
if (event->type() == QEvent::KeyPress) {
|
||||||
|
|
||||||
QKeyEvent *keyEvent = static_cast<QKeyEvent*>(event);
|
QKeyEvent *keyEvent = static_cast<QKeyEvent*>(event);
|
||||||
|
Loading…
Reference in New Issue
Block a user