Qt: Use ActionRole for the "copy from profile" button

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 <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
Stig Bjørlykke 2018-10-06 13:47:25 +02:00 committed by Anders Broman
parent bc4d7c46f3
commit 3e78bdccce
2 changed files with 2 additions and 2 deletions

View File

@ -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()) {

View File

@ -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 *)));
}