1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

Tabs with modifiers are passed up from chat boxes.

In Qt chat boxes filter out events related to text editing, including tabs.
Unfortunately tabs with modifiers like those used to cycle through contacts are
being filtered despite not being used for anything.

This fixes the keybind for cycling forward through contacts (Ctrl+Tab).
This commit is contained in:
Jookia 2015-03-22 19:09:26 +11:00 committed by tux3
parent 59a8ea13e7
commit f6a2925331

View File

@ -30,7 +30,12 @@ void ChatTextEdit::keyPressEvent(QKeyEvent * event)
if ((key == Qt::Key_Enter || key == Qt::Key_Return) && !(event->modifiers() & Qt::ShiftModifier))
emit enterPressed();
else if (key == Qt::Key_Tab)
emit tabPressed();
{
if (event->modifiers())
event->ignore();
else
emit tabPressed();
}
else if (key == Qt::Key_Up && this->toPlainText().isEmpty())
{
this->setText(lastMessage);