diff --git a/ui/qt/accordion_frame.cpp b/ui/qt/accordion_frame.cpp index 988bccd566..e62209861d 100644 --- a/ui/qt/accordion_frame.cpp +++ b/ui/qt/accordion_frame.cpp @@ -38,7 +38,7 @@ AccordionFrame::AccordionFrame(QWidget *parent) : animation_ = new QPropertyAnimation(this, "maximumHeight", this); animation_->setDuration(duration_); animation_->setEasingCurve(QEasingCurve::InOutQuad); - connect(animation_, SIGNAL(finished()), this, SLOT(animationFinished())); + connect(animation_, &QPropertyAnimation::finished, this, &AccordionFrame::animationFinished); } void AccordionFrame::animatedShow() diff --git a/ui/qt/bluetooth_device_dialog.cpp b/ui/qt/bluetooth_device_dialog.cpp index a52b68f702..cddedfd748 100644 --- a/ui/qt/bluetooth_device_dialog.cpp +++ b/ui/qt/bluetooth_device_dialog.cpp @@ -104,15 +104,12 @@ BluetoothDeviceDialog::BluetoothDeviceDialog(QWidget &parent, CaptureFile &cf, Q WiresharkDialog(parent, cf), ui(new Ui::BluetoothDeviceDialog) { - QString titleBdAddr; - QString titleName; - ui->setupUi(this); resize(parent.width() * 4 / 10, parent.height() * 2 / 2); setTitle(bdAddr, name); - connect(ui->tableWidget, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(tableContextMenu(const QPoint &))); + connect(ui->tableWidget, &QTableWidget::customContextMenuRequested, this, &BluetoothDeviceDialog::tableContextMenu); ui->tableWidget->horizontalHeader()->setSectionResizeMode(0, QHeaderView::Stretch); diff --git a/ui/qt/column_editor_frame.cpp b/ui/qt/column_editor_frame.cpp index 30c8f86296..be28b62458 100644 --- a/ui/qt/column_editor_frame.cpp +++ b/ui/qt/column_editor_frame.cpp @@ -43,8 +43,8 @@ ColumnEditorFrame::ColumnEditorFrame(QWidget *parent) : ui->typeComboBox->addItem(col_format_desc(i), QVariant(i)); } - connect(ui->fieldsNameLineEdit, SIGNAL(textChanged(QString)), - ui->fieldsNameLineEdit, SLOT(checkCustomColumn(QString))); + connect(ui->fieldsNameLineEdit, &FieldFilterEdit::textChanged, + ui->fieldsNameLineEdit, &FieldFilterEdit::checkCustomColumn); } ColumnEditorFrame::~ColumnEditorFrame() diff --git a/ui/qt/compiled_filter_output.cpp b/ui/qt/compiled_filter_output.cpp index 4291578074..3a8f349c59 100644 --- a/ui/qt/compiled_filter_output.cpp +++ b/ui/qt/compiled_filter_output.cpp @@ -38,7 +38,7 @@ CompiledFilterOutput::CompiledFilterOutput(QWidget *parent, QStringList &intList copy_bt_ = ui->buttonBox->addButton(tr("Copy"), QDialogButtonBox::ActionRole); copy_bt_->setToolTip(tr("Copy filter text to the clipboard.")); - connect(copy_bt_, SIGNAL(clicked()), this, SLOT(copyFilterText())); + connect(copy_bt_, &QPushButton::clicked, this, &CompiledFilterOutput::copyFilterText); QPushButton *close_bt = ui->buttonBox->button(QDialogButtonBox::Close); close_bt->setDefault(true); diff --git a/ui/qt/credentials_dialog.cpp b/ui/qt/credentials_dialog.cpp index cd7419568e..0ea434e47a 100644 --- a/ui/qt/credentials_dialog.cpp +++ b/ui/qt/credentials_dialog.cpp @@ -72,7 +72,7 @@ CredentialsDialog::CredentialsDialog(QWidget &parent, CaptureFile &cf, PacketLis ui->auths->setSortingEnabled(true); ui->auths->sortByColumn(CredentialsModel::COL_NUM, Qt::AscendingOrder); - connect(ui->auths, SIGNAL(clicked(const QModelIndex&)), this, SLOT(actionGoToPacket(const QModelIndex&))); + connect(ui->auths, &QTreeView::clicked, this, &CredentialsDialog::actionGoToPacket); registerTapListener("credentials", this, "", 0, tapReset, tapPacket, Q_NULLPTR); cf.retapPackets(); diff --git a/ui/qt/decode_as_dialog.cpp b/ui/qt/decode_as_dialog.cpp index 49a6d7f762..8f2af90975 100644 --- a/ui/qt/decode_as_dialog.cpp +++ b/ui/qt/decode_as_dialog.cpp @@ -79,7 +79,7 @@ DecodeAsDialog::DecodeAsDialog(QWidget *parent, capture_file *cf, bool create_ne fillTable(); - connect(model_, SIGNAL(modelReset()), this, SLOT(modelRowsReset())); + connect(model_, &DecodeAsModel::modelReset, this, &DecodeAsDialog::modelRowsReset); ui->clearToolButton->setEnabled(model_->rowCount() > 0); if (create_new) diff --git a/ui/qt/extcap_options_dialog.cpp b/ui/qt/extcap_options_dialog.cpp index 7fce12af69..27bc41ca9f 100644 --- a/ui/qt/extcap_options_dialog.cpp +++ b/ui/qt/extcap_options_dialog.cpp @@ -338,7 +338,7 @@ void ExtcapOptionsDialog::updateWidgets() if (argument->isRequired() && ! argument->isValid()) allowStart = false; - connect(argument, SIGNAL(valueChanged()), this, SLOT(anyValueChanged())); + connect(argument, &ExtcapArgument::valueChanged, this, &ExtcapOptionsDialog::anyValueChanged); counter++; } diff --git a/ui/qt/file_set_dialog.cpp b/ui/qt/file_set_dialog.cpp index 6489bb8249..ea8ea505da 100644 --- a/ui/qt/file_set_dialog.cpp +++ b/ui/qt/file_set_dialog.cpp @@ -70,8 +70,8 @@ FileSetDialog::FileSetDialog(QWidget *parent) : close_button_ = fs_ui_->buttonBox->button(QDialogButtonBox::Close); - connect(fs_ui_->fileSetTree->selectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelection)), - this, SLOT(selectionChanged(QItemSelection,QItemSelection))); + connect(fs_ui_->fileSetTree->selectionModel(), &QItemSelectionModel::selectionChanged, + this, &FileSetDialog::selectionChanged); beginAddFile(); addFile(); diff --git a/ui/qt/funnel_string_dialog.cpp b/ui/qt/funnel_string_dialog.cpp index 8eec725ec9..99294672e1 100644 --- a/ui/qt/funnel_string_dialog.cpp +++ b/ui/qt/funnel_string_dialog.cpp @@ -17,7 +17,7 @@ #include "wireshark_application.h" // Helper object used for sending close signal to open dialogs from a C function -static FunnelStringDialogHelper dialogHelper; +static FunnelStringDialogHelper dialog_helper_; const int min_edit_width_ = 20; // em widths FunnelStringDialog::FunnelStringDialog(const QString title, const QList> field_list, funnel_dlg_cb_t dialog_cb, void* dialog_cb_data, funnel_dlg_cb_data_free_t dialog_data_free_cb) : @@ -88,7 +88,7 @@ void FunnelStringDialog::on_buttonBox_accepted() void FunnelStringDialog::stringDialogNew(const QString title, QList> field_list, funnel_dlg_cb_t dialog_cb, void* dialog_cb_data, funnel_dlg_cb_data_free_t dialog_cb_data_free) { FunnelStringDialog* fsd = new FunnelStringDialog(title, field_list, dialog_cb, dialog_cb_data, dialog_cb_data_free); - connect(&dialogHelper, SIGNAL(closeDialogs()), fsd, SLOT(close())); + connect(&dialog_helper_, &FunnelStringDialogHelper::closeDialogs, fsd, &FunnelStringDialog::close); fsd->show(); } @@ -114,5 +114,5 @@ void string_dialog_new(const gchar* title, const gchar** field_names, const gcha void string_dialogs_close(void) { - dialogHelper.emitCloseDialogs(); + dialog_helper_.emitCloseDialogs(); } diff --git a/ui/qt/funnel_text_dialog.cpp b/ui/qt/funnel_text_dialog.cpp index f9c13e7588..107bd8f5e7 100644 --- a/ui/qt/funnel_text_dialog.cpp +++ b/ui/qt/funnel_text_dialog.cpp @@ -126,7 +126,7 @@ void FunnelTextDialog::addButton(funnel_bt_t *funnel_button, QString label) QPushButton *button = new QPushButton(label); ui->buttonBox->addButton(button, QDialogButtonBox::ActionRole); text_button_to_funnel_button_[button] = funnel_button; - connect(button, SIGNAL(clicked(bool)), this, SLOT(buttonClicked())); + connect(button, &QPushButton::clicked, this, &FunnelTextDialog::buttonClicked); } void FunnelTextDialog::buttonClicked() diff --git a/ui/qt/models/packet_list_model.cpp b/ui/qt/models/packet_list_model.cpp index fd95b7d5ed..7d16070248 100644 --- a/ui/qt/models/packet_list_model.cpp +++ b/ui/qt/models/packet_list_model.cpp @@ -89,8 +89,8 @@ PacketListModel::PacketListModel(QObject *parent, capture_file *cf) : if (wtWidget && qobject_cast(wtWidget)) { WirelessTimeline * wt = qobject_cast(wtWidget); - connect(this, SIGNAL(bgColorizationProgress(int, int)), - wt, SLOT(bgColorizationProgress(int, int))); + connect(this, &PacketListModel::bgColorizationProgress, + wt, &WirelessTimeline::bgColorizationProgress); } } diff --git a/ui/qt/preferences_dialog.cpp b/ui/qt/preferences_dialog.cpp index 74ba141ab3..7e36452769 100644 --- a/ui/qt/preferences_dialog.cpp +++ b/ui/qt/preferences_dialog.cpp @@ -132,7 +132,7 @@ PreferencesDialog::PreferencesDialog(QWidget *parent) : pd_ui_->filterExpressonsFrame->setUat(uat_get_table_by_name("Display expressions")); pd_ui_->expertFrame->setUat(uat_get_table_by_name("Expert Info Severity Level Configuration")); - connect(pd_ui_->prefsView, SIGNAL(goToPane(QString)), this, SLOT(selectPane(QString))); + connect(pd_ui_->prefsView, &PrefModuleTreeView::goToPane, this, &PreferencesDialog::selectPane); /* Create a single-shot timer for debouncing calls to * updateSearchLineEdit() */ diff --git a/ui/qt/rtp_audio_stream.cpp b/ui/qt/rtp_audio_stream.cpp index 51e19e7b0f..83b3c248ea 100644 --- a/ui/qt/rtp_audio_stream.cpp +++ b/ui/qt/rtp_audio_stream.cpp @@ -719,7 +719,7 @@ bool RtpAudioStream::prepareForPlay(QAudioDeviceInfo out_device) temp_file_->seek(start_pos); if (audio_output_) delete audio_output_; audio_output_ = new QAudioOutput(out_device, format, this); - connect(audio_output_, SIGNAL(stateChanged(QAudio::State)), this, SLOT(outputStateChanged(QAudio::State))); + connect(audio_output_, &QAudioOutput::stateChanged, this, &RtpAudioStream::outputStateChanged); return true; } else { // Report stopped audio if start position is later than stream ends diff --git a/ui/qt/sctp_chunk_statistics_dialog.cpp b/ui/qt/sctp_chunk_statistics_dialog.cpp index 291a0fba7c..ea4de028f0 100644 --- a/ui/qt/sctp_chunk_statistics_dialog.cpp +++ b/ui/qt/sctp_chunk_statistics_dialog.cpp @@ -45,7 +45,7 @@ SCTPChunkStatisticsDialog::SCTPChunkStatisticsDialog(QWidget *parent, const sctp this->setWindowTitle(QString(tr("SCTP Chunk Statistics: %1 Port1 %2 Port2 %3")) .arg(gchar_free_to_qstring(cf_get_display_name(cap_file_))) .arg(assoc->port1).arg(assoc->port2)); - // connect(ui->tableWidget->verticalHeader(), SIGNAL(sectionMoved(int,int,int)), this, SLOT(on_sectionMoved(int, int, int))); +// connect(ui->tableWidget->verticalHeader(), &QHeaderView::sectionMoved, this, &SCTPChunkStatisticsDialog::on_sectionMoved); ctx_menu_.addAction(ui->actionHideChunkType); ctx_menu_.addAction(ui->actionChunkTypePreferences); diff --git a/ui/qt/sctp_graph_arwnd_dialog.cpp b/ui/qt/sctp_graph_arwnd_dialog.cpp index a1bdfc6764..2734f28a67 100644 --- a/ui/qt/sctp_graph_arwnd_dialog.cpp +++ b/ui/qt/sctp_graph_arwnd_dialog.cpp @@ -134,7 +134,7 @@ void SCTPGraphArwndDialog::drawGraph(const sctp_assoc_info_t *selected_assoc) ui->sctpPlot->setInteractions(QCP::iRangeZoom | QCP::iRangeDrag | QCP::iSelectPlottables); ui->sctpPlot->axisRect(0)->setRangeZoomAxes(ui->sctpPlot->xAxis, ui->sctpPlot->yAxis); ui->sctpPlot->axisRect(0)->setRangeZoom(Qt::Horizontal); - connect(ui->sctpPlot, SIGNAL(plottableClick(QCPAbstractPlottable*,QMouseEvent*)), this, SLOT(graphClicked(QCPAbstractPlottable*, QMouseEvent*))); + connect(ui->sctpPlot, &QCustomPlot::plottableClick, this, &SCTPGraphArwndDialog::graphClicked); ui->sctpPlot->replot(); } @@ -149,7 +149,7 @@ void SCTPGraphArwndDialog::on_pushButton_4_clicked() ui->sctpPlot->replot(); } -void SCTPGraphArwndDialog::graphClicked(QCPAbstractPlottable* plottable, QMouseEvent* event) +void SCTPGraphArwndDialog::graphClicked(QCPAbstractPlottable* plottable, int, QMouseEvent* event) { if (plottable->name().contains("Arwnd", Qt::CaseInsensitive)) { double times = ui->sctpPlot->xAxis->pixelToCoord(event->pos().x()); diff --git a/ui/qt/sctp_graph_arwnd_dialog.h b/ui/qt/sctp_graph_arwnd_dialog.h index 790767ca3a..27e970c662 100644 --- a/ui/qt/sctp_graph_arwnd_dialog.h +++ b/ui/qt/sctp_graph_arwnd_dialog.h @@ -40,7 +40,7 @@ public slots: private slots: void on_pushButton_4_clicked(); - void graphClicked(QCPAbstractPlottable* plottable, QMouseEvent* event); + void graphClicked(QCPAbstractPlottable* plottable, int, QMouseEvent* event); void on_saveButton_clicked(); diff --git a/ui/qt/sctp_graph_byte_dialog.cpp b/ui/qt/sctp_graph_byte_dialog.cpp index c45ff182c3..bd91c088b4 100644 --- a/ui/qt/sctp_graph_byte_dialog.cpp +++ b/ui/qt/sctp_graph_byte_dialog.cpp @@ -133,7 +133,7 @@ void SCTPGraphByteDialog::drawGraph() ui->sctpPlot->clearGraphs(); drawBytesGraph(selected_assoc); ui->sctpPlot->setInteractions(QCP::iRangeZoom | QCP::iRangeDrag | QCP::iSelectPlottables); - connect(ui->sctpPlot, SIGNAL(plottableClick(QCPAbstractPlottable*,QMouseEvent*)), this, SLOT(graphClicked(QCPAbstractPlottable*, QMouseEvent*))); + connect(ui->sctpPlot, &QCustomPlot::plottableClick, this, &SCTPGraphByteDialog::graphClicked); ui->sctpPlot->replot(); } @@ -152,7 +152,7 @@ void SCTPGraphByteDialog::on_pushButton_4_clicked() ui->sctpPlot->replot(); } -void SCTPGraphByteDialog::graphClicked(QCPAbstractPlottable* plottable, QMouseEvent* event) +void SCTPGraphByteDialog::graphClicked(QCPAbstractPlottable* plottable, int, QMouseEvent* event) { if (plottable->name().contains(tr("Bytes"), Qt::CaseInsensitive)) { double bytes = ui->sctpPlot->yAxis->pixelToCoord(event->pos().y()); diff --git a/ui/qt/sctp_graph_byte_dialog.h b/ui/qt/sctp_graph_byte_dialog.h index 41c867ba69..6acbd1cc09 100644 --- a/ui/qt/sctp_graph_byte_dialog.h +++ b/ui/qt/sctp_graph_byte_dialog.h @@ -40,7 +40,7 @@ public slots: private slots: void on_pushButton_4_clicked(); - void graphClicked(QCPAbstractPlottable* plottable, QMouseEvent* event); + void graphClicked(QCPAbstractPlottable* plottable, int, QMouseEvent* event); void on_saveButton_clicked(); diff --git a/ui/qt/sctp_graph_dialog.cpp b/ui/qt/sctp_graph_dialog.cpp index c1339c083f..fd609cc5da 100644 --- a/ui/qt/sctp_graph_dialog.cpp +++ b/ui/qt/sctp_graph_dialog.cpp @@ -371,7 +371,7 @@ void SCTPGraphDialog::drawGraph(const sctp_assoc_info_t* selected_assoc) ui->sctpPlot->xAxis->setLabel(tr("time [secs]")); ui->sctpPlot->yAxis->setLabel(tr("TSNs")); ui->sctpPlot->setInteractions(QCP::iRangeZoom | QCP::iRangeDrag | QCP::iSelectPlottables); - connect(ui->sctpPlot, SIGNAL(plottableClick(QCPAbstractPlottable*,QMouseEvent*)), this, SLOT(graphClicked(QCPAbstractPlottable*, QMouseEvent*))); + connect(ui->sctpPlot, &QCustomPlot::plottableClick, this, &SCTPGraphDialog::graphClicked); // set axes ranges, so we see all data: QCPRange myXRange(selected_assoc->min_secs, (selected_assoc->max_secs+1)); if (relative) { @@ -425,7 +425,7 @@ void SCTPGraphDialog::on_pushButton_4_clicked() ui->sctpPlot->replot(); } -void SCTPGraphDialog::graphClicked(QCPAbstractPlottable* plottable, QMouseEvent* event) +void SCTPGraphDialog::graphClicked(QCPAbstractPlottable* plottable, int, QMouseEvent* event) { frame_num = 0; int i=0; diff --git a/ui/qt/sctp_graph_dialog.h b/ui/qt/sctp_graph_dialog.h index 724cd33e28..70de874566 100644 --- a/ui/qt/sctp_graph_dialog.h +++ b/ui/qt/sctp_graph_dialog.h @@ -94,7 +94,7 @@ private slots: void on_pushButton_4_clicked(); - void graphClicked(QCPAbstractPlottable* plottable, QMouseEvent* event); + void graphClicked(QCPAbstractPlottable* plottable, int, QMouseEvent* event); void on_saveButton_clicked(); diff --git a/ui/qt/service_response_time_dialog.cpp b/ui/qt/service_response_time_dialog.cpp index 4e3b4cbd65..c332c52867 100644 --- a/ui/qt/service_response_time_dialog.cpp +++ b/ui/qt/service_response_time_dialog.cpp @@ -197,8 +197,8 @@ ServiceResponseTimeDialog::ServiceResponseTimeDialog(QWidget &parent, CaptureFil setDisplayFilter(filter); } - connect(statsTreeWidget(), SIGNAL(itemChanged(QTreeWidgetItem*,int)), - this, SLOT(statsTreeWidgetItemChanged())); + connect(statsTreeWidget(), &QTreeWidget::itemChanged, + this, &ServiceResponseTimeDialog::statsTreeWidgetItemChanged); } ServiceResponseTimeDialog::~ServiceResponseTimeDialog() diff --git a/ui/qt/time_shift_dialog.cpp b/ui/qt/time_shift_dialog.cpp index a96ac633db..d7b6ecf4c5 100644 --- a/ui/qt/time_shift_dialog.cpp +++ b/ui/qt/time_shift_dialog.cpp @@ -27,7 +27,7 @@ TimeShiftDialog::TimeShiftDialog(QWidget *parent, capture_file *cf) : setWindowTitle(wsApp->windowTitleString(tr("Time Shift"))); apply_button_ = ts_ui_->buttonBox->button(QDialogButtonBox::Apply); apply_button_->setDefault(true); - connect(apply_button_, SIGNAL(clicked()), this, SLOT(applyTimeShift())); + connect(apply_button_, &QPushButton::clicked, this, &TimeShiftDialog::applyTimeShift); QStyleOption style_opt; int rb_label_offset = ts_ui_->shiftAllButton->style()->subElementRect(QStyle::SE_RadioButtonContents, &style_opt).left(); diff --git a/ui/qt/widgets/splash_overlay.cpp b/ui/qt/widgets/splash_overlay.cpp index 7cfc24c942..d46f33501b 100644 --- a/ui/qt/widgets/splash_overlay.cpp +++ b/ui/qt/widgets/splash_overlay.cpp @@ -82,8 +82,7 @@ SplashOverlay::SplashOverlay(QWidget *parent) : ) .arg(QColor(tango_aluminium_4).name())); - connect(wsApp, SIGNAL(splashUpdate(register_action_e,const char*)), - this, SLOT(splashUpdate(register_action_e,const char*))); + connect(wsApp, &WiresharkApplication::splashUpdate, this, &SplashOverlay::splashUpdate); } SplashOverlay::~SplashOverlay() diff --git a/ui/qt/wireshark_dialog.cpp b/ui/qt/wireshark_dialog.cpp index 8601d7d8f3..7d72c2ae64 100644 --- a/ui/qt/wireshark_dialog.cpp +++ b/ui/qt/wireshark_dialog.cpp @@ -39,8 +39,7 @@ WiresharkDialog::WiresharkDialog(QWidget &parent, CaptureFile &capture_file) : setWindowIcon(wsApp->normalIcon()); setWindowSubtitle(QString()); - connect(&cap_file_, SIGNAL(captureEvent(CaptureEvent)), - this, SLOT(captureEvent(CaptureEvent))); + connect(&cap_file_, &CaptureFile::captureEvent, this, &WiresharkDialog::captureEvent); } void WiresharkDialog::accept()