From b99677dea95a8886429574713d5a78dde9181959 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stig=20Bj=C3=B8rlykke?= Date: Thu, 23 Nov 2017 13:18:37 +0100 Subject: Qt: Add key event to reject changes in AddressEditorFrame MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Also give focus to the name field. Change-Id: I409d48e513c04b510f1e3d838c05e1518e6d2e9d Reviewed-on: https://code.wireshark.org/review/24547 Petri-Dish: Stig Bjørlykke Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman --- ui/qt/address_editor_frame.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'ui/qt/address_editor_frame.h') diff --git a/ui/qt/address_editor_frame.h b/ui/qt/address_editor_frame.h index eb57263c79..91a8935a50 100644 --- a/ui/qt/address_editor_frame.h +++ b/ui/qt/address_editor_frame.h @@ -48,12 +48,15 @@ signals: void editAddressStatus(const QString &status); void redissectPackets(); +protected: + virtual void showEvent(QShowEvent *event); + virtual void keyPressEvent(QKeyEvent *event); + private slots: void updateWidgets(); void on_nameResolutionPreferencesToolButton_clicked(); void on_addressComboBox_currentIndexChanged(const QString &); void on_nameLineEdit_textEdited(const QString &); - void on_nameLineEdit_returnPressed(); void on_buttonBox_accepted(); void on_buttonBox_rejected(); -- cgit v1.2.3