Some of the newly guarded (Qt5 path) signal/slot connects could be still converted to method pointers. Mostly for completeness as they will go away anyhow soon.

Remaining: richtext editor.
This commit is contained in:
Andre Rummler
2026-08-10 09:08:57 +02:00
parent d9638ad746
commit c25c400c93
5 changed files with 12 additions and 13 deletions
+6 -6
View File
@@ -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<int>(&QSignalMapper::mapped), this, &ExportDialog::slot_previewDiagram);
connect(width_mapper_, qOverload<int>(&QSignalMapper::mapped), this, &ExportDialog::slot_correctHeight);
connect(height_mapper_, qOverload<int>(&QSignalMapper::mapped), this, &ExportDialog::slot_correctWidth);
connect(ratio_mapper_, qOverload<int>(&QSignalMapper::mapped), this, &ExportDialog::slot_keepRatioChanged);
connect(reset_mapper_, qOverload<int>(&QSignalMapper::mapped), this, &ExportDialog::slot_resetSize);
connect(clipboard_mapper_, qOverload<int>(&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);
+1 -1
View File
@@ -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<QWidget*>(&QSignalMapper::mapped), this, [this](QObject *object) { invertMainWindowVisibility(qobject_cast<QWidget *>(object)); });
#else
connect(&signal_map, &QSignalMapper::mappedObject, this, [this](QObject *object) { invertMainWindowVisibility(qobject_cast<QWidget *>(object)); });
#endif
+1 -1
View File
@@ -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<QWidget*>(&QSignalMapper::mapped), this, [this](QObject *object) { activateWidget(qobject_cast<QWidget *>(object)); });
#else
connect(&windowMapper, &QSignalMapper::mappedObject, this, [this](QObject *object) { activateWidget(qobject_cast<QWidget *>(object)); });
#endif
+1 -2
View File
@@ -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<int>(&QSignalMapper::mapped), rename_dialog, &QDialog::done);
#else
connect(signal_mapper, &QSignalMapper::mappedInt, rename_dialog, &QDialog::done);
#endif
+3 -3
View File
@@ -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