aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/uat_dialog.cpp
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2016-09-30 10:51:41 +0200
committerAnders Broman <a.broman58@gmail.com>2016-10-03 05:00:30 +0000
commit1fbf831a6ba8eb46757ec93ecbe95efdf9020b3a (patch)
treef0a68c9876a80c29745d3d440ef7753642dbbdee /ui/qt/uat_dialog.cpp
parent54721903166d06734acb0d985e05f25125c98016 (diff)
Qt: properly handle UAT changes on dialog close
Ensure that UAT changes are always applied, not just when pressing the OK/Cancel buttons, but also when closing the dialog via the window close button or by pressing Escape. Change-Id: I0f0b97588553c6b01a24dfde78218d0ce2667e2c Reviewed-on: https://code.wireshark.org/review/17993 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'ui/qt/uat_dialog.cpp')
-rw-r--r--ui/qt/uat_dialog.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/ui/qt/uat_dialog.cpp b/ui/qt/uat_dialog.cpp
index a68fe9d34c..cf703ea9d0 100644
--- a/ui/qt/uat_dialog.cpp
+++ b/ui/qt/uat_dialog.cpp
@@ -118,6 +118,8 @@ void UatDialog::setUat(epan_uat *uat)
if (uat_->help && strlen(uat_->help) > 0) {
help_button_->setEnabled(true);
}
+ connect(this, SIGNAL(rejected()), this, SLOT(rejectChanges()));
+ connect(this, SIGNAL(accepted()), this, SLOT(acceptChanges()));
}
setWindowTitle(title);
@@ -580,7 +582,7 @@ void UatDialog::applyChanges()
}
-void UatDialog::on_buttonBox_accepted()
+void UatDialog::acceptChanges()
{
if (!uat_) return;
@@ -599,7 +601,7 @@ void UatDialog::on_buttonBox_accepted()
}
}
-void UatDialog::on_buttonBox_rejected()
+void UatDialog::rejectChanges()
{
if (!uat_) return;