Qt: Convert more "pressed" signals to "clicked".

Convert the "pressed" signals in the interface toolbar, LTE RLC
statistics dialog, and path chooser delegate to "clicked".

Change-Id: I86de6d2d019133d7ae85c39956388859065a3af2
Reviewed-on: https://code.wireshark.org/review/31126
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
This commit is contained in:
Gerald Combs 2018-12-19 09:56:22 -08:00
parent 099e5dddf2
commit f6fb8c876f
4 changed files with 15 additions and 15 deletions

View File

@ -183,11 +183,11 @@ QWidget *InterfaceToolbar::createButton(iface_toolbar_control *control)
{
case INTERFACE_ROLE_CONTROL:
setDefaultValue(control->num, (gchar *)control->display);
connect(button, SIGNAL(pressed()), this, SLOT(onControlButtonPressed()));
connect(button, SIGNAL(clicked()), this, SLOT(onControlButtonClicked()));
break;
case INTERFACE_ROLE_HELP:
connect(button, SIGNAL(pressed()), this, SLOT(onHelpButtonPressed()));
connect(button, SIGNAL(clicked()), this, SLOT(onHelpButtonClicked()));
if (help_link_.isEmpty())
{
// No help URL provided
@ -196,11 +196,11 @@ QWidget *InterfaceToolbar::createButton(iface_toolbar_control *control)
break;
case INTERFACE_ROLE_LOGGER:
connect(button, SIGNAL(pressed()), this, SLOT(onLogButtonPressed()));
connect(button, SIGNAL(clicked()), this, SLOT(onLogButtonClicked()));
break;
case INTERFACE_ROLE_RESTORE:
connect(button, SIGNAL(pressed()), this, SLOT(onRestoreButtonPressed()));
connect(button, SIGNAL(clicked()), this, SLOT(onRestoreButtonClicked()));
break;
default:
@ -604,7 +604,7 @@ void InterfaceToolbar::controlSend(QString ifname, int num, int command, const Q
}
}
void InterfaceToolbar::onControlButtonPressed()
void InterfaceToolbar::onControlButtonClicked()
{
const QString &ifname = ui->interfacesComboBox->currentText();
QPushButton *button = static_cast<QPushButton *>(sender());
@ -650,7 +650,7 @@ void InterfaceToolbar::onLineEditChanged()
interface_[ifname].value_changed[num] = true;
}
void InterfaceToolbar::onLogButtonPressed()
void InterfaceToolbar::onLogButtonClicked()
{
const QString &ifname = ui->interfacesComboBox->currentText();
QPushButton *button = static_cast<QPushButton *>(sender());
@ -670,7 +670,7 @@ void InterfaceToolbar::onLogButtonPressed()
interface_[ifname].log_dialog[num]->activateWindow();
}
void InterfaceToolbar::onHelpButtonPressed()
void InterfaceToolbar::onHelpButtonClicked()
{
QUrl help_url(help_link_);
@ -824,7 +824,7 @@ void InterfaceToolbar::sendChangedValues(QString ifname)
}
}
void InterfaceToolbar::onRestoreButtonPressed()
void InterfaceToolbar::onRestoreButtonClicked()
{
const QString &ifname = ui->interfacesComboBox->currentText();

View File

@ -61,10 +61,10 @@ private slots:
void startReaderThread(QString ifname, void *control_in);
void updateWidgets();
void onControlButtonPressed();
void onLogButtonPressed();
void onHelpButtonPressed();
void onRestoreButtonPressed();
void onControlButtonClicked();
void onLogButtonClicked();
void onHelpButtonClicked();
void onRestoreButtonClicked();
void onCheckBoxChanged(int state);
void onComboBoxChanged(int idx);
void onLineEditChanged();

View File

@ -674,11 +674,11 @@ LteRlcStatisticsDialog::LteRlcStatisticsDialog(QWidget &parent, CaptureFile &cf,
launchULGraph_ = new QPushButton(QString("Launch UL Graph"));
launchULGraph_->setEnabled(false);
filter_controls_grid->addWidget(launchULGraph_);
connect(launchULGraph_, SIGNAL(pressed()), this, SLOT(launchULGraphButtonClicked()));
connect(launchULGraph_, SIGNAL(clicked()), this, SLOT(launchULGraphButtonClicked()));
launchDLGraph_ = new QPushButton(QString("Launch DL Graph"));
launchDLGraph_->setEnabled(false);
filter_controls_grid->addWidget(launchDLGraph_);
connect(launchDLGraph_, SIGNAL(pressed()), this, SLOT(launchDLGraphButtonClicked()));
connect(launchDLGraph_, SIGNAL(clicked()), this, SLOT(launchDLGraphButtonClicked()));
showSRFilterCheckBox_ = new QCheckBox(tr("Include SR frames in filter"));
filter_controls_grid->addWidget(showSRFilterCheckBox_);

View File

@ -50,7 +50,7 @@ QWidget* PathChooserDelegate::createEditor(QWidget *parent, const QStyleOptionVi
pathEditor->setFocusProxy(lineEdit);
pathEditor->setFocusPolicy(lineEdit->focusPolicy());
connect(btnBrowse, SIGNAL(pressed()), this, SLOT(browse_button_clicked()));
connect(btnBrowse, SIGNAL(clicked()), this, SLOT(browse_button_clicked()));
return pathEditor;
}