Crash. Forgot check event type.
--HG-- branch : develop
This commit is contained in:
parent
586b541aec
commit
4fe796f508
|
@ -409,6 +409,8 @@ bool DialogTool::eventFilter(QObject *object, QEvent *event)
|
|||
{
|
||||
QPlainTextEdit *plainTextEdit = qobject_cast<QPlainTextEdit *>(object);
|
||||
if (plainTextEdit != nullptr)
|
||||
{
|
||||
if (event->type() == QEvent::KeyPress)
|
||||
{
|
||||
QKeyEvent *keyEvent = static_cast<QKeyEvent *>(event);
|
||||
if ((keyEvent->key() == Qt::Key_Enter) || (keyEvent->key() == Qt::Key_Return))
|
||||
|
@ -417,6 +419,7 @@ bool DialogTool::eventFilter(QObject *object, QEvent *event)
|
|||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// pass the event on to the parent class
|
||||
|
|
Loading…
Reference in New Issue
Block a user