forked from osmocom/wireshark
Qt: AccordionFrame users keyPressEvent() fixes
- Declare keyPressEvent() virtual. - Give keyPressEvent() to parent when done. Change-Id: If1c05e86a5ab71dd239c025cdb2bcfb1ef484811 Reviewed-on: https://code.wireshark.org/review/24573 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
parent
e1f3d9dcbe
commit
89ae2826d6
|
@ -184,6 +184,8 @@ void ColumnEditorFrame::keyPressEvent(QKeyEvent *event)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
AccordionFrame::keyPressEvent(event);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -43,7 +43,7 @@ signals:
|
|||
|
||||
protected:
|
||||
virtual void showEvent(QShowEvent *event);
|
||||
void keyPressEvent(QKeyEvent *event);
|
||||
virtual void keyPressEvent(QKeyEvent *event);
|
||||
|
||||
private slots:
|
||||
void on_typeComboBox_activated(int index);
|
||||
|
|
|
@ -189,7 +189,10 @@ void FilterExpressionFrame::keyPressEvent(QKeyEvent *event)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
AccordionFrame::keyPressEvent(event);
|
||||
}
|
||||
|
||||
/*
|
||||
* Editor modelines
|
||||
*
|
||||
|
|
|
@ -47,7 +47,7 @@ signals:
|
|||
|
||||
protected:
|
||||
virtual void showEvent(QShowEvent *event);
|
||||
void keyPressEvent(QKeyEvent *event);
|
||||
virtual void keyPressEvent(QKeyEvent *event);
|
||||
|
||||
private:
|
||||
Ui::FilterExpressionFrame *ui;
|
||||
|
|
|
@ -261,6 +261,8 @@ void PreferenceEditorFrame::keyPressEvent(QKeyEvent *event)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
AccordionFrame::keyPressEvent(event);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -49,7 +49,7 @@ signals:
|
|||
|
||||
protected:
|
||||
virtual void showEvent(QShowEvent *event);
|
||||
void keyPressEvent(QKeyEvent *event);
|
||||
virtual void keyPressEvent(QKeyEvent *event);
|
||||
|
||||
private slots:
|
||||
// Similar to ModulePreferencesScrollArea
|
||||
|
|
|
@ -134,16 +134,15 @@ void SearchFrame::findFrameWithFilter(QString &filter)
|
|||
|
||||
void SearchFrame::keyPressEvent(QKeyEvent *event)
|
||||
{
|
||||
if (wsApp->focusWidget() == sf_ui_->searchLineEdit) {
|
||||
if (event->modifiers() == Qt::NoModifier) {
|
||||
if (event->key() == Qt::Key_Escape) {
|
||||
on_cancelButton_clicked();
|
||||
} else if (event->key() == Qt::Key_Enter || event->key() == Qt::Key_Return) {
|
||||
on_findButton_clicked();
|
||||
}
|
||||
if (event->modifiers() == Qt::NoModifier) {
|
||||
if (event->key() == Qt::Key_Escape) {
|
||||
on_cancelButton_clicked();
|
||||
} else if (event->key() == Qt::Key_Enter || event->key() == Qt::Key_Return) {
|
||||
on_findButton_clicked();
|
||||
}
|
||||
return; // searchLineEdit didn't want it and we don't either.
|
||||
}
|
||||
|
||||
AccordionFrame::keyPressEvent(event);
|
||||
}
|
||||
|
||||
bool SearchFrame::regexCompile()
|
||||
|
|
Loading…
Reference in New Issue