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:
parent
bc4d7c46f3
commit
3e78bdccce
|
@ -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()) {
|
||||
|
|
|
@ -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 *)));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue