mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-08-13 10:04:13 +02:00
Fix QSignalMapper connects silently broken under Qt6 (using the old string based system). QSignalMapper::mapped(int/QWidget*) was deprecated in Qt 5.15 and
removed in Qt6, replaced by mappedInt/mappedWidget/mappedString. What was broken: * the logo-conflict rename dialog * the system tray show/hide toggle * the Window menu * export dialog's per-diagram preview controls Switched to the modern mappedInt/mappedWidget signals with pointer-to-member connect(), guarded for Qt < 5.15 until Qt5 can be dropped.
This commit is contained in:
@@ -217,7 +217,11 @@ QString TitleBlockTemplateLogoManager::confirmLogoName(const QString &initial_na
|
||||
connect(replace_button, SIGNAL(clicked()), signal_mapper, SLOT(map()));
|
||||
connect(rename_button, SIGNAL(clicked()), signal_mapper, SLOT(map()));
|
||||
connect(cancel_button, SIGNAL(clicked()), signal_mapper, SLOT(map()));
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
|
||||
connect(signal_mapper, &QSignalMapper::mappedInt, rename_dialog, &QDialog::done);
|
||||
#else // TOD Qt6 only: remove, mappedInt() always available
|
||||
connect(signal_mapper, SIGNAL(mapped(int)), rename_dialog, SLOT(done(int)));
|
||||
#endif
|
||||
}
|
||||
rd_label -> setText(
|
||||
QString(tr(
|
||||
|
||||
Reference in New Issue
Block a user