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

Fix push to talk even when text edit focused

This commit is contained in:
Tux3 / Mlkj / !Lev.uXFMLA 2014-11-13 20:32:09 +01:00
parent 858971fd94
commit 5eeae0e142
No known key found for this signature in database
GPG Key ID: 7E086DD661263264
2 changed files with 7 additions and 0 deletions

View File

@ -207,6 +207,9 @@ void GroupChatForm::onCallClicked()
void GroupChatForm::keyPressEvent(QKeyEvent* ev) void GroupChatForm::keyPressEvent(QKeyEvent* ev)
{ {
if (msgEdit->hasFocus())
return;
// Push to talk // Push to talk
if (ev->key() == Qt::Key_P && inCall) if (ev->key() == Qt::Key_P && inCall)
{ {
@ -223,6 +226,9 @@ void GroupChatForm::keyPressEvent(QKeyEvent* ev)
void GroupChatForm::keyReleaseEvent(QKeyEvent* ev) void GroupChatForm::keyReleaseEvent(QKeyEvent* ev)
{ {
if (msgEdit->hasFocus())
return;
// Push to talk // Push to talk
if (ev->key() == Qt::Key_P && inCall) if (ev->key() == Qt::Key_P && inCall)
{ {

View File

@ -128,6 +128,7 @@ void GroupWidget::keyPressEvent(QKeyEvent* ev)
Group* g = GroupList::findGroup(groupId); Group* g = GroupList::findGroup(groupId);
if (g) if (g)
g->chatForm->keyPressEvent(ev); g->chatForm->keyPressEvent(ev);
} }
void GroupWidget::keyReleaseEvent(QKeyEvent* ev) void GroupWidget::keyReleaseEvent(QKeyEvent* ev)