aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2017-11-24 19:17:55 +0100
committerAnders Broman <a.broman58@gmail.com>2017-11-25 09:30:21 +0000
commit89ae2826d6158e62fe3db9c18d01721a2168e9cc (patch)
tree0fcb61447b41e6d54a79e2beb398c48ba8625335
parente1f3d9dcbee7dac3ad06d9a0ca2e63896e1f7305 (diff)
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>
-rw-r--r--ui/qt/column_editor_frame.cpp2
-rw-r--r--ui/qt/column_editor_frame.h2
-rw-r--r--ui/qt/filter_expression_frame.cpp3
-rw-r--r--ui/qt/filter_expression_frame.h2
-rw-r--r--ui/qt/preference_editor_frame.cpp2
-rw-r--r--ui/qt/preference_editor_frame.h2
-rw-r--r--ui/qt/search_frame.cpp15
7 files changed, 17 insertions, 11 deletions
diff --git a/ui/qt/column_editor_frame.cpp b/ui/qt/column_editor_frame.cpp
index 72dcf81..638b32a 100644
--- a/ui/qt/column_editor_frame.cpp
+++ b/ui/qt/column_editor_frame.cpp
@@ -184,6 +184,8 @@ void ColumnEditorFrame::keyPressEvent(QKeyEvent *event)
}
}
}
+
+ AccordionFrame::keyPressEvent(event);
}
/*
diff --git a/ui/qt/column_editor_frame.h b/ui/qt/column_editor_frame.h
index d2c77ba..04b715a 100644
--- a/ui/qt/column_editor_frame.h
+++ b/ui/qt/column_editor_frame.h
@@ -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);
diff --git a/ui/qt/filter_expression_frame.cpp b/ui/qt/filter_expression_frame.cpp
index 9426374..322c750 100644
--- a/ui/qt/filter_expression_frame.cpp
+++ b/ui/qt/filter_expression_frame.cpp
@@ -189,7 +189,10 @@ void FilterExpressionFrame::keyPressEvent(QKeyEvent *event)
}
}
}
+
+ AccordionFrame::keyPressEvent(event);
}
+
/*
* Editor modelines
*
diff --git a/ui/qt/filter_expression_frame.h b/ui/qt/filter_expression_frame.h
index 13f5546..8394537 100644
--- a/ui/qt/filter_expression_frame.h
+++ b/ui/qt/filter_expression_frame.h
@@ -47,7 +47,7 @@ signals:
protected:
virtual void showEvent(QShowEvent *event);
- void keyPressEvent(QKeyEvent *event);
+ virtual void keyPressEvent(QKeyEvent *event);
private:
Ui::FilterExpressionFrame *ui;
diff --git a/ui/qt/preference_editor_frame.cpp b/ui/qt/preference_editor_frame.cpp
index 1ae604e..e3b522d 100644
--- a/ui/qt/preference_editor_frame.cpp
+++ b/ui/qt/preference_editor_frame.cpp
@@ -261,6 +261,8 @@ void PreferenceEditorFrame::keyPressEvent(QKeyEvent *event)
}
}
}
+
+ AccordionFrame::keyPressEvent(event);
}
/*
diff --git a/ui/qt/preference_editor_frame.h b/ui/qt/preference_editor_frame.h
index 3c1b6b9..f4f4947 100644
--- a/ui/qt/preference_editor_frame.h
+++ b/ui/qt/preference_editor_frame.h
@@ -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
diff --git a/ui/qt/search_frame.cpp b/ui/qt/search_frame.cpp
index b1533d4..f63f63f 100644
--- a/ui/qt/search_frame.cpp
+++ b/ui/qt/search_frame.cpp
@@ -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()