From 3e78bdcccede58bf983db9ac4f7df24082a1cc5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stig=20Bj=C3=B8rlykke?= Date: Sat, 6 Oct 2018 13:47:25 +0200 Subject: [PATCH] Qt: Use ActionRole for the "copy from profile" button MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The correct role for the newly introduced copy from profile button is ActionRole because it "causes changes to the elements within the dialog". Change-Id: I8613d00c0fdb33f2873e999aea9a54ea1f49dffb Reviewed-on: https://code.wireshark.org/review/30044 Petri-Dish: Stig Bjørlykke Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman --- ui/qt/coloring_rules_dialog.cpp | 2 +- ui/qt/uat_dialog.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/qt/coloring_rules_dialog.cpp b/ui/qt/coloring_rules_dialog.cpp index a2c0ae240d..f401dabfb1 100644 --- a/ui/qt/coloring_rules_dialog.cpp +++ b/ui/qt/coloring_rules_dialog.cpp @@ -75,7 +75,7 @@ ColoringRulesDialog::ColoringRulesDialog(QWidget *parent, QString add_filter) : export_button_->setToolTip(tr("Save filters in a file.")); QPushButton *copy_button = new CopyFromProfileButton("colorfilters"); - ui->buttonBox->addButton(copy_button, QDialogButtonBox::ApplyRole); + ui->buttonBox->addButton(copy_button, QDialogButtonBox::ActionRole); connect(copy_button->menu(), SIGNAL(triggered(QAction *)), this, SLOT(copyFromProfile(QAction *))); if (!add_filter.isEmpty()) { diff --git a/ui/qt/uat_dialog.cpp b/ui/qt/uat_dialog.cpp index c0318f6b36..f844ee0ba5 100644 --- a/ui/qt/uat_dialog.cpp +++ b/ui/qt/uat_dialog.cpp @@ -43,7 +43,7 @@ UatDialog::UatDialog(QWidget *parent, epan_uat *uat) : if (uat->from_profile) { QPushButton *copy_button = new CopyFromProfileButton(uat->filename); - ui->buttonBox->addButton(copy_button, QDialogButtonBox::ApplyRole); + ui->buttonBox->addButton(copy_button, QDialogButtonBox::ActionRole); connect(copy_button->menu(), SIGNAL(triggered(QAction *)), this, SLOT(copyFromProfile(QAction *))); }