Qt6: migrate obsolete currentIndexChanged(QString)

Similar to work done in !8070 and !8072 to move off a function
that was deprecated in Qt5 and obsoleted in Qt6. Also migrate to
syntax laid out in !4560 and !4565.
This commit is contained in:
Chuck Craft 2022-09-12 11:14:38 -05:00 committed by Gerald Combs
parent d4394de669
commit 87a7260bb0
4 changed files with 6 additions and 6 deletions

View File

@ -1390,7 +1390,7 @@ QWidget* InterfaceTreeDelegate::createEditor(QWidget *parent, const QStyleOption
QComboBox *cb = new QComboBox(parent);
cb->addItems(valid_link_types);
connect(cb, SIGNAL(currentIndexChanged(QString)), this, SLOT(linkTypeChanged(QString)));
connect(cb, &QComboBox::currentTextChanged, this, &InterfaceTreeDelegate::linkTypeChanged);
w = (QWidget*) cb;
break;
}
@ -1445,7 +1445,7 @@ bool InterfaceTreeDelegate::eventFilter(QObject *object, QEvent *event)
return false;
}
void InterfaceTreeDelegate::linkTypeChanged(QString selected_link_type)
void InterfaceTreeDelegate::linkTypeChanged(const QString selected_link_type)
{
GList *list;
link_row *temp;

View File

@ -47,7 +47,7 @@ signals:
void filterChanged(const QString filter);
private slots:
void linkTypeChanged(QString selected_link_type);
void linkTypeChanged(const QString selected_link_type);
void snapshotLengthChanged(int value);
void bufferSizeChanged(int value);
};

View File

@ -35,7 +35,7 @@ RemoteCaptureDialog::RemoteCaptureDialog(QWidget *parent) :
fillComboBox();
connect(ui->buttonBox, SIGNAL(accepted()), this, SLOT(apply_remote()));
connect(this, SIGNAL(remoteAdded(GList *, remote_options*)), parent, SIGNAL(remoteAdded(GList *, remote_options*)));
connect(ui->hostCombo, SIGNAL(currentIndexChanged(QString)), this, SLOT(hostChanged(QString)));
connect(ui->hostCombo, &QComboBox::currentTextChanged, this, &RemoteCaptureDialog::hostChanged);
}
RemoteCaptureDialog::~RemoteCaptureDialog()
@ -43,7 +43,7 @@ RemoteCaptureDialog::~RemoteCaptureDialog()
delete ui;
}
void RemoteCaptureDialog::hostChanged(QString host)
void RemoteCaptureDialog::hostChanged(const QString host)
{
if (!host.compare(tr("Clear list"))) {
recent_free_remote_host_list();

View File

@ -37,7 +37,7 @@ private slots:
void on_pwAuth_toggled(bool checked);
void on_nullAuth_toggled(bool checked);
void apply_remote();
void hostChanged(QString host);
void hostChanged(const QString host);
private:
Ui::RemoteCaptureDialog *ui;