From 138c68a4e643217ae67b76bdfd9e8c2b65027e4f Mon Sep 17 00:00:00 2001 From: Joachim Kohlhammer Date: Sun, 14 Jan 2024 16:44:29 +0100 Subject: [PATCH] Qt6: Fixed connections (#4436) In UserChart and DownloadRideDialog the deprecated signal QComboBox::currentIndexChanged(QString) was connected to a slot without parameters. In Qt6 this created a warning. Changed to signal QComboBox::currentIndexChanged(int) --- src/Charts/UserChart.cpp | 4 ++-- src/Gui/DownloadRideDialog.cpp | 6 ++---- src/Gui/DownloadRideDialog.h | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/Charts/UserChart.cpp b/src/Charts/UserChart.cpp index 0198f50f2..743a58721 100644 --- a/src/Charts/UserChart.cpp +++ b/src/Charts/UserChart.cpp @@ -958,9 +958,9 @@ UserChartSettings::UserChartSettings(Context *context, bool rangemode, GenericCh // watch for chartinfo edits (the series/axis stuff is managed by separate dialogs) connect(title, SIGNAL(textChanged(QString)), this, SLOT(updateChartInfo())); connect(description, SIGNAL(textChanged()), this, SLOT(updateChartInfo())); - connect(type, SIGNAL(currentIndexChanged(QString)), this, SLOT(updateChartInfo())); + connect(type, SIGNAL(currentIndexChanged(int)), this, SLOT(updateChartInfo())); connect(animate, SIGNAL(stateChanged(int)), this, SLOT(updateChartInfo())); - connect(legpos, SIGNAL(currentIndexChanged(QString)), this, SLOT(updateChartInfo())); + connect(legpos, SIGNAL(currentIndexChanged(int)), this, SLOT(updateChartInfo())); connect(stack, SIGNAL(stateChanged(int)), this, SLOT(updateChartInfo())); connect(intervalrefresh, SIGNAL(stateChanged(int)), this, SLOT(updateChartInfo())); connect(orientation, SIGNAL(currentIndexChanged(int)), this, SLOT(updateChartInfo())); diff --git a/src/Gui/DownloadRideDialog.cpp b/src/Gui/DownloadRideDialog.cpp index a563674b5..165b76fe8 100644 --- a/src/Gui/DownloadRideDialog.cpp +++ b/src/Gui/DownloadRideDialog.cpp @@ -50,7 +50,7 @@ DownloadRideDialog::DownloadRideDialog(Context *context, bool embedded) : int idx = deviceCombo->findText( defaultDevice ); if( idx >= 0 ) deviceCombo->setCurrentIndex( idx ); - connect(deviceCombo, SIGNAL(currentIndexChanged(QString)), this, SLOT(deviceChanged(QString))); + connect(deviceCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(deviceChanged())); portCombo = new QComboBox(this); @@ -270,10 +270,8 @@ DownloadRideDialog::updateProgress( const QString &progressText ) void -DownloadRideDialog::deviceChanged( QString deviceType ) +DownloadRideDialog::deviceChanged() { - (void)deviceType; - updateAction(action); // adjust erase button visibility updatePort(); } diff --git a/src/Gui/DownloadRideDialog.h b/src/Gui/DownloadRideDialog.h index ccfe38989..2b238b8df 100644 --- a/src/Gui/DownloadRideDialog.h +++ b/src/Gui/DownloadRideDialog.h @@ -56,7 +56,7 @@ class DownloadRideDialog : public QDialog void closeClicked(); void setReadyInstruct(); void scanCommPorts(); - void deviceChanged(QString); + void deviceChanged(); void updateStatus(const QString &statusText); void updateProgress(const QString &progressText);