forked from osmocom/wireshark
Qt: Use new-style syntax for signal & slots connected by name.
Change anything that matches
grep -Eir '(signal|slot) *\( *on_action' ui
to new-style connections so that we can catch any future direct
connection conversion issues at compile time.
Change a connection from on_actionCaptureOptions_triggered to
showCaptureOptionsDialog and make showCaptureOptionsDialog public. Fixes
an issue introduced in fcdb77dc
.
pespin/osmux-wip
parent
79d02af2b5
commit
f011e75025
|
@ -694,8 +694,8 @@ int main(int argc, char *qt_argv[])
|
|||
// to force the issue.
|
||||
main_w->connect(&ls_app, SIGNAL(openCaptureFile(QString,QString,unsigned int)),
|
||||
main_w, SLOT(openCaptureFile(QString,QString,unsigned int)));
|
||||
main_w->connect(&ls_app, SIGNAL(openCaptureOptions()),
|
||||
main_w, SLOT(on_actionCaptureOptions_triggered()));
|
||||
main_w->connect(&ls_app, &LograyApplication::openCaptureOptions,
|
||||
main_w, &LograyMainWindow::showCaptureOptionsDialog);
|
||||
|
||||
/* Init the "Open file" dialog directory */
|
||||
/* (do this after the path settings are processed) */
|
||||
|
|
|
@ -627,14 +627,14 @@ main_ui_->goToLineEdit->setValidator(goToLineQiv);
|
|||
connect(proto_tree_, SIGNAL(editProtocolPreference(preference*, pref_module*)),
|
||||
main_ui_->preferenceEditorFrame, SLOT(editPreference(preference*, pref_module*)));
|
||||
|
||||
connect(main_ui_->statusBar, SIGNAL(showExpertInfo()),
|
||||
this, SLOT(on_actionAnalyzeExpertInfo_triggered()));
|
||||
connect(main_ui_->statusBar, &MainStatusBar::showExpertInfo,
|
||||
this, &LograyMainWindow::on_actionAnalyzeExpertInfo_triggered);
|
||||
|
||||
connect(main_ui_->statusBar, SIGNAL(stopLoading()),
|
||||
&capture_file_, SLOT(stopLoading()));
|
||||
connect(main_ui_->statusBar, &MainStatusBar::stopLoading,
|
||||
&capture_file_, &CaptureFile::stopLoading);
|
||||
|
||||
connect(main_ui_->statusBar, SIGNAL(editCaptureComment()),
|
||||
this, SLOT(on_actionStatisticsCaptureFileProperties_triggered()));
|
||||
connect(main_ui_->statusBar, &MainStatusBar::editCaptureComment,
|
||||
this, &LograyMainWindow::on_actionStatisticsCaptureFileProperties_triggered);
|
||||
|
||||
connect(main_ui_->menuApplyAsFilter, &QMenu::aboutToShow,
|
||||
this, &LograyMainWindow::filterMenuAboutToShow);
|
||||
|
|
|
@ -276,6 +276,8 @@ public slots:
|
|||
void setTitlebarForCaptureFile();
|
||||
void setWSWindowTitle(QString title = QString());
|
||||
|
||||
void showCaptureOptionsDialog();
|
||||
|
||||
#ifdef HAVE_LIBPCAP
|
||||
void captureCapturePrepared(capture_session *);
|
||||
void captureCaptureUpdateStarted(capture_session *);
|
||||
|
@ -423,7 +425,6 @@ private slots:
|
|||
void resetPreviousFocus();
|
||||
|
||||
void connectCaptureMenuActions();
|
||||
void showCaptureOptionsDialog();
|
||||
void startCaptureTriggered();
|
||||
|
||||
void on_actionAnalyzeDisplayFilters_triggered();
|
||||
|
|
|
@ -696,8 +696,8 @@ int main(int argc, char *qt_argv[])
|
|||
// to force the issue.
|
||||
main_w->connect(&ws_app, SIGNAL(openCaptureFile(QString,QString,unsigned int)),
|
||||
main_w, SLOT(openCaptureFile(QString,QString,unsigned int)));
|
||||
main_w->connect(&ws_app, SIGNAL(openCaptureOptions()),
|
||||
main_w, SLOT(on_actionCaptureOptions_triggered()));
|
||||
main_w->connect(&ws_app, &WiresharkApplication::openCaptureOptions,
|
||||
main_w, &WiresharkMainWindow::showCaptureOptionsDialog);
|
||||
|
||||
/* Init the "Open file" dialog directory */
|
||||
/* (do this after the path settings are processed) */
|
||||
|
|
|
@ -232,10 +232,10 @@ ProtocolHierarchyDialog::ProtocolHierarchyDialog(QWidget &parent, CaptureFile &c
|
|||
QAction *ca;
|
||||
ca = copy_menu->addAction(tr("as CSV"));
|
||||
ca->setToolTip(ui->actionCopyAsCsv->toolTip());
|
||||
connect(ca, SIGNAL(triggered()), this, SLOT(on_actionCopyAsCsv_triggered()));
|
||||
connect(ca, &QAction::triggered, this, &ProtocolHierarchyDialog::on_actionCopyAsCsv_triggered);
|
||||
ca = copy_menu->addAction(tr("as YAML"));
|
||||
ca->setToolTip(ui->actionCopyAsYaml->toolTip());
|
||||
connect(ca, SIGNAL(triggered()), this, SLOT(on_actionCopyAsYaml_triggered()));
|
||||
connect(ca, &QAction::triggered, this, &ProtocolHierarchyDialog::on_actionCopyAsYaml_triggered);
|
||||
copy_button_->setMenu(copy_menu);
|
||||
|
||||
QPushButton *close_bt = ui->buttonBox->button(QDialogButtonBox::Close);
|
||||
|
|
|
@ -310,7 +310,7 @@ RtpStreamDialog::RtpStreamDialog(QWidget &parent, CaptureFile &cf) :
|
|||
find_reverse_button_->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
|
||||
find_reverse_button_->setPopupMode(QToolButton::MenuButtonPopup);
|
||||
|
||||
connect(ui->actionFindReverse, SIGNAL(triggered()), this, SLOT(on_actionFindReverseNormal_triggered()));
|
||||
connect(ui->actionFindReverse, &QAction::triggered, this, &RtpStreamDialog::on_actionFindReverseNormal_triggered);
|
||||
find_reverse_button_->setDefaultAction(ui->actionFindReverse);
|
||||
// Overrides text striping of shortcut undercode in QAction
|
||||
find_reverse_button_->setText(ui->actionFindReverseNormal->text());
|
||||
|
@ -319,22 +319,22 @@ RtpStreamDialog::RtpStreamDialog(QWidget &parent, CaptureFile &cf) :
|
|||
analyze_button_ = RtpAnalysisDialog::addAnalyzeButton(ui->buttonBox, this);
|
||||
prepare_button_ = ui->buttonBox->addButton(ui->actionPrepareFilter->text(), QDialogButtonBox::ActionRole);
|
||||
prepare_button_->setToolTip(ui->actionPrepareFilter->toolTip());
|
||||
connect(prepare_button_, SIGNAL(pressed()), this, SLOT(on_actionPrepareFilter_triggered()));
|
||||
connect(prepare_button_, &QPushButton::pressed, this, &RtpStreamDialog::on_actionPrepareFilter_triggered);
|
||||
player_button_ = RtpPlayerDialog::addPlayerButton(ui->buttonBox, this);
|
||||
copy_button_ = ui->buttonBox->addButton(ui->actionCopyButton->text(), QDialogButtonBox::ActionRole);
|
||||
copy_button_->setToolTip(ui->actionCopyButton->toolTip());
|
||||
export_button_ = ui->buttonBox->addButton(ui->actionExportAsRtpDump->text(), QDialogButtonBox::ActionRole);
|
||||
export_button_->setToolTip(ui->actionExportAsRtpDump->toolTip());
|
||||
connect(export_button_, SIGNAL(pressed()), this, SLOT(on_actionExportAsRtpDump_triggered()));
|
||||
connect(export_button_, &QPushButton::pressed, this, &RtpStreamDialog::on_actionExportAsRtpDump_triggered);
|
||||
|
||||
QMenu *copy_menu = new QMenu(copy_button_);
|
||||
QAction *ca;
|
||||
ca = copy_menu->addAction(tr("as CSV"));
|
||||
ca->setToolTip(ui->actionCopyAsCsv->toolTip());
|
||||
connect(ca, SIGNAL(triggered()), this, SLOT(on_actionCopyAsCsv_triggered()));
|
||||
connect(ca, &QAction::triggered, this, &RtpStreamDialog::on_actionCopyAsCsv_triggered);
|
||||
ca = copy_menu->addAction(tr("as YAML"));
|
||||
ca->setToolTip(ui->actionCopyAsYaml->toolTip());
|
||||
connect(ca, SIGNAL(triggered()), this, SLOT(on_actionCopyAsYaml_triggered()));
|
||||
connect(ca, &QAction::triggered, this, &RtpStreamDialog::on_actionCopyAsYaml_triggered);
|
||||
copy_button_->setMenu(copy_menu);
|
||||
connect(&cap_file_, SIGNAL(captureEvent(CaptureEvent)),
|
||||
this, SLOT(captureEvent(CaptureEvent)));
|
||||
|
|
|
@ -79,10 +79,10 @@ TapParameterDialog::TapParameterDialog(QWidget &parent, CaptureFile &cf, int hel
|
|||
|
||||
QPushButton *button;
|
||||
button = ui->buttonBox->addButton(tr("Copy"), QDialogButtonBox::ActionRole);
|
||||
connect(button, SIGNAL(clicked()), this, SLOT(on_actionCopyToClipboard_triggered()));
|
||||
connect(button, &QPushButton::clicked, this, &TapParameterDialog::on_actionCopyToClipboard_triggered);
|
||||
|
||||
button = ui->buttonBox->addButton(tr("Save as…"), QDialogButtonBox::ActionRole);
|
||||
connect(button, SIGNAL(clicked()), this, SLOT(on_actionSaveAs_triggered()));
|
||||
connect(button, &QPushButton::clicked, this, &TapParameterDialog::on_actionSaveAs_triggered);
|
||||
|
||||
connect(ui->displayFilterLineEdit, SIGNAL(textChanged(QString)),
|
||||
this, SLOT(updateWidgets()));
|
||||
|
|
|
@ -680,14 +680,14 @@ main_ui_->goToLineEdit->setValidator(goToLineQiv);
|
|||
connect(proto_tree_, SIGNAL(editProtocolPreference(preference*, pref_module*)),
|
||||
main_ui_->preferenceEditorFrame, SLOT(editPreference(preference*, pref_module*)));
|
||||
|
||||
connect(main_ui_->statusBar, SIGNAL(showExpertInfo()),
|
||||
this, SLOT(on_actionAnalyzeExpertInfo_triggered()));
|
||||
connect(main_ui_->statusBar, &MainStatusBar::showExpertInfo,
|
||||
this, &WiresharkMainWindow::on_actionAnalyzeExpertInfo_triggered);
|
||||
|
||||
connect(main_ui_->statusBar, SIGNAL(stopLoading()),
|
||||
&capture_file_, SLOT(stopLoading()));
|
||||
connect(main_ui_->statusBar, &MainStatusBar::stopLoading,
|
||||
&capture_file_, &CaptureFile::stopLoading);
|
||||
|
||||
connect(main_ui_->statusBar, SIGNAL(editCaptureComment()),
|
||||
this, SLOT(on_actionStatisticsCaptureFileProperties_triggered()));
|
||||
connect(main_ui_->statusBar, &MainStatusBar::editCaptureComment,
|
||||
this, &WiresharkMainWindow::on_actionStatisticsCaptureFileProperties_triggered);
|
||||
|
||||
connect(main_ui_->menuApplyAsFilter, &QMenu::aboutToShow,
|
||||
this, &WiresharkMainWindow::filterMenuAboutToShow);
|
||||
|
|
|
@ -287,6 +287,8 @@ public slots:
|
|||
void setTitlebarForCaptureFile();
|
||||
void setWSWindowTitle(QString title = QString());
|
||||
|
||||
void showCaptureOptionsDialog();
|
||||
|
||||
#ifdef HAVE_LIBPCAP
|
||||
void captureCapturePrepared(capture_session *);
|
||||
void captureCaptureUpdateStarted(capture_session *);
|
||||
|
@ -448,7 +450,6 @@ private slots:
|
|||
void resetPreviousFocus();
|
||||
|
||||
void connectCaptureMenuActions();
|
||||
void showCaptureOptionsDialog();
|
||||
void startCaptureTriggered();
|
||||
|
||||
void on_actionAnalyzeDisplayFilters_triggered();
|
||||
|
|
Loading…
Reference in New Issue