diff --git a/sources/exportdialog.cpp b/sources/exportdialog.cpp index 7e2b9f7ac..3507b6309 100644 --- a/sources/exportdialog.cpp +++ b/sources/exportdialog.cpp @@ -141,12 +141,12 @@ QWidget *ExportDialog::initDiagramsListPart() clipboard_mapper_ = new QSignalMapper(this); #if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) // TODO Qt6 only: remove, mappedInt() always available - connect(preview_mapper_, SIGNAL(mapped(int)), this, SLOT(slot_previewDiagram(int))); - connect(width_mapper_, SIGNAL(mapped(int)), this, SLOT(slot_correctHeight(int))); - connect(height_mapper_, SIGNAL(mapped(int)), this, SLOT(slot_correctWidth(int))); - connect(ratio_mapper_, SIGNAL(mapped(int)), this, SLOT(slot_keepRatioChanged(int))); - connect(reset_mapper_, SIGNAL(mapped(int)), this, SLOT(slot_resetSize(int))); - connect(clipboard_mapper_, SIGNAL(mapped(int)), this, SLOT(slot_exportToClipBoard(int))); + connect(preview_mapper_, qOverload(&QSignalMapper::mapped), this, &ExportDialog::slot_previewDiagram); + connect(width_mapper_, qOverload(&QSignalMapper::mapped), this, &ExportDialog::slot_correctHeight); + connect(height_mapper_, qOverload(&QSignalMapper::mapped), this, &ExportDialog::slot_correctWidth); + connect(ratio_mapper_, qOverload(&QSignalMapper::mapped), this, &ExportDialog::slot_keepRatioChanged); + connect(reset_mapper_, qOverload(&QSignalMapper::mapped), this, &ExportDialog::slot_resetSize); + connect(clipboard_mapper_, qOverload(&QSignalMapper::mapped), this, &ExportDialog::slot_exportToClipBoard); #else connect(preview_mapper_, &QSignalMapper::mappedInt, this, &ExportDialog::slot_previewDiagram); connect(width_mapper_, &QSignalMapper::mappedInt, this, &ExportDialog::slot_correctHeight); diff --git a/sources/qetapp.cpp b/sources/qetapp.cpp index 95d84a4d0..5b7003c57 100644 --- a/sources/qetapp.cpp +++ b/sources/qetapp.cpp @@ -125,7 +125,7 @@ QETApp::QETApp() : initSystemTray(); #if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) // TODO Qt6 only: remove, mappedObject() always available - connect(&signal_map, SIGNAL(mapped(QWidget *)), this, SLOT(invertMainWindowVisibility(QWidget *))); + connect(&signal_map, qOverload(&QSignalMapper::mapped), this, [this](QObject *object) { invertMainWindowVisibility(qobject_cast(object)); }); #else connect(&signal_map, &QSignalMapper::mappedObject, this, [this](QObject *object) { invertMainWindowVisibility(qobject_cast(object)); }); #endif diff --git a/sources/qetdiagrameditor.cpp b/sources/qetdiagrameditor.cpp index 44353b655..97c062490 100644 --- a/sources/qetdiagrameditor.cpp +++ b/sources/qetdiagrameditor.cpp @@ -108,7 +108,7 @@ QETDiagramEditor::QETDiagramEditor(const QStringList &files, QWidget *parent) : //Set the signal mapper #if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) // TODO Qt6 only: remove, mappedObject() always available - connect(&windowMapper, SIGNAL(mapped(QWidget *)), this, SLOT(activateWidget(QWidget *))); + connect(&windowMapper, qOverload(&QSignalMapper::mapped), this, [this](QObject *object) { activateWidget(qobject_cast(object)); }); #else connect(&windowMapper, &QSignalMapper::mappedObject, this, [this](QObject *object) { activateWidget(qobject_cast(object)); }); #endif diff --git a/sources/titleblock/templatelogomanager.cpp b/sources/titleblock/templatelogomanager.cpp index 8a0df8e4f..a8e925f4f 100644 --- a/sources/titleblock/templatelogomanager.cpp +++ b/sources/titleblock/templatelogomanager.cpp @@ -217,8 +217,7 @@ QString TitleBlockTemplateLogoManager::confirmLogoName(const QString &initial_na connect(rename_button, &QPushButton::clicked, signal_mapper, qOverload<>(&QSignalMapper::map)); connect(cancel_button, &QPushButton::clicked, signal_mapper, qOverload<>(&QSignalMapper::map)); #if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) // TODO Qt6 only: remove, mappedInt() always available - connect(signal_mapper, SIGNAL(mapped(int)), rename_dialog, SLOT(done(int))); - + connect(signal_mapper, qOverload(&QSignalMapper::mapped), rename_dialog, &QDialog::done); #else connect(signal_mapper, &QSignalMapper::mappedInt, rename_dialog, &QDialog::done); #endif diff --git a/sources/ui/configpage/projectconfigpages.cpp b/sources/ui/configpage/projectconfigpages.cpp index 0a95c3c10..183b16f38 100644 --- a/sources/ui/configpage/projectconfigpages.cpp +++ b/sources/ui/configpage/projectconfigpages.cpp @@ -397,7 +397,7 @@ void ProjectAutoNumConfigPage::buildConnections() connect(m_saw_conductor, &SelectAutonumW::applyPressed, this, &ProjectAutoNumConfigPage::saveContextConductor); connect(m_saw_conductor, &SelectAutonumW::removeClicked, this, &ProjectAutoNumConfigPage::removeContextConductor); #if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) // TODO Qt6 only: remove, textActivated() always available - connect(m_saw_conductor->contextComboBox(), SIGNAL(activated(QString)), this, SLOT(updateContextConductor(QString))); + connect(m_saw_conductor->contextComboBox(), &QComboBox::activated, this, &ProjectAutoNumConfigPage::updateContextConductor); #else connect(m_saw_conductor->contextComboBox(), &QComboBox::textActivated, this, &ProjectAutoNumConfigPage::updateContextConductor); #endif @@ -406,7 +406,7 @@ void ProjectAutoNumConfigPage::buildConnections() connect(m_saw_element, &SelectAutonumW::applyPressed, this, &ProjectAutoNumConfigPage::saveContextElement); connect(m_saw_element, &SelectAutonumW::removeClicked, this, &ProjectAutoNumConfigPage::removeContextElement); #if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) // TODO Qt6 only: remove, textActivated() always available - connect(m_saw_element->contextComboBox(), SIGNAL(activated(QString)), this, SLOT(updateContextElement(QString))); + connect(m_saw_element->contextComboBox(), &QComboBox::activated, this, &ProjectAutoNumConfigPage::updateContextElement); #else connect(m_saw_element->contextComboBox(), &QComboBox::textActivated, this, &ProjectAutoNumConfigPage::updateContextElement); #endif @@ -415,7 +415,7 @@ void ProjectAutoNumConfigPage::buildConnections() connect(m_saw_folio, &SelectAutonumW::applyPressed, this, &ProjectAutoNumConfigPage::saveContextFolio); connect(m_saw_folio, &SelectAutonumW::removeClicked, this, &ProjectAutoNumConfigPage::removeContextFolio); #if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) // TODO Qt6 only: remove, textActivated() always available - connect(m_saw_folio->contextComboBox(), SIGNAL(activated(QString)), this, SLOT(updateContextFolio(QString))); + connect(m_saw_folio->contextComboBox(), &QComboBox::activated, this, &ProjectAutoNumConfigPage::updateContextFolio); #else connect(m_saw_folio->contextComboBox(), &QComboBox::textActivated, this, &ProjectAutoNumConfigPage::updateContextFolio); #endif