diff --git a/deprecated/IntervalNavigator.cpp b/deprecated/IntervalNavigator.cpp index e1c18f938..2e0c85b21 100644 --- a/deprecated/IntervalNavigator.cpp +++ b/deprecated/IntervalNavigator.cpp @@ -160,7 +160,7 @@ IntervalColumnChooser::IntervalColumnChooser(QList&logicalHeadings) setWindowFlags(windowFlags() | Qt::WindowStaysOnTopHint | Qt::Tool); clicked = new QSignalMapper(this); // maps each button click event - connect(clicked, SIGNAL(mapped(const QString &)), this, SLOT(buttonClicked(const QString &))); + connect(clicked, &QSignalMapper::mappedString, this, &IntervalColumnChooser::buttonClicked); buttons = new QGridLayout(this); buttons->setSpacing(0); diff --git a/src/Charts/ChartBar.cpp b/src/Charts/ChartBar.cpp index 8e0635e37..e8d373ff0 100644 --- a/src/Charts/ChartBar.cpp +++ b/src/Charts/ChartBar.cpp @@ -110,10 +110,10 @@ ChartBar::ChartBar(Context *context) : QWidget(context->mainWindow), context(con //connect(p, SIGNAL(clicked()), action, SLOT(trigger())); signalMapper = new QSignalMapper(this); // maps each option - connect(signalMapper, SIGNAL(mapped(int)), this, SLOT(clicked(int))); + connect(signalMapper, &QSignalMapper::mappedInt, this, &ChartBar::clicked); menuMapper = new QSignalMapper(this); // maps each option - connect(menuMapper, SIGNAL(mapped(int)), this, SLOT(triggerContextMenu(int))); + connect(menuMapper, &QSignalMapper::mappedInt, this, &ChartBar::triggerContextMenu); barMenu = new QMenu("Add"); chartMenu = barMenu->addMenu(tr("New Chart")); diff --git a/src/Charts/RideEditor.cpp b/src/Charts/RideEditor.cpp index d8adfdb33..dfc640f10 100644 --- a/src/Charts/RideEditor.cpp +++ b/src/Charts/RideEditor.cpp @@ -869,7 +869,7 @@ RideEditor::borderMenu(const QPoint &pos) // add menu options for each column if (colMapper) delete colMapper; colMapper = new QSignalMapper(this); - connect(colMapper, SIGNAL(mapped(const QString &)), this, SLOT(insColumn(const QString &))); + connect(colMapper, &QSignalMapper::mappedString, this, &RideEditor::insColumn); foreach(QString heading, whatColumns()) { QAction *insColAct = new QAction(heading, table); diff --git a/src/Cloud/AddCloudWizard.cpp b/src/Cloud/AddCloudWizard.cpp index 2372727ed..5145625e6 100644 --- a/src/Cloud/AddCloudWizard.cpp +++ b/src/Cloud/AddCloudWizard.cpp @@ -93,7 +93,7 @@ AddClass::AddClass(AddCloudWizard *parent) : QWizardPage(parent), wizard(parent) setLayout(layout); mapper = new QSignalMapper(this); - connect(mapper, SIGNAL(mapped(int)), this, SLOT(clicked(int))); + connect(mapper, &QSignalMapper::mappedInt, this, &AddClass::clicked); // Activities QFont font; @@ -147,7 +147,7 @@ AddService::AddService(AddCloudWizard *parent) : QWizardPage(parent), wizard(par scrollarea->setWidget(buttons); mapper = new QSignalMapper(this); - connect(mapper, SIGNAL(mapped(QString)), this, SLOT(clicked(QString))); + connect(mapper, &QSignalMapper::mappedString, this, &AddService::clicked); layout->addWidget(scrollarea); @@ -472,7 +472,7 @@ AddAthlete::AddAthlete(AddCloudWizard *parent) : QWizardPage(parent), wizard(par scrollarea->setWidget(buttons); mapper = new QSignalMapper(this); - connect(mapper, SIGNAL(mapped(int)), this, SLOT(clicked(int))); + connect(mapper, &QSignalMapper::mappedInt, this, &AddAthlete::clicked); layout->addWidget(scrollarea); diff --git a/src/Gui/AddTileWizard.cpp b/src/Gui/AddTileWizard.cpp index baa4a8d6d..8a9ede630 100644 --- a/src/Gui/AddTileWizard.cpp +++ b/src/Gui/AddTileWizard.cpp @@ -83,7 +83,7 @@ AddTileType::AddTileType(AddTileWizard *parent) : QWizardPage(parent), wizard(pa scrollarea->setWidget(buttons); mapper = new QSignalMapper(this); - connect(mapper, SIGNAL(mapped(int)), this, SLOT(clicked(int))); + connect(mapper, &QSignalMapper::mappedInt, this, &AddTileType::clicked); layout->addWidget(scrollarea); diff --git a/src/Gui/AnalysisSidebar.cpp b/src/Gui/AnalysisSidebar.cpp index 104c2ae0e..dd8087c27 100644 --- a/src/Gui/AnalysisSidebar.cpp +++ b/src/Gui/AnalysisSidebar.cpp @@ -431,7 +431,7 @@ AnalysisSidebar::showActivityMenu(const QPoint &pos) // add menu options for each column if (groupByMapper) delete groupByMapper; groupByMapper = new QSignalMapper(this); - connect(groupByMapper, SIGNAL(mapped(const QString &)), rideNavigator, SLOT(setGroupByColumnName(QString))); + connect(groupByMapper, &QSignalMapper::mappedString, rideNavigator, &RideNavigator::setGroupByColumnName); foreach(QString heading, rideNavigator->columnNames()) { if (heading == "*") continue; // special hidden column diff --git a/src/Gui/ColorButton.cpp b/src/Gui/ColorButton.cpp index cd8e0193c..547284029 100644 --- a/src/Gui/ColorButton.cpp +++ b/src/Gui/ColorButton.cpp @@ -123,7 +123,7 @@ GColorDialog::GColorDialog(QColor selected, QWidget *parent, bool all) : QDialog // map button signals mapper = new QSignalMapper(this); - connect(mapper, SIGNAL(mappedInt(int)), this, SLOT(gcClicked(int))); + connect(mapper, &QSignalMapper::mappedInt, this, &GColorDialog::gcClicked); // now add all the colours to select colorSet = GCColor::colorSet(); diff --git a/src/Gui/ConfigDialog.cpp b/src/Gui/ConfigDialog.cpp index 77413d8e8..1c0d0d3fa 100644 --- a/src/Gui/ConfigDialog.cpp +++ b/src/Gui/ConfigDialog.cpp @@ -73,7 +73,7 @@ ConfigDialog::ConfigDialog(QDir _home, Context *context) : // Setup the signal mapping so the right config // widget is displayed when the icon is clicked QSignalMapper *iconMapper = new QSignalMapper(this); // maps each option - connect(iconMapper, SIGNAL(mapped(int)), this, SLOT(changePage(int))); + connect(iconMapper, &QSignalMapper::mappedInt, this, &ConfigDialog::changePage); head->setToolButtonStyle(Qt::ToolButtonTextUnderIcon); head->setIconSize(QSize(32*dpiXFactor,32*dpiXFactor)); // use XFactor for both to ensure aspect ratio maintained diff --git a/src/Gui/DiarySidebar.cpp b/src/Gui/DiarySidebar.cpp index 8cd9e5912..7a6fd75bb 100644 --- a/src/Gui/DiarySidebar.cpp +++ b/src/Gui/DiarySidebar.cpp @@ -369,7 +369,7 @@ GcMiniCalendar::GcMiniCalendar(Context *context, bool master) : context(context) layout->addStretch(); // day clicked - connect(signalMapper, SIGNAL(mapped(int)), this, SLOT(dayClicked(int))); + connect(signalMapper, &QSignalMapper::mappedInt, this, &GcMiniCalendar::dayClicked); // set up for current selections - and watch for future changes connect(context, SIGNAL(configChanged(qint32)), this, SLOT(configChanged(qint32))); diff --git a/src/Gui/MainWindow.cpp b/src/Gui/MainWindow.cpp index eb4467b84..736c989de 100644 --- a/src/Gui/MainWindow.cpp +++ b/src/Gui/MainWindow.cpp @@ -465,19 +465,19 @@ MainWindow::MainWindow(const QDir &home) connect(openTabMenu, SIGNAL(aboutToShow()), this, SLOT(setOpenTabMenu())); tabMapper = new QSignalMapper(this); // maps each option - connect(tabMapper, SIGNAL(mapped(const QString &)), this, SLOT(openAthleteTab(const QString &))); + connect(tabMapper, &QSignalMapper::mappedString, this, &MainWindow::openAthleteTab); fileMenu->addSeparator(); backupAthleteMenu = fileMenu->addMenu(tr("Backup...")); connect(backupAthleteMenu, SIGNAL(aboutToShow()), this, SLOT(setBackupAthleteMenu())); backupMapper = new QSignalMapper(this); // maps each option - connect(backupMapper, SIGNAL(mapped(const QString &)), this, SLOT(backupAthlete(const QString &))); + connect(backupMapper, &QSignalMapper::mappedString, this, &MainWindow::backupAthlete); fileMenu->addSeparator(); deleteAthleteMenu = fileMenu->addMenu(tr("Delete...")); connect(deleteAthleteMenu, SIGNAL(aboutToShow()), this, SLOT(setDeleteAthleteMenu())); deleteMapper = new QSignalMapper(this); // maps each option - connect(deleteMapper, SIGNAL(mapped(const QString &)), this, SLOT(deleteAthlete(const QString &))); + connect(deleteMapper, &QSignalMapper::mappedString, this, &MainWindow::deleteAthlete); fileMenu->addSeparator(); fileMenu->addAction(tr("Settings..."), this, SLOT(athleteSettings())); @@ -595,7 +595,7 @@ MainWindow::MainWindow(const QDir &home) toolMapper = new QSignalMapper(this); // maps each option QMapIterator i(processors); - connect(toolMapper, SIGNAL(mapped(const QString &)), this, SLOT(manualProcess(const QString &))); + connect(toolMapper, &QSignalMapper::mappedString, this, &MainWindow::manualProcess); i.toFront(); while (i.hasNext()) { diff --git a/src/Gui/MergeActivityWizard.cpp b/src/Gui/MergeActivityWizard.cpp index 18bb2e9a1..613a8b509 100644 --- a/src/Gui/MergeActivityWizard.cpp +++ b/src/Gui/MergeActivityWizard.cpp @@ -623,7 +623,7 @@ MergeSource::MergeSource(MergeActivityWizard *parent) : QWizardPage(parent), wiz setLayout(layout); mapper = new QSignalMapper(this); - connect(mapper, SIGNAL(mapped(QString)), this, SLOT(clicked(QString))); + connect(mapper, &QSignalMapper::mappedString, this, &MergeSource::clicked); // select a file QCommandLinkButton *p = new QCommandLinkButton(tr("Import from a File"), @@ -930,7 +930,7 @@ MergeMode::MergeMode(MergeActivityWizard *parent) : QWizardPage(parent), wizard( setLayout(layout); mapper = new QSignalMapper(this); - connect(mapper, SIGNAL(mapped(QString)), this, SLOT(clicked(QString))); + connect(mapper, &QSignalMapper::mappedString, this, &MergeMode::clicked); // merge QCommandLinkButton *p = new QCommandLinkButton(tr("Merge Data to add another data series"), @@ -992,7 +992,7 @@ MergeStrategy::MergeStrategy(MergeActivityWizard *parent) : QWizardPage(parent), setLayout(layout); mapper = new QSignalMapper(this); - connect(mapper, SIGNAL(mapped(QString)), this, SLOT(clicked(QString))); + connect(mapper, &QSignalMapper::mappedString, this, &MergeStrategy::clicked); // time QCommandLinkButton *p = new QCommandLinkButton(tr("Align using start time"), diff --git a/src/Gui/RideNavigator.cpp b/src/Gui/RideNavigator.cpp index 2ba640644..96a6bd291 100644 --- a/src/Gui/RideNavigator.cpp +++ b/src/Gui/RideNavigator.cpp @@ -1289,7 +1289,7 @@ ColumnChooser::ColumnChooser(QList&logicalHeadings) setWindowFlags(windowFlags() | Qt::WindowStaysOnTopHint | Qt::Tool); clicked = new QSignalMapper(this); // maps each button click event - connect(clicked, SIGNAL(mapped(const QString &)), this, SLOT(buttonClicked(const QString &))); + connect(clicked, &QSignalMapper::mappedString, this, &ColumnChooser::buttonClicked); QVBoxLayout *us = new QVBoxLayout(this); us->setSpacing(0); diff --git a/src/Train/AddDeviceWizard.cpp b/src/Train/AddDeviceWizard.cpp index 18c0a2a61..f88df7265 100644 --- a/src/Train/AddDeviceWizard.cpp +++ b/src/Train/AddDeviceWizard.cpp @@ -102,7 +102,7 @@ AddType::AddType(AddDeviceWizard *parent) : QWizardPage(parent), wizard(parent) buttons->setLayout(layout); mapper = new QSignalMapper(this); - connect(mapper, SIGNAL(mapped(QString)), this, SLOT(clicked(QString))); + connect(mapper, &QSignalMapper::mappedString, this, &AddType::clicked); foreach(DeviceType t, wizard->deviceTypes.Supported) { if (t.type) { @@ -836,7 +836,7 @@ AddPair::initializePage() enableDisable(channelWidget); updateValues.start(200); // 5hz - connect(signalMapper, SIGNAL(mapped(int)), this, SLOT(sensorChanged(int))); + connect(signalMapper, &QSignalMapper::mappedInt, this, &AddPair::sensorChanged); connect(&updateValues, SIGNAL(timeout()), this, SLOT(getChannelValues())); connect(wizard->controller, SIGNAL(foundDevice(int,int,int)), this, SLOT(channelInfo(int,int,int))); connect(wizard->controller, SIGNAL(searchTimeout(int)), this, SLOT(searchTimeout(int)));